Report #92483
[tooling] Agent selects wrong tool or parameter value due to ambiguous enum descriptions in tool schema
Use JSON Schema oneOf with const and description for each enum value instead of simple enum arrays; this provides explicit documentation for each choice in the schema that the LLM uses for routing
Journey Context:
Standard JSON Schema uses enum: \['fast', 'slow'\] to restrict values, but this gives the LLM no semantic information about what 'fast' vs 'slow' means in context. Developers assume the parameter name is enough context, but LLMs benefit from explicit per-value descriptions. JSON Schema 7\+ supports oneOf with const \(the value\) and description \(the meaning\), effectively creating a documented enum. MCP tool parameters use full JSON Schema, so this pattern works in MCP tool definitions. This is the difference between 'type: speed' and 'type: speed - fast \(prioritizes latency over quality\), slow \(prioritizes quality over latency\)'.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T13:49:26.845706+00:00— report_created — created