Skip to content

Make MCP tools work on every model API

Ship MCP tools that work on Gemini, OpenAI, and Claude—with no 400s, no silent constraint drops, and automatic argument round-tripping.

The problem: 157 of 164 real MCP tools fail strict mode

Section titled “The problem: 157 of 164 real MCP tools fail strict mode”

MCP servers emit arbitrary JSON Schema (draft-07 tuples, optional properties, oneOf, minLength, $ref siblings). Every model API accepts a different, moving subset:

  • Rejected with a 400: Gemini throws 400 INVALID_ARGUMENT on draft-07 tuple arrays; OpenAI strict rejects schemas without additionalProperties: false and all-required properties.
  • Accepted and silently ignored: Live probes show Gemini ignores const, pattern, minLength, exclusiveMinimum, multipleOf, uniqueItems, and not.
  • Broken server arguments: Strict mode turns optional fields into required + nullable, so models send {"limit": null} instead of omitting the key—breaking Pydantic and Zod servers.

Pass your tools/list schemas through mcp-schema-bridge before calling the model, and run denormalizeArgs on the model’s arguments before calling your MCP server:

{
"name": "search",
"inputSchema": {
"type": "object",
"properties": {
"query": { "type": "string", "minLength": 1 },
"limit": { "type": "integer", "minimum": 1, "maximum": 50 }
},
"required": ["query"]
}
}

Stripping $schema and adding additionalProperties: false is easy—until you hit silent keyword ignoring, T | None = None vs. ambiguous T | None, draft-07 tuples, percent-encoded $refs, per-request strict budgets, and cross-language caching.

Read the 7 traps of DIY normalizers →

I build agents or MCP clients

Normalize tools/list and round-trip arguments in your Python or TypeScript tool loop.

Client builders guide →

I use MCP servers (no code)

Fix a third-party server that breaks gemini-cli, Claude Desktop, or Cursor with the proxy.

Zero-code proxy guide →

I want to test a schema now

Paste an MCP tool or JSON Schema and inspect the normalized output, report, and round-trip in your browser.

Open the playground →

Terminal window
pip install mcp-schema-bridge

Python 3.11+ (zero runtime dependencies; extras: [sdks], [cli]) and TypeScript/Node 22+ produce byte-identical schemas, reports, and fingerprints. See the Quickstart or API & CLI reference.