CONTRACT DESK / ERRORS07 NOTES
The schema is rejected.
The message rarely says why.
Provider validators report a symptom at the root. The defect is usually several nodes deeper.
What this section covers
Tool-calling providers each accept a different subset of JSON Schema, and each reports rejection in its own vocabulary. OpenAI strict mode demands that every object is closed and every property is listed as required. Anthropic bounds total schema complexity. Gemini accepts a narrower keyword set. MCP requires an object at the root.
The error text almost always names the root, because that is where validation started. These notes locate the actual node, explain the provider rule behind the rejection, and show the repair that preserves the original intent instead of flattening it away.
LLM tool schema errors
Fix “additionalProperties is required to be supplied and to be false”
Diagnose and repair OpenAI strict tool schemas missing additionalProperties: false, including nested objects.
- Invalid schema for function
- additionalProperties is required
- strict: true
Fix OpenAI strict mode’s incomplete required array
Make optional JSON Schema fields compatible with OpenAI strict function calling without losing null semantics.
- Missing required key
- required must include every key
- Optional field rejected
Fix an OpenAI tool schema with anyOf at the root
Replace an unsupported root anyOf with an object-root discriminated contract that OpenAI Structured Outputs accepts.
- Root schema must be object
- Root cannot use anyOf
- Discriminated union rejected
Fix “schema must have a type key” in OpenAI tools
Repair wrapper confusion and missing object types in OpenAI function tool definitions.
- schema must have a type key
- parameters rejected
- Works in a validator
Reduce Anthropic’s “Schema is too complex for compilation” error
Measure optional fields and unions, then simplify a Claude strict tool schema without flattening it blindly.
- Schema is too complex for compilation
- Many optional fields
- Many anyOf branches
Debug Gemini MALFORMED_FUNCTION_CALL with a schema-first check
Separate tool schema problems from model argument failures when Gemini returns MALFORMED_FUNCTION_CALL.
- MALFORMED_FUNCTION_CALL
- No functionCall payload
- Complex nested parameters
Fix an MCP tool inputSchema whose root is not an object
Wrap primitive, array, or union-root arguments in a valid MCP object-root input schema.
- inputSchema rejected
- Root array tool
- Top-level anyOf
RELATED WORKBENCHES01
Reproduce it locally.
These tools take the same evidence the notes above describe and compute the result in your browser tab.
Section FAQ
Before you dig in
Can I write one schema for every provider?
You can write one canonical contract and compile it per target. What you cannot do is assume a single literal document satisfies every provider — optionality, unions, and object closure genuinely differ. The tool schema compiler shows each transformation and flags the ones that lose meaning.
Is my schema sent anywhere when I use these pages?
No. Parsing, diagnostics, and compilation run in the browser tab. Nothing pasted or opened is transmitted to an APITC server.
CONTINUERELATED SECTIONS
Mechanical repairs where intent is recoverable; explicit warnings where it is not.
Open section →Contract deskProvider schema comparisonsField-level differences that change client code, not marketing feature tables.
Open section →Workbench indexAll six APITC toolsDecode, simulate, analyse, plan, diff, and compile — locally.
Open section →