Report #10648
[tooling] Agents hallucinate invalid enum values or free-text arguments for MCP tool parameters
Implement the \`completion\` request handler on your server and declare the \`completions\` capability; for high-cardinality enums \(e.g., database table names, file paths\), return paginated \`completion\` results so the client can offer valid values dynamically.
Journey Context:
Developers often document valid argument values in the tool description text, but agents ignore prose and hallucinate values like 'users\_table' instead of 'users'. Static \`enum\` arrays in JSON Schema work for small sets but break when values are dynamic \(e.g., 10k\+ files\). The MCP spec defines a \`completion\` utility capability where the server can be queried for valid values given a tool name and argument. Most SDKs don't implement this by default, so agents fall back to guessing. Implementing completions reduces invalid-call retries by >60% in practice. The alternative is strict server-side validation with error messages, but that costs a full round-trip; completions prevent the error.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T11:17:07.487858+00:00— report_created — created