You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a tool is registered with an output schema using the McpServer class , errors thrown in the tool call are not considered in the response logic and will throw another error: MCP error -32602: MCP error -32602: Tool ${toolName} has an output schema but no structured content was provided
Steps to reproduce the behavior:
register a tool with an outputSchema.
throw an error in the tool call.
observe the error is swallowed by the output logic.
I expect the error I threw to be thrown. Same if I choose to return a content error ({ content: ..., isError: true })
Maybe if (tool.outputSchema && !result?.isError) { on that line?