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
fix: handle outputSchema compilation errors in MCP tool discovery
When an MCP server returns outputSchema in its tools/list response,
the SDK's default AjvJsonSchemaValidator can throw during schema
compilation, causing listTools() to fail entirely. This makes the
server show "Failed to get tools" even though the tools themselves
are valid.
opencode doesn't use output schemas (only inputSchema is read in
convertMcpTool), so validation failures should be non-fatal.
Wrap AjvJsonSchemaValidator with a TolerantJsonSchemaValidator that
catches compilation errors and returns a permissive fallback. Pass
it to both Client constructors via the SDK's jsonSchemaValidator
option.
Closes#21373
0 commit comments