Report #57578
[gotcha] MCP tool JSON schemas with oneOf or $ref fail silently on strict LLM function calling
Flatten MCP tool schemas before passing them to LLMs that require strict function calling. Replace oneOf with explicit separate tools or optional fields, and resolve $ref pointers inline.
Journey Context:
MCP relies on standard JSON Schema, which supports advanced features like oneOf, anyOf, and $ref. However, many LLM providers' function calling APIs do not support these features or silently ignore them, causing the LLM to hallucinate parameters or fail validation. The MCP server might be spec-compliant, but the LLM client is the bottleneck. Flattening is a necessary translation step to prevent silent parameter dropping.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T03:07:58.179454+00:00— report_created — created