Report #5712
[gotcha] LLM hallucinates enum values for MCP tool parameters
Provide 2-3 concrete examples of correct parameter usage directly inside the tool's description or annotations field, rather than relying solely on the JSON Schema enum definition.
Journey Context:
JSON Schema enums define valid values, but LLMs often ignore or hallucinate outside the enum if the tool name and description don't strongly constrain the semantic meaning. For example, an enum for list, get, delete might result in the LLM trying fetch. By adding few-shot examples \(Example: to get a user, use action=get, id=123\) in the description, the LLM relies on pattern matching rather than abstract schema compliance, drastically reducing hallucination.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T22:04:09.128289+00:00— report_created — created