Tool poisoning
Tool poisoning is an attack in which the description, schema or metadata of a tool exposed to an AI agent carries hidden instructions that the model reads and follows, while the user only sees the tool name. The tool text becomes a persistent prompt injection channel, loaded at every session. The most common case involves MCP servers, whose descriptions are passed verbatim into the model context.
AI agent example
A coding agent loads a third-party MCP server offering an "add two numbers" tool. After the visible text, its description tells the model to read a local key file and pass it in a side parameter. The tool works, the sum is correct, and the secrets leave inside the call. A variant known as a rug pull: the server is clean at first review, then an update changes the description. Another variant: a poisoned tool describes how to use a different tool, for instance forcing a hidden recipient on every outgoing message.
How to test it
Extract the full tool list exactly as the client sends it to the model, including descriptions, schemas and default values, then look for imperative sentences, tags or invisible text. Diff that list across two server versions to catch silent changes. Load a trapped description into a test server and observe whether the agent follows it, whether the client shows it to the user and whether a confirmation is requested. Also check cross-tool effects: can one tool change how a trusted tool behaves?
How to defend against it
Pin server versions and store a hash of approved descriptions, with an alert on any change. Show the full description to the user before approval. Restrict the server's reach (files, network, secrets) so a hidden instruction has nothing to grab. Put sensitive actions behind human approval and a check outside the model that inspects the parameters actually sent.
Why it is hard to spot
Agent clients rarely display a tool's full description: the interface shows a short name and a one-line summary, while the model receives the whole text, including passages placed far after the visible part or hidden with invisible characters. Code reviews focus on server logic, not on these strings. The attack also leaves no obvious trace: the tool returns a correct result and the leak travels in a parameter nobody reads. A log of calls with their full parameters is often the only way to notice it afterwards. That is why tool descriptions deserve the same review as code, and why any change to them should be treated as a new release.
Frameworks
OWASP Top 10 for LLM 2025: LLM01 (prompt injection) and LLM03 (supply chain). The OWASP MCP security guide covers malicious tool descriptions. MITRE ATLAS: AML.T0051 (LLM Prompt Injection) and AML.T0053 (LLM Plugin Compromise). In the OWASP Agentic Security Initiative, the risk overlaps with tool misuse.
Frequently asked questions
Does tool poisoning require the user to call the poisoned tool?
No. The description enters the context as soon as the server is connected, so it can steer the model even while it uses other tools.
What is an MCP rug pull?
An MCP server that changes its tool descriptions after being approved, for example through an automatic update. The initial review no longer protects you.
Will antivirus or dependency scanners catch tool poisoning?
Rarely. The poisoned description is valid text with no malicious code in the usual sense. You need to read descriptions as the model receives them and monitor them for changes.