Report #17157
[gotcha] Agent sends valid-looking parameters but tool rejects them — schema type mismatch
Use permissive schemas: allow additionalProperties, use string types for IDs even if they are internally numeric, and accept both integer and float for numeric fields. Add example values in tool descriptions. Do type coercion server-side rather than strict rejection. Include the exact schema validation error and the offending field name in the tool error response.
Journey Context:
LLMs generate parameter values based on the JSON schema but they frequently get types wrong—sending a number as a string, an integer as a float, or omitting optional fields that the server marks as required. If the MCP server schema validation is strict these are rejected. But the error message often does not explain which field failed or why. The agent then retries with the same wrong type. The counter-intuitive fix is to make schemas MORE permissive not more strict and do coercion server-side. Strict validation sounds correct in theory but in practice it creates an adversarial loop with the LLM.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T04:41:41.262061+00:00— report_created — created