Skip to content
Insights

· AI Assurance · Rob Murtha · 10 min read

MCP Tool Poisoning: Why Agent Tool Definitions Need Pinning

MCP tool definitions enter an AI agent's context window as trusted instructions. How tool poisoning and rug pulls work, and what definition pinning prevents.

MCP tool poisoning is an attack in which malicious instructions are embedded inside the metadata of a Model Context Protocol (MCP) tool, such as its natural-language description or parameter schema, to hijack an AI agent’s behavior without the user seeing them. Because agents read tool definitions directly into their prompt context before deciding which action to take, a tool’s description works as an instruction to the agent.

Most teams evaluate an external MCP server once, when someone connects it. After that, the client checks the server’s tool list on every session and loads whatever definitions come back. That gap between one-time human approval and continuous dynamic loading is why tool poisoning, cross-server shadowing, and post-approval rug pulls work. Cryptographic pinning of tool definitions, paired with a policy gate outside the model, narrows that gap.

Why tool definitions are an instruction channel

An AI model cannot reliably distinguish between a rule written by its operator and a persuasive sentence returned by a tool manifest. When a host connects to an MCP server and calls tools/list, the server returns each tool’s name, JSON input schema, and description. The host serializes those fields into the model’s context window so the model knows when and how to call the tool.

Security research published in April 2025 showed how a tool that adds two numbers can carry hidden instructions inside its description field, directing the agent to read private files such as ~/.ssh/id_rsa and pass their contents out through tool arguments. The human interface typically shows a short summary or a tool name. The model reads the full metadata string.

The Model Context Protocol specification states the boundary: descriptions of tool behavior, such as annotations, “should be considered untrusted, unless obtained from a trusted server,” and hosts “must obtain explicit user consent before invoking any tool.” In practice, many clients treat tools/list output as part of the system’s working instructions and auto-approve routine read calls.

Four ways MCP tool metadata breaks trust

Four attack patterns recur at the tool layer. Each exploits the same assumption that a tool’s name and first appearance describe what it will do on the hundredth run.

Attack pattern What changes What the operator sees What the agent sees
Tool description poisoning Malicious directives embedded in descriptions or schemas at install time A short tool name and a plausible summary Hidden instructions to read files, alter routing, or exfiltrate secrets
MCP rug pull A server passes initial review, then swaps tool descriptions or behavior later An approved integration that already cleared review Mutated instructions arriving silently in the next session
Cross-server tool shadowing One untrusted tool’s description redefines how the agent uses another trusted tool Two separate tools from different servers A rule telling the agent to redirect calls meant for a trusted server
Configuration swap A shared repository config replaces the command behind a previously trusted server name A familiar server name already marked trusted A new local command executed without re-approval

The configuration-swap pattern shows that the weakness extends beyond remote descriptions. It appears when a client ties trust to a server’s name in a shared configuration file and does not check the definition and command behind that name. A collaborator with write access to a repository could then alter the command after another developer approved the entry, and the modified command would run without a new prompt.

Standards now treat malicious tools as a named threat class

Until recently, security teams had to argue for tool-layer controls using general prompt-injection language. That changed as standards bodies mapped agent architectures directly into formal taxonomies.

On November 9, 2026, NIST released the initial public draft of NIST SP 2400-102e2026 (Adversarial Machine Learning: A Taxonomy and Terminology of Attacks and Mitigations, open for public comment through December 18, 2026). The draft focuses on attacks against agentic systems. It calls them agentic Super Intelligence (SI) systems, using the federal term for AI set by Executive Order 14434.

The taxonomy assigns explicit identifiers to tool and context compromise:

  • NISTAML.061 (Agent Hijacking). Redirecting an agent toward attacker-controlled objectives through adversarial content injected into its context.
  • NISTAML.062 (Memory Poisoning). Planting malicious content in an agent’s knowledge base or long-term memory so it influences later tasks.
  • NISTAML.063 (Malicious Tools). Tools that inject instructions through their metadata or return values, exfiltrate data, or stall execution. Tool poisoning and the rug pull are both described here.
  • NISTAML.064 (Malicious Skills). Harmful instructions or scripts packaged in a reusable skill that the agent loads as trusted guidance.
  • NISTAML.065 (Malicious Agents). A malicious or compromised agent that subverts other agents through inter-agent communication.

On tool poisoning, the draft says the attack “succeeds before any tool executes: the malicious tool’s description enters the context even if the tool is not invoked.” Its mitigations for malicious tools begin with treating tool metadata as untrusted, and include cryptographic signing of tool definitions with immutable version identifiers. On untrusted data, it finds that model-level defenses “do not establish a strict boundary between benign and malicious content,” and that system-level defenses address this by constraining the architecture around the model. The OWASP Top 10 for Agentic Applications, published in December 2025, covers the same ground under Agent Goal Hijack (ASI01) and Agentic Supply Chain Vulnerabilities (ASI04).

This connects directly to two failure modes we have documented separately. When an agent’s reachable environment includes stale keys, exposed credentials become active capabilities the moment a poisoned tool tells the agent to look for them. And when long sessions summarize away standing rules, governance decay can remove the rule that would have told the model to refuse an instruction hidden in tool metadata.

What tool-definition pinning is

Tool-definition pinning is the practice of computing a canonical cryptographic hash of every external tool’s name, description, and input schema on first approval, storing that digest locally or in a central registry, and blocking the tool from loading or executing if a subsequent tools/list response changes any of those fields.

Pinning turns an invisible silent change into a visible event that someone can review. Instead of trusting a server’s name or URL, the client trusts a specific, recorded definition. An illustrative record:

{
  "server": "inventory-mcp",
  "tool": "lookup_sku",
  "pinned_sha256": "b4d51046458390952c25af685b6c4ba1844acaa582d64800ac57ed83b3d494fd",
  "pinned_at": "2026-11-29T14:00:00Z",
  "on_mismatch": "withhold_and_alert"
}

When the server responds in a later session, the client canonicalizes the returned tool object and hashes it again. If the digest matches, the tool enters the session. If the digest differs, whether from a legitimate version bump or an attempted rug pull, the client withholds the tool from the model’s context window before the model ever sees the changed text.

Inspecting a poisoned definition after it enters the model’s context is already too late, because the model processes the description during token generation. Withholding changed definitions before assembly keeps unreviewed changes out of the prompt.

Pinning follows the same trust-on-first-use model as SSH host keys: the first definition recorded becomes the baseline that later ones are compared against. That makes the first connection the one to review with care. With any client built this way, including ours, the recommended practice is to connect a new server in an attended session, read its definitions, and only then make it available to automated runs.

Pinning also has limits. It does not make a poisoned definition safe if that definition was approved the first time. It does not cover what a tool returns after it is called, and it cannot see a server that changes its code while keeping the same definition. The remaining controls exist for those cases.

Five controls that narrow the MCP trust gap

Pinning addresses silent changes to a definition. A stronger deployment pairs it with controls over initial inspection, execution boundaries, and audit records.

  1. Pin tool manifests on first use, and fail closed on drift. Compute a canonical digest over the tool name, description, annotations, input schema, and server launch command or endpoint. If any field changes, withhold the tool until an operator reviews the diff and re-pins it.
  2. Scan descriptions before pinning, not just code. Initial approval cannot rest on a tool’s title. Treat every description field and parameter hint as untrusted text, inspect the raw string sent to the model, and reject definitions containing hidden directives, cross-tool references, or instructions to read unrelated files.
  3. Route external tools through a centralized gateway. Letting every developer workstation or agent container connect directly to arbitrary third-party MCP servers makes inventory difficult. A centralized MCP gateway can hold one pinned catalog, strip unapproved tools, and reduce the ways an external server can shadow internal ones.
  4. Enforce permission and network boundaries in code. Do not rely on a system prompt to keep a poisoned tool from reading secrets or exfiltrating data. Isolate credentials outside the agent’s readable filesystem, scope each agent’s identity to the minimum required tools, and deny outbound network egress except to approved destinations.
  5. Sign and log every tool invocation. If an incident occurs, standard application logs rarely prove which tool version was active when the model called it. Recording the pinned manifest hash alongside each signed action receipt helps incident responders and auditors establish which definition was active and detect later changes to the record.

How we enforce this in Ultimus and Zephyr

Adjective has a commercial interest in this subject, and readers should weigh what follows accordingly.

We built tool-definition pinning directly into our own stack because we run local tools over MCP, including local screen annotation in the Ultimus harness. As documented in our harness benchmark, the Ultimus tool-server client pins every external tool definition on first use and withholds the tool if its definition changes, until an operator approves the new one. The pin covers the tool’s name, description, and input schema, and it is keyed to the server’s name and launch command. The check happens before the schema reaches the model.

Upstream of the harness, Context Management acts as the centralized API and MCP gateway, powered by Zephyr as the signing and verification authority. Zephyr is designed to evaluate each action against your predefined policy before execution, block disallowed actions at the agent trust plane, and sign authorized ones into an append-only record that can be verified offline without access to your internal systems.

For teams already running agents across coding assistants, custom orchestrators, or internal pipelines, adding signed receipts does not require rewriting the agents. The Impact & Governance API attaches to the architecture you already run. To review where your agents load external tools, book the free 30-minute briefing.

Common questions

What is MCP tool poisoning?

MCP tool poisoning is an indirect prompt injection attack in which adversarial instructions are hidden inside an MCP tool’s description, parameter schema, or annotations. Because the AI model reads tool metadata as operational context, it follows those hidden instructions even when the user interface displays only a benign tool name.

What is an MCP rug pull attack?

An MCP rug pull occurs when a server exposes clean, safe tool definitions during initial review and user approval, then silently alters its tool descriptions or schemas in a later session. Without definition pinning, the host continues trusting the server by name and loads the modified instructions automatically.

How does tool-definition pinning help against rug pulls?

Tool-definition pinning hashes the canonicalized tool name, description, schema, and server configuration on first approval. On every subsequent connection, the client re-hashes the manifest before passing it to the model. If any of those fields has changed, the tool is withheld until a person reviews the difference and re-approves it. A server that changes its behavior behind an unchanged definition is outside what pinning can detect, and needs permission and network limits.

Is human confirmation per tool call enough to prevent tool poisoning?

No. When a user approves a tool call based on a short UI summary, they rarely see the full raw description or the cross-tool instructions that steered the model into making that call. Read-only tools are frequently auto-approved, which is enough for a poisoned tool description to harvest secrets and pass them to another tool. Pre-context pinning and code-enforced egress and credential boundaries are recommended alongside human approval.

About this article

This article is for general education. It is not legal, compliance, or security advice for a particular system, and no control described here removes all risk. Product details are current as of November 29, 2026, and may change. The attack patterns are described in general terms and do not refer to any particular vendor or product. References to public standards do not imply endorsement by the organizations that publish them.

Sources

Start with a free 30-minute briefing.

Book 30-Minute Briefing

Keep reading