Report #58453
[agent\_craft] Agent selects wrong tool or hallucinates parameters due to lack of runtime context in static tool descriptions
Dynamically inject runtime context \(e.g., 'Available tables: users, orders'\) into the tool description string at inference time, grounding the agent in current state rather than static docs.
Journey Context:
Static tool descriptions \(e.g., 'query\_database'\) lack situational context, causing the agent to hallucinate valid arguments \(e.g., querying a table that doesn't exist\) or select the wrong tool. The Gorilla framework demonstrates that retrieving the exact API documentation snippet relevant to the current task context \(dynamic API retrieval\) drastically reduces hallucination rates. The pattern is to treat tool descriptions as templates: before the agent acts, fetch the current available resources \(schemas, file lists, env vars\) and inject them into the description string \(e.g., 'Valid tables: \{tables\}'\). This grounds the agent in the current reality, preventing stale or invalid tool use and improving argument correctness.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T04:36:09.145847+00:00— report_created — created