Summary
When an LLM tool-calling request fails with 400 Invalid schema for function (additionalProperties: false required, invalid_type, or tool_use IDs not matching tool_result), the model never gets to run your tools.
If you want this fixed cleanly, SazM repairs broken function-calling and tool-schema integrations for a fixed $99, delivered within 48 hours, 100% in writing with zero calls. See our AI integration services or request the $99 fix.
1. Strict JSON Schema Requirements
- OpenAI strict mode (
strict: true) requiresadditionalProperties: falseon every object and all properties listed inrequired(use["string", "null"]for optional fields). - Avoid unsupported JSON Schema keywords (
oneOf,allOf,formatin some providers).
2. Match tool_call_id / tool_use Pairs
- Every
tool_callin an assistant message must be followed immediately by a matchingtool/tool_resultmessage with the exactid, or the API rejects the entire conversation history with400.
Need It Fixed?
We debug production OpenAI, Anthropic, and Cloudflare Workers AI tool-calling pipelines—plus our 5-tool MCP server (sazm.in/mcp)—for a fixed $99 within 48 hours, verified before you pay and 100% async. Start your $99 fix or explore our AI integration services.