You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
SDK feedback: oneOf in tool inputSchema isn't practically consumable by tool-calling LLMs #2806
As an SDK author exposing tools via MCP, I want to express "exactly one of fields A, B" as JSON Schema oneOf. The spec permits this, but in practice the LLM tool-calling layer downstream of MCP clients (Claude, GPT-4 family) does not reliably consume oneOf — models silently ignore the constraint or refuse the tool call. I ended up flattening union-types into separate tools or sentinel-string discriminators across anchor-x402-mcp (14 tools).
This isn't a protocol bug — the spec is internally consistent — but there's a documentation gap between "the spec allows this JSON Schema construct" and "implementers can actually use it in production." A SEP-level note listing which constructs are reliably consumed today (enum: yes, oneOf/anyOf: no, if/then: no, etc.) would save the next implementer from discovering it through failed tool calls.
Assigning this one to myself as a follow up to SEP-2106. I was having a related conversation with @evalstate recently and I agree that we should put something together to cover the mismatch between what LLM providers actually support vs what the spec allows. It might not belong in the spec itself, but there should be more details on this somewhere adjacent to the spec, so that implementers don't run into it through trial and error.
Activity
olaservo commentedon May 27, 2026
Assigning this one to myself as a follow up to SEP-2106. I was having a related conversation with @evalstate recently and I agree that we should put something together to cover the mismatch between what LLM providers actually support vs what the spec allows. It might not belong in the spec itself, but there should be more details on this somewhere adjacent to the spec, so that implementers don't run into it through trial and error.