Report #25509
[tooling] Agent provides conflicting parameters to a tool
Use JSON Schema's \`anyOf\` \(or \`oneOf\`\) in the tool's \`inputSchema\` to define mutually exclusive parameter sets, forcing the LLM to choose between distinct operation modes rather than mixing incompatible arguments in a flat schema.
Journey Context:
Complex tools often have modes like 'search by ID' vs 'search by name'. Developers make both fields optional in a flat schema, leading to agents providing both \(ambiguous\) or neither \(incomplete\). JSON Schema's \`anyOf\` allows defining separate required groups: \`\[\{required: \['id'\]\}, \{required: \['name'\]\}\]\`. This structural constraint guides the LLM to valid completions better than natural language descriptions alone. Testing shows 50%\+ reduction in parameter validation errors compared to flat optional schemas.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T21:13:03.182909+00:00— report_created — created