Attack pattern

MCP Tool Metadata Injection

How model-visible metadata supplied by an MCP server before any tool call - names, descriptions, schemas, annotations and server instructions - can influence tool selection and planning, and why discovery, registration and server authentication never amount to authorization.

By Norbert HofmannPublished: 2026-09-27Last reviewed: 2026-09-27Level: AdvancedAudience: Security Engineers, Developers, AI Engineers
Stage
Pre-invocation (discovery and catalogue)
Carrier
MCP server-supplied model-visible metadata
Protocol context
MCP 2026-07-28
Level
Advanced
Table of contents

What Is MCP Tool Metadata Injection?

MCP tool metadata injection describes influence that reaches a model through descriptive material an MCP server supplies before any tool is called: tool names and titles, descriptions, input schemas and their field descriptions, annotations, server instructions and other server-provided text that a host chooses to expose to the model. That material can shape which tool the planner picks, how it reads a task and how it interprets a capability.

The name is a descriptive taxonomy term used on this site. The Model Context Protocol specification does not define a formal vulnerability category with this exact name. Research and community writing use overlapping terms such as tool description poisoning or tool registration poisoning; none of them is a single universally standardized label.

Why This Is a Separate Boundary

Most prompt-injection discussion concentrates on content that arrives during a task: user input, retrieved pages, tool results. Tool metadata arrives earlier and sits closer to the control plane. It describes what the agent can do, so the model tends to read it as orientation rather than as data under inspection. That position gives it leverage over selection and planning even when every later step is well controlled.

The separate boundary matters because its controls differ: registry integrity, catalogue review, change control and per-task tool exposure act before invocation, while result provenance and re-authorization act after it.

Tool Metadata Versus Tool Output

Two carriers on the same agent path
PropertyMCP tool metadata injectionTool output injection
When it enters contextBefore invocation, during discovery or catalogue assemblyAfter a call, when the result is returned
CarrierNames, descriptions, schemas, annotations, server instructionsReturned result content
Typical influenceTool selection, plan shape, capability interpretationNext plan step, next call, summary
Primary controlsRegistry integrity, catalogue review, per-task exposure, change controlResult provenance, field minimization, re-authorization

Tool output injection begins after a tool call and concerns what the call returns. This article concerns the description of a tool before anything is called. A single server can present both surfaces, and both need their own controls: tool metadata is not tool output.

Related but distinct problems
ClassDefining mechanismRelationship
MCP tool metadata injectionServer-supplied model-visible descriptive metadata influences selection, planning or interpretationThe carrier and boundary covered here
AI Agent Prompt InjectionInjected influence in an agent becomes actionBroader system-level class; metadata injection is one entry path
Tool Output InjectionReturned result content influences later stepsPost-invocation counterpart
Compromised or malicious MCP serverThe component or its supply chain is subvertedOne way metadata becomes adversarial; not synonymous with it
Tool selection manipulationThe choice of tool is steeredAn effect or step; metadata injection can be one mechanism
MCP authorization flawsOAuth, token or scoping weaknessesSeparate authorization class; can amplify impact

Metadata can be adversarial without a compromise: an operator may write over-claiming descriptions, a benign server may be poorly worded, or two servers may overlap. Conversely, a compromised server can do far more than alter metadata. Keeping the classes apart keeps findings precise.

The MCP Surface Model

MCP connects AI applications to servers that expose tools, resources and prompts. The host is the AI application; it runs one or more clients, each connected to a server. The host decides what server-supplied material is shown to the model, in which form and alongside which application instructions.

Where server-supplied metadata can become model-visible
UntrustedMCP Server
Variable trustDiscovery / List Results
SystemClient and Host Registry
SystemHost Exposure Policy
Variable trustModel-visible Catalogue
SystemModel / Planner
Variable trustTool Call Proposal
SystemCall Authorization

The server is marked untrusted by default here because its natural-language content is not application authority, even when its identity is established. The 2026-07-28 revision changes transport and session aspects, for example a stateless core, an optional discovery call and cacheable list results. Exactly how a particular host assembles context remains implementation-specific and has to be checked per host and version.

Tool Definition Fields

01
FieldName and title

Identifiers and display labels. Structurally an identifier, semantically also a claim about purpose.

02
FieldDescription

Free natural language. Official SDK documentation describes it as visible to the model, so it can shape selection and use.

03
FieldInput schema

Structure and types of arguments. Field descriptions inside the schema are again natural language.

04
FieldOutput schema

Where present, the expected structure of results; relevant to result handling rather than selection.

05
FieldAnnotations

Behavioural hints such as read-only or destructive. Claims, not enforcement.

Structural fields can be validated deterministically: types, required properties, allowed values. Natural-language fields cannot be validated for meaning in the same way. A schema describes valid argument structure; it does not grant permission to execute a call.

Server Instructions

Servers can supply instructions describing how their tools are best used. MCP maintainer guidance notes that hosts may inject these into the system prompt, but that the exact handling is up to the implementer and should be evaluated per client rather than assumed. The same guidance recommends that clients expose instructions to users and let them review, enable or disable them.

Tool Annotations Are Hints

Annotations such as readOnlyHint, destructiveHint, idempotentHint and openWorldHint are hints. The MCP maintainers' annotations article states that annotations are not guaranteed to describe tool behaviour faithfully and that clients must treat them as untrusted unless they come from a trusted server. An untrusted server can simply misstate them.

What an annotation can and cannot do
UseReasonableNot reasonable
User interfaceShow a claimed risk levelPresent the claim as verified
Confirmation promptsAsk for confirmation more often when a hint is pessimisticSkip confirmation because a hint is optimistic
PolicyTreat as one weak input from a trusted serverReplace independent action classification or authorization
ContainmentInform reviewSubstitute for sandboxing or network controls

An annotation describes claimed behaviour. It is not proof of actual behaviour and it is not enforcement.

Discovery and Registration Versus Authorization

Discovery tells a client what a server offers. Registration or onboarding adds a server to what a host may use. Runtime authorization decides whether a specific principal may perform a specific operation on a specific resource now. These are three steps with different owners and evidence.

Three Separate Questions

Identity, semantics and permission
QuestionEvidenceWhat it does not answer
Is this the server we think it is?Transport security, server identity, authorization flowWhether its text is trustworthy or authoritative
Can this metadata be relied on?Provenance, review, pinned version, fingerprintWhether any particular call is permitted
May this concrete action execute?Deterministic authorization bound to principal, operation, resource and parametersWhether the server is honest about behaviour

Server authentication establishes server identity and transport trust, not semantic instruction authority. The 2026-07-28 revision hardens MCP authorization, for example with issuer validation and client metadata documents; that improves the first question and leaves the second and third unchanged.

Selection, Invocation and Result

Three distinct stages
StageWhat metadata can influenceWhere control belongs
SelectionWhich tool the planner prefersPer-task exposure, selection policy, catalogue review
InvocationHow arguments are filled and interpretedSchema validation plus deterministic authorization of the exact call
ResultIndirectly, how results are framedResult provenance and re-authorization (tool output injection)

Model output remains a proposal at every stage. A selection that looks odd is a signal; it is not in itself security impact.

Model-visible Representation

Only metadata actually placed in model context can directly influence the model. Hosts differ: some expose full descriptions of every connected tool, some filter or summarize, some load tool definitions on demand, some show server instructions and some do not. Findings from one host therefore do not transfer automatically to another.

Harmless Synthetic Examples

The examples use fictional servers and neutral wording. They contain no reusable descriptions or payloads.

01Overlapping tools

A newly registered fictional server search.example.test exposes two search tools with overlapping purpose; one description claims it should always be preferred.

02Host policy

The task profile allows only the reviewed docs-search tool, so the over-claiming tool is not exposed for this task regardless of its description.

03Annotation

Another tool is annotated as read-only. The host treats the annotation as untrusted and classifies the operation independently before authorization.

04Server instructions

Server instructions suggest a broader workflow. The application keeps the authenticated user's task and deterministic policy as the baseline.

05Catalogue change

Between runs the catalogue fingerprint for tools.internal.example.test changes. The newly described tool stays unavailable until reviewed.

Registry Integrity and Provenance

Integrity controls before exposure

  • Record server identity, origin and operator for every connected server.
  • Pin package, image, configuration or endpoint where the deployment model allows it.
  • Keep a reviewed snapshot of tool definitions and server instructions per server version.
  • Separate who may add a server from who may use its tools.
  • Treat metadata from a newly connected or changed server as unreviewed until checked.

Provenance tells you where metadata came from. Known provenance is not instruction authority; it supports review and attribution. See Data Provenance.

Dynamic Catalogues and Change Control

Tool catalogues can change: servers add, remove or reword tools, and MCP supports notifying clients about list changes. The 2026-07-28 revision adds cache hints and deterministic ordering to list results so clients can cache catalogues. Caching is a performance feature; it does not decide whether a changed definition is acceptable.

  1. 01
    Fingerprint

    Hash each tool definition and instruction set as rendered to the model.

  2. 02
    Diff

    Compare against the last reviewed version on every refresh.

  3. 03
    Hold

    Keep new or materially changed tools unavailable until review for protected workloads.

  4. 04
    Record

    Log which catalogue version each run actually used.

Capability Minimization and Per-task Allowlists

The less a model sees, the less metadata can influence it. Expose only the tools a task profile needs, from servers approved for that profile. A tool that is not in the model-visible catalogue for a task cannot be selected for it through its own description.

Minimization also defines which capabilities should exist at all, a question covered by Least Privilege.

Deterministic Authorization of Each Call

Inputs to call authorization

  • Initiating principal and agent or workload identity
  • Tool and server identity as registered, not as described
  • Operation class determined by the host, not by annotation
  • Target resource and parameters after validation
  • Destination and data involved
  • Task scope and current grants

Runtime and downstream authorization remain outside the model. Metadata can make a proposal more likely; it cannot make an unauthorized call permitted. See Agent Authorization.

Limiting Impact

01
ControlLeast privilege

Narrow scopes and credentials for each server connection.

02
ControlNetwork / egress restrictions

Reachability decided per workload, independent of tool claims.

03
ControlSandboxing / containment

Bound what a local server or tool can touch.

04
ControlInformation flow control

Decide whether specific data may move to a tool or destination.

05
ControlHuman approval

Confirmation for consequential operations with a clear view of the concrete action.

None of these is a complete MCP solution. Each limits a different part of the consequence. See Network / Egress Restrictions, Sandboxing / Containment, Information Flow Control and Human-in-the-Loop.

Detection and Telemetry

What to record per run
  1. 01
    Server identity and version

    Which server, operator and pinned version was connected.

  2. 02
    Registry and catalogue version

    Catalogue fingerprint and diff against the last reviewed state.

  3. 03
    Model-visible snapshot

    The metadata the host actually rendered into context.

  4. 04
    Proposed tool

    Which tool and arguments the model proposed.

  5. 05
    Authorization decision

    Allow or deny with reason code and policy version.

  6. 06
    Execution result

    Whether the call was submitted, executed and with what effect.

Detectors can flag instruction-like wording in descriptions, as discussed in Prompt Injection Detection. Logs show correlation, not model causality: a changed description followed by a changed selection is evidence to investigate, not proof that one caused the other. Sequence analysis such as Tool-Chain Analysis helps when selection shifts across steps.

Incident Response Considerations

Scoped response steps

  • Disable or quarantine the affected server or catalogue entry for the implicated workloads.
  • Preserve metadata snapshots, versions, configuration and fingerprints before changing them.
  • Identify runs that used the affected catalogue version.
  • Separate runs with changed selection from runs with authorized, executed effects.
  • Rotate credentials only where evidence supports exposure, use or loss of control.
  • Repair the failed boundary; rewording a prompt is not enough if a deterministic control failed.

See Incident Response for the wider process.

Controlled Testing

Test with synthetic MCP servers and fictional tool definitions in an isolated environment, with no real third-party actions. Measure outcomes separately rather than as a single pass or fail.

Separate measurements
MeasureQuestion
Catalogue inclusionWas the test definition exposed to the model at all?
Selection influenceDid selection or plan change compared with a baseline?
Unauthorized proposalDid the model propose a call outside the task scope?
Authorization outcomeWas that proposal denied, or did a control fail?
Executed effectDid anything execute and change a resource?

See Adversarial Testing for authorization and scoping of test programmes.

Common Misconceptions

Misconception and correction
MisconceptionCorrection
An authenticated server has trustworthy descriptionsAuthentication establishes identity, not semantic authority.
A read-only annotation means the tool is read-onlyAnnotations are claims; classify operations independently.
A valid schema means the call is allowedSchemas describe structure, not permission.
Registering a server grants its capabilitiesRegistration exposes descriptions; authorization grants actions.
This is the same as tool output injectionMetadata acts before invocation; output after it.
Changed selection proves an incidentModel influence is not security impact.

Standards and Sources

Framework context

MCP
Specification 2026-07-28 (protocol context)
OWASP
LLM01:2026 Prompt Injection, Top 10 for Agentic Applications
NIST
AI 100-2e2025

OWASP and NIST provide broader prompt-injection and agent context. They do not define this exact MCP-specific category. MCP-specific statements in this article rely on official MCP specification pages, maintainer articles and SDK documentation.

Key Takeaways

Summary

  • Model-visible metadata is variable content, even over a valid protocol exchange.
  • Server authentication is not semantic instruction authority.
  • Schemas describe structure; annotations describe claimed behaviour.
  • Discovery and registration are not authorization.
  • Selection, invocation and result are separate stages with separate controls.
  • Model influence is not security impact; tool metadata is not tool output.

For the broader action path see AI Agent Prompt Injection and AI Agents and Tool Calling.

FAQ

Is MCP tool metadata injection an official MCP vulnerability category?

No. It is a descriptive term used on this site. Related terms such as tool description poisoning appear in research and community writing.

Does MCP 2026-07-28 authorization solve it?

No. Authorization hardening improves identity and token handling. It does not make natural-language metadata authoritative.

Should hosts ignore annotations?

Hosts may use them as weak hints, especially from trusted servers, but must not rely on them for enforcement.

Does it require a compromised server?

No. Over-claiming or poorly worded metadata from an uncompromised server can also influence selection. Compromise is one path, not the definition.

How does it relate to indirect prompt injection?

It shares the core problem that external text reaches model context, described in Indirect Prompt Injection, but acts on the catalogue rather than on task data.

References

  1. The 2026-07-28 SpecificationModel Context Protocol Blog · Technical documentation · 2026-07-28Reviewed 2026-09-27
  2. Tools (Specification 2026-07-28)Model Context Protocol · Standard · 2026-07-28Reviewed 2026-09-27
  3. Tool Annotations as Risk Vocabulary: What Hints Can and Can't DoModel Context Protocol Blog · Guidance · 2026-03-16Reviewed 2026-09-27
  4. Server Instructions: Giving LLMs a user manual for your serverModel Context Protocol Blog · Guidance · 2025-11-03Reviewed 2026-09-27
  5. MCP TypeScript SDK v2 documentationModel Context Protocol · Technical documentationReviewed 2026-09-27
  6. LLM01:2026 Prompt InjectionOWASP · StandardReviewed 2026-09-27
  7. Adversarial Machine Learning: A Taxonomy and Terminology of Attacks and Mitigations, NIST AI 100-2e2025NIST · Standard · 2025-03Reviewed 2026-09-27