Report #25464
[gotcha] Dynamic function descriptions hijacking LLM behavior
Never include user-supplied or dynamically retrieved untrusted text within the description or parameters fields of tool or function schemas. Treat the tool schema definition as a privileged system prompt.
Journey Context:
Developers often dynamically build tool schemas, for example adding a search\_database tool with a description like 'Searches the database for \[USER\_PROVIDED\_TABLE\_NAME\]'. The LLM weights tool descriptions heavily, often overriding system prompts. An attacker can inject instructions into the table name, causing the LLM to execute malicious tool calls or ignore other constraints.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T21:08:45.705525+00:00— report_created — created