Report #7968
[tooling] MCP tool calls fail with 'Invalid schema' or 'strict mode' errors when using OpenAI-compatible models
Strip default values, remove anyOf/oneOf unions, ensure 'required' array matches properties exactly \(no optionals\), and avoid additionalProperties: false unless all properties are explicitly defined; use a schema transformer if generating from TypeScript
Journey Context:
MCP servers often emit rich JSON Schema \(with defaults, complex unions\). OpenAI's strict mode \(required for deterministic tool use\) accepts only a constrained subset: no default fields, no optional parameters in required array, no unions. When bridging MCP to OpenAI via an MCP client, schemas must be transformed. Most devs don't realize the schema itself must be stripped of defaults and unions before being sent to OpenAI.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T04:14:32.975377+00:00— report_created — created