Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions client/src/lib/integration-test-runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -1084,8 +1084,8 @@ export class IntegrationTestRunner {
throw new Error(`Test directory ${beforeDir} not found for ${toolName}/${testCase}`);
}
} else if (toolName === "codeql_resolve_queries") {
// Use the test case directory as the queries path
params.path = beforeDir;
// Use the static examples directory which already contains installed QL packs
params.directory = path.join(staticPath, "src");
} else if (toolName === "codeql_resolve_tests") {
// Use the test case directory as the tests path
params.tests = [beforeDir];
Expand Down
16 changes: 10 additions & 6 deletions server/dist/codeql-development-mcp-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -193542,13 +193542,17 @@ function registerCLITool(server, definition) {
resultProcessor = defaultCLIResultProcessor
} = definition;
const enhancedSchema = buildEnhancedToolSchema(inputSchema);
server.tool(
server.registerTool(
name,
description,
// The enhanced schema is a pre-built ZodEffects (passthrough + transform).
// The MCP SDK's getZodSchemaObject() detects it as a Zod schema instance
// and passes it through without re-wrapping.
enhancedSchema,
{
description,
// The enhanced schema is a pre-built ZodEffects (passthrough + transform).
// Using registerTool() instead of tool() because the latter's argument
// parsing rejects ZodEffects as "unrecognized objects". registerTool()
// passes inputSchema directly to getZodSchemaObject(), which correctly
// recognises any Zod schema instance.
inputSchema: enhancedSchema
},
async (params) => {
const tempDirsToCleanup = [];
try {
Expand Down
4 changes: 2 additions & 2 deletions server/dist/codeql-development-mcp-server.js.map

Large diffs are not rendered by default.

16 changes: 10 additions & 6 deletions server/src/lib/cli-tool-registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,13 +115,17 @@ export function registerCLITool(server: McpServer, definition: CLIToolDefinition
// produces actionable error messages for truly unknown keys.
const enhancedSchema = buildEnhancedToolSchema(inputSchema);

server.tool(
server.registerTool(
name,
description,
// The enhanced schema is a pre-built ZodEffects (passthrough + transform).
// The MCP SDK's getZodSchemaObject() detects it as a Zod schema instance
// and passes it through without re-wrapping.
enhancedSchema as unknown as Record<string, z.ZodTypeAny>,
{
description,
// The enhanced schema is a pre-built ZodEffects (passthrough + transform).
// Using registerTool() instead of tool() because the latter's argument
// parsing rejects ZodEffects as "unrecognized objects". registerTool()
// passes inputSchema directly to getZodSchemaObject(), which correctly
// recognises any Zod schema instance.
inputSchema: enhancedSchema,
},
async (params: Record<string, unknown>) => {
// Track temporary directories for cleanup
const tempDirsToCleanup: string[] = [];
Expand Down
Loading