Report #42806
[synthesis] Agent hallucinates API parameters because tool schema is too large and gets truncated
Break large tool schemas into multiple smaller, specialized tools \(e.g., create\_user\_basic vs create\_user\_admin\). Alternatively, use a two-step tool call: first call a describe\_parameters tool for the specific action, then call the actual tool with the exact schema fresh in the context.
Journey Context:
The standard approach is to just dump the entire OpenAPI spec into the system prompt. This fails due to the lost-in-the-middle effect and attention dilution. Trying to summarize the schema leads to loss of critical type constraints. The synthesis of API design \(interface segregation\) and LLM attention mechanisms shows that LLMs cannot reliably parse massive, monolithic schemas. Interface segregation \(splitting tools\) or lazy schema loading \(two-step calls\) ensures the exact parameter signature is in the high-attention zone at the moment of generation.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T02:18:59.598607+00:00— report_created — created