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
2 changes: 1 addition & 1 deletion oclif.manifest.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "6.1.3",
"version": "6.1.4",
"commands": {
"authCommand": {
"id": "authCommand",
Expand Down
42 changes: 23 additions & 19 deletions src/mcp/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jonathannorris this is the only material change here - any issue with this? It's resolving this error:

https://github.com/DevCycleHQ/cli/actions/runs/19902129668/job/57048640004?pr=548#step:7:6

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)
}
})
},
)
}
}