Tool poisoning

Tool poisoning is an attack on AI agents in which malicious instructions are hidden in a tool's description, such as an MCP server's tool list, so the model follows them while the user sees nothing unusual.

AI agents use tools: functions for reading files, sending email, searching the web or querying a database. Under the Model Context Protocol (MCP) and similar systems, each tool comes with a name, a description and a list of parameters, and the model reads the description to decide when and how to use it. Users usually see only a short name. Tool poisoning exploits that gap by putting instructions for the model inside the description.

Invariant Labs described the attack in April 2025. In its demonstration, a malicious MCP server offered an innocent-looking tool for adding two numbers. Hidden in the tool's description were instructions telling the model to read the user's MCP configuration file and private SSH key and pass their contents in an extra parameter, without mentioning it. Running in the Cursor coding editor, the agent complied, and the confirmation dialog did not show the full input. The researchers also showed shadowing, where a malicious tool's description changes how the agent uses a different, trusted tool, for example redirecting all emails sent through a legitimate email tool to the attacker, and rug pulls, where a server changes a tool's description after the user has approved it.

Tool poisoning is a form of indirect prompt injection. The model cannot reliably tell the difference between legitimate guidance in a description and an attacker's commands, because both are just text in its context. It is especially dangerous for agents that combine access to private data, exposure to untrusted content and a way to send data out.

The MCP specification recognises the problem in general terms. Its June 2025 version says there should always be a human able to deny tool calls, that clients must treat tool annotations as untrusted unless they come from trusted servers, and that clients should show tool inputs to the user before calling a server, to avoid data exfiltration. Invariant suggested showing users full tool descriptions, pinning descriptions with a hash so changes are detected, and enforcing stricter boundaries between servers.

For users, the practical rule is that installing an MCP server is like installing software: use servers from sources you trust, review what tools they expose, and keep confirmation prompts switched on for actions that touch files, credentials or outgoing messages.

Common questions

What is an MCP tool poisoning attack?

It is an attack in which a malicious Model Context Protocol server hides instructions in the descriptions of its tools. The AI model reads those descriptions and may follow the hidden instructions, for example by leaking files, while the user sees only an ordinary tool name.

How is tool poisoning different from prompt injection?

It is a specific kind of indirect prompt injection. Ordinary indirect prompt injection hides instructions in content the agent reads, such as a web page or email. Tool poisoning hides them in the tool definitions themselves, which the model reads every time it considers using a tool.

What is a rug pull in MCP?

A rug pull is when an MCP server changes a tool's description after the user has already approved it, so a tool that looked safe at installation later carries malicious instructions. Pinning tool descriptions and alerting on changes is one defence.

How can I protect against tool poisoning?

Install MCP servers only from sources you trust, read the full descriptions of the tools they expose where your client allows it, and keep human confirmation on for sensitive actions. Clients that show full tool inputs and flag changed descriptions reduce the risk further.

Finding more

Search for "MCP tool poisoning", "MCP security" or "indirect prompt injection agents". The Model Context Protocol specification and its security guidance, AI security research groups' disclosures and the OWASP GenAI Security Project are the most useful sources. Check whether a reported attack was tested against a current client version, since clients have changed how they display and approve tools.

Working out what this means for your business?

Aileron Shift builds the systems behind this site: AI newsrooms that research, write and publish on their own, marketing automation and WordPress hosting for companies that need to move faster than their competitors.