From f70b992f6ef77776fc8165a08ad2d293b47b9926 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 3 Dec 2025 17:26:58 +0000 Subject: [PATCH 1/2] Initial plan From 1de22aaf15871eaa05e8c7917bd017626c418ba3 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 3 Dec 2025 17:40:30 +0000 Subject: [PATCH 2/2] fix: resolve TypeScript type inference error with MCP SDK 1.24.0 Co-authored-by: JamieSinn <1538232+JamieSinn@users.noreply.github.com> --- oclif.manifest.json | 2 +- src/mcp/server.ts | 42 +++++++++++++++++++++++------------------- 2 files changed, 24 insertions(+), 20 deletions(-) diff --git a/oclif.manifest.json b/oclif.manifest.json index 76933d3a..d608ad77 100644 --- a/oclif.manifest.json +++ b/oclif.manifest.json @@ -1,5 +1,5 @@ { - "version": "6.1.3", + "version": "6.1.4", "commands": { "authCommand": { "id": "authCommand", diff --git a/src/mcp/server.ts b/src/mcp/server.ts index f180c827..d7490efd 100644 --- a/src/mcp/server.ts +++ b/src/mcp/server.ts @@ -93,33 +93,37 @@ export class DevCycleMCPServer { toolConfig.outputSchema = config.outputSchema } - this.server.registerTool(name, toolConfig, async (args: unknown) => { - try { - const result = await handler(args) + this.server.registerTool( + name, + toolConfig as any, + async (args: unknown) => { + try { + const result = await handler(args) + + // If the handler returned a plain string, send it as-is + if (typeof result === 'string') { + return { + content: [ + { + type: 'text' as const, + text: result, + }, + ], + } + } - // If the handler returned a plain string, send it as-is - if (typeof result === 'string') { return { content: [ { type: 'text' as const, - text: result, + text: JSON.stringify(result, null, 2), }, ], } + } catch (error) { + return handleToolError(error, name) } - - return { - content: [ - { - type: 'text' as const, - text: JSON.stringify(result, null, 2), - }, - ], - } - } catch (error) { - return handleToolError(error, name) - } - }) + }, + ) } }