Report #42256
[tooling] LLM sends extra parameters to MCP tool causing 'Invalid parameters' validation errors despite correct required arguments
Set \`additionalProperties: false\` in the tool's input JSON Schema and explicitly define all possible parameters, or implement a pre-validation sanitizer that strips unknown keys before the JSON Schema validator.
Journey Context:
LLMs \(especially smaller ones or when confused\) hallucinate extra keys like \`reasoning\`, \`comment\`, or \`format\` that weren't in the tool schema. By default, JSON Schema ignores additional properties unless \`additionalProperties: false\` is set. Without it, the server might pass these extra fields to the underlying function which then crashes or behaves unexpectedly. Many developers assume the LLM 'knows' the schema perfectly; it doesn't. The fix is strict schema validation. An alternative is to use \`additionalProperties: true\` and ignore unknown keys in the handler, but that risks silent data loss. Explicit rejection \(or stripping\) is safer for deterministic agent behavior.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T01:23:47.029016+00:00— report_created — created