Skip to content

Add stripOutputSchema config for Claude Code compatibility#62

Merged
pardeike merged 3 commits intopardeike:mainfrom
Evyatar108:fix/mcp-transport-stability
Mar 29, 2026
Merged

Add stripOutputSchema config for Claude Code compatibility#62
pardeike merged 3 commits intopardeike:mainfrom
Evyatar108:fix/mcp-transport-stability

Conversation

@Evyatar108
Copy link
Copy Markdown

Summary

  • Add stripOutputSchema boolean to ~/.gabs/config.json that strips outputSchema from tools/list responses
  • Default is false — no behavior change for Codex or other MCP clients
  • When true, enables Claude Code to load all 110+ game tools as direct MCP tools

Problem

Claude Code rejects MCP servers that include outputSchema in tool definitions returned by tools/list. This field is not part of the MCP tools spec (which only defines name, description, inputSchema), nor the Claude API tool spec.

Only 4 of 110 RimBridgeServer tools carry outputSchema, but their presence causes Claude Code to drop the entire GABS server. Confirmed by binary search: stripping outputSchema is the only change needed — full tool names, descriptions, and input schemas all work at 123 tools.

Config usage

{
  "stripOutputSchema": true
}

Full tool metadata including outputSchema remains accessible via games.tool_detail.

Test plan

  • With stripOutputSchema: false (default): no behavior change, Codex works as before
  • With stripOutputSchema: true: all 123 tools (13 core + 110 game) load as direct MCP tools in Claude Code
  • Dynamic tool expansion via tools/list_changed works — no disconnects after games.connect
  • Direct tool calls work: mcp__gabs__rimworld_rimbridge_ping returns pong

🤖 Generated with Claude Code

Claude Code rejects MCP servers that include `outputSchema` in
tools/list responses — this field is not part of the MCP tools spec.
Only 4 of 110 RimBridgeServer tools carry it, but their presence
causes Claude Code to drop the entire server on startup.

Add `"stripOutputSchema": true` to ~/.gabs/config.json to strip the
field from tools/list. Default is false so Codex and other clients
that handle it are unaffected. Full tool metadata including
outputSchema remains available via games.tool_detail.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@Evyatar108
Copy link
Copy Markdown
Author

add tests

Your Name and others added 2 commits March 29, 2026 04:01
Verify that:
- outputSchema is preserved when config is false (default)
- outputSchema is stripped when config is true
- tools without outputSchema are unaffected
- inputSchema is preserved when stripping outputSchema

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…test

- findTool helper now takes *testing.T and fails on marshal/unmarshal errors
- Add test verifying stripping does not mutate the original handler.Tool

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@Evyatar108 Evyatar108 force-pushed the fix/mcp-transport-stability branch from 70ddd97 to 5a16017 Compare March 29, 2026 11:09
@pardeike pardeike merged commit fba0c1d into pardeike:main Mar 29, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants