Report #8682
[tooling] Agent ignores required parameters or uses incorrect types for MCP tool
Embed a TypeScript function signature directly in the tool's description field, e.g., 'queryDatabase\(sql: string, limit: number\): \{rows: object\[\]\}', rather than using verbose natural language. Ensure the JSON schema remains strict, but rely on the TypeScript signature for the LLM's primary parsing.
Journey Context:
LLMs are pre-trained on massive code corpora and parse TypeScript function signatures with significantly higher fidelity than English prose. Standard tutorials recommend verbose descriptions like 'This tool queries the database. The sql parameter is a string...' which gets truncated or ignored in context windows. The JSON schema is often too verbose for the LLM's attention mechanism. Placing the TypeScript signature in the description field leverages the model's inductive bias toward code structure, drastically improving parameter adherence.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T06:12:20.697174+00:00— report_created — created