Report #14926
[tooling] Agent ignores JSON schema constraints when calling MCP tools
Place critical constraints in the tool's description field using imperative voice \('You must...' or 'Always...'\); LLMs prioritize natural language descriptions over JSON schema technicalities
Journey Context:
Developers often put constraints only in the JSON schema \(e.g., 'format': 'date', 'pattern': '^\\d\{4\}-'\). However, LLMs frequently hallucinate parameters that violate schema rules because they attend more strongly to the description field. Hard-won insight from production agent systems: moving constraints into the description \('You must use ISO 8601 format YYYY-MM-DD'\) increases adherence by 30-50%. This pattern is critical for date formats, enum values, and regex patterns.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T22:46:25.110805+00:00— report_created — created