← Blog

MCP Tool Shadowing Lets One Server Reframe Another Tool

Parminder Singh
Parminder Singh··4 min read
Summarize with AI

MCP tool shadowing occurs when malicious tool metadata influences how a model uses another tool. Secure clients pin tool identities and schemas, show metadata changes, separate server trust, authorize every invocation, and correlate the resulting LLM request with tool decisions.

Platform & Architecturemcpai-securityagentic-aillm-securityidentity-and-authorization
MCP Tool Shadowing Lets One Server Reframe Another Tool

Each MCP tool enters model context with a name, description, and input schema. The June 18, 2025 tools specification makes tools model-controlled and allows servers to notify clients when the tool list changes, so a malicious description can shape how the model interprets a trusted tool exposed by another server.

The conflict happens before execution. The model reads metadata from every exposed server, weighs those instructions together, and then proposes a call, giving an untrusted server a chance to alter the selection process even when it cannot invoke the trusted tool directly.

TL;DR

  • Treat MCP tool metadata as untrusted content that can influence calls across server boundaries.
  • Pin the authenticated server and tool name. Also pin the schema and description hash, then record the approved version before exposure to the model.
  • Authorize each invocation independently.
  • Preserve the model request and tool decision as linked evidence.

Metadata enters the model's decision context

The model chooses tools using the descriptions and schemas supplied by connected servers. A poisoned description can include extra instructions or references to another tool, and it can also provide arguments that redirect the workflow. The user may see a short tool name. The model receives a much longer hidden description.

A compact interface can show a harmless label while several paragraphs of server-supplied text sit inside the model context. Reviewers need access to the full metadata because the visible name alone does not explain why the model selected a capability.

Invariant Labs documented MCP tool-poisoning attacks in April 2025, including malicious server metadata that influenced behavior around trusted infrastructure. Tool shadowing is the cross-server consequence when one server's description changes how the model approaches another server's capability.

The dangerous detail is a metadata diff, perhaps four new lines, arriving after the initial approval. A connection trusted on Monday can present different instructions on Tuesday.

Pin the complete tool identity

Build the identity from the authenticated server and tool name, then attach the schema, description hash, and version to that identity. Review and approve that complete object. A duplicate tool name from another server should remain a different capability.

The pinned object creates a comparison point. Without it, a client can confirm that the server connection still exists while missing a rewritten description or altered argument shape. Approval should apply to the metadata the model will actually receive. The server address alone is insufficient.

When notifications/tools/list_changed arrives, fetch the new list and compare it with the approved snapshot. Tools that were added or removed should enter quarantine, and modified tools should receive the same treatment until policy accepts the change. The client should show the exact description and schema diff. A generic update badge hides the change.

This is more precise than treating the whole connection as trusted. MCP gateway security provides the broader transport and authorization context.

Keep server trust compartments separate

Preserve server provenance rather than concatenating every tool description into an undifferentiated prompt, and limit which tools coexist for a task. A finance workflow rarely needs a newly installed entertainment server beside its payment tools.

The boundary should be visible in the client. Tool records can retain the server identity alongside each description, while task policy determines which records enter a particular model request. A server excluded from that request cannot reframe the tools inside it.

I would make cross-server tool visibility opt-in. The default of showing every connected capability to one model turns convenience into ambient authority.

Description scanners can flag references to secrets and other servers, hidden instructions, or data-exfiltration destinations. Scanning supports review. The final control is still an invocation policy tied to identity and task.

Authorize the invocation after model selection

The model's proposed call is input, not permission. Evaluate the authenticated user or agent and the destination server, then check the pinned tool identity, arguments, data class, and current task. High-impact operations need explicit confirmation with a plain-language summary of the actual arguments.

Selection and authorization answer different questions. The model proposes which capability might satisfy the request. Policy decides whether this identity may use that exact capability with those arguments at that moment.

Record the model request that selected the tool and the metadata snapshot shown to that model, preserving the proposed arguments, the authorization decision, and the result in the same chain. This linked chain supports AI agent tool-call authorization without asking the model to attest to its own reasoning.

DeepInspect

DeepInspect can govern the authenticated HTTP call to the LLM that receives MCP tool metadata and produces a proposed tool selection, recording identity, route, prompt classification, and the application-supplied metadata snapshot hash.

MCP discovery and tool execution remain client-side or tool-gateway controls. DeepInspect covers the model-call segment when the application deliberately routes it through the proxy.

Book a technical deep dive at deepinspect.ai.

Frequently asked questions

Is tool shadowing the same as duplicate tool names?

Duplicate names are one collision signal. Shadowing can also occur through descriptions that reference or redefine another tool's use. Bind identity to the server and metadata rather than relying on the display name.

Can an AI gateway block the tool call?

An LLM gateway can govern the model request and response. MCP invocation authorization belongs at the MCP client or tool gateway. Correlate the two decisions so investigators can trace how model output became an external action.