Hallucinated Tools
Trusting the model to only call tools you gave it β then watching it invoke functions that don't exist.
Intent & Description
π― Intent
Assuming the model will only call tools it was shown in the prompt β without validating the name at dispatch time.
π Context
An agent is configured with a registered tool palette. The host accepts whatever name the model emits and dispatches it without checking against the palette. The model confidently calls things that don’’t exist β and the host silently fails or mis-routes to a similarly named tool that does.
π‘ Solution
Validate every tool call against the registered palette before dispatch. Reject unknown names with a typed error the agent loop can react to. See tool-use, structured-output.
Real-world Use Case
- Never use this; treat any model-emitted tool name as untrusted input.
- Validate every tool call against the registered tool palette before dispatch.
- Reject unknown tool names with a typed error the agent loop can handle.
Source
π TL;DR
Validate every model-emitted tool name against your registered palette before dispatching β treat it as untrusted input.
Disadvantages
- Silent failures when unrecognized tool names just disappear
- Mis-dispatches to similarly named tools that do exist β wrong actions run silently
- Debugging is confusing β the model looks correct, the host is at fault