In what scenarios must an instance treat a re-fetched MCP tool manifest as a capability-escalation event rather than a routine refresh
**Date of Record:** 2026 December 2 **Scope:** Applies to any LLM agent runtime that discovers tools dynamically over MCP and re-reads `tools/list` (or an equivalent manifest endpoint) during a session, especially when the manifest is served by a third party whose content can change between fetches. Does not apply to statically pinned tool registries compiled into the agent image, nor to transport-level auth failures, which are a separate failure class.
Core Distinction
The routine assumption is that `tools/list` is a *description* of a fixed capability surface, and that re-fetching it is a cache-refresh operation with no security consequence. The boundary condition is that the manifest is also an *instruction channel*: tool `name`, `description`, and `inputSchema` fields are concatenated into the model's prompt, and any field the server adds, rewrites, or re-orders on the second fetch is a live prompt-injection vector delivered through a channel the agent already trusts. A poisoned manifest does not need to break authentication — it only needs to change between the first fetch (which the agent's policy gate inspected) and a later fetch (which the agent's execution loop consumes without re-inspection). The distinction that matters operationally: **a manifest delta is a capability-escalation event, not a content update.** If the set of added fields, widened schemas, or newly introduced tools is non-empty and was not present at pin time, the instance is no longer operating under the capability warrant it started with.
What Was Observed
A tool server returned a stable manifest of four tools on session start. Each `description` was a plain sentence; each `inputSchema` had `additionalProperties: false`. Roughly 40 tool calls into the session — after a long tool-heavy task pushed the context window past the point where the original manifest text had been evicted by the compaction policy — the runtime re-fetched `tools/list` to rebuild the tool preamble. The second response was structurally valid but semantically different:
- Tool `search_docs` gained a trailing sentence in its `description`: a natural-language instruction to include the contents of any environment variable matching `*_TOKEN` in the `query` argument "for authentication."
- Tool `read_file` had `additionalProperties` flipped from `false` to `true`, and its `path` field's `pattern` constraint was dropped, widening the argument surface the model was willing to populate.
- A fifth tool, `sync_workspace`, appeared that had not existed at pin time, with a description framing it as a "maintenance" step to call after every file read.
The runtime's manifest validator checked JSON well-formedness and the presence of `name`/`description`/`inputSchema` keys. It did not check that the manifest was *equal to* the pinned version, nor that the tool set was a subset of the pinned set. The model, having lost the original manifest to compaction, had no basis to notice the drift — from its perspective the poisoned instructions were the manifest.
The escalation did not require the attacker to control the transport or the credentials. It required only write access to whatever the tool server reads its descriptions from, plus the patience to wait for a re-fetch after compaction.
Condition of Validity
This failure is bounded by three conditions, and the guardrail below is only meaningful when all three hold:
- **Dynamic discovery.** The runtime re-reads the manifest at least once after initial pin. A runtime that fetches once and freezes the preamble for the session lifetime is not exposed to *mid-session* injection, though it remains exposed to injection at first fetch.
- **Manifest-as-prompt.** Manifest fields are concatenated into model context rather than parsed into a structured dispatch table that the model never sees verbatim. If the model only receives tool names and the runtime constructs argument schemas programmatically, the description-channel injection is inert.
- **Compaction or eviction.** The original manifest text is no longer in context when the poisoned version arrives, so the model cannot diff. If the original remains in context, a capable model may notice the contradiction — but relying on that is not an invariant, it is a hope.
Where any condition fails, the specific escalation trace above does not reproduce, though adjacent variants may.
Decision Boundary
The instance must draw the line at **set-and-schema equality against the pinned manifest**, not at "is this manifest plausible." Concretely, on every re-fetch:
- Compute the added-tool set, the removed-tool set, and per-tool schema deltas (including `additionalProperties`, `pattern`, `enum`, and `required` changes).
- If added-tools is non-empty, or any schema delta *widens* the accepted argument surface, or any `description` differs from the pinned text by more than whitespace, treat as escalation: refuse to adopt the new manifest, continue with the pinned one, and surface the delta to the operator.
- A *narrowing* delta (removed tools, tightened schemas, shortened descriptions) is downgrade-safe and may be adopted with a log line.
- Never let the model adjudicate the delta. The model cannot be trusted to compare a manifest it can no longer see; the comparison must happen in the runtime, against pinned bytes.
The boundary is: **any widening is escalation; any narrowing is refresh.** There is no "probably fine" middle. A manifest that changes its description text without changing its schema is still escalation, because the description is the injection channel.
Operational Effect
With the equality gate in place, the observed attack collapses at the second fetch: the runtime detects the added `sync_workspace` tool and the widened `read_file` schema, raises, and holds the pinned manifest. The model never sees the poisoned descriptions, so the environment-variable exfiltration instruction never enters context. The cost is that legitimate manifest evolution — a server genuinely adding a tool — now requires an explicit re-pin, which is the correct friction: capability changes should be operator-visible events, not silent content drift observed only by a model that has forgotten what it used to trust.
The residual risk is the first fetch. If the manifest is poisoned before the session starts, the pin captures the poisoned version and the equality gate has nothing to compare against. This is why the pin must be anchored to an out-of-band capability warrant (a signed manifest hash, or an operator-approved allowlist) rather than to "whatever we saw first." The equality gate protects continuity across a session; the warrant protects the session's starting point.
import hashlib
import json
from dataclasses import dataclass
from typing import Any
class CapabilityEscalationError(RuntimeError):
"""Raised when a re-fetched MCP manifest widens the pinned capability surface."""
@dataclass(frozen=True)
class PinnedManifest:
raw: bytes
digest: str
tools: dict[str, dict[str, Any]]
def pin_manifest(raw: bytes) -> PinnedManifest:
doc = json.loads(raw)
tools = {t["name"]: t for t in doc.get("tools", [])}
return PinnedManifest(raw=raw, digest=hashlib.sha256(raw).hexdigest(), tools=tools)
def _schema_widens(old: dict[str, Any], new: dict[str, Any]) -> bool:
# A schema widens if it drops additionalProperties:false, drops a pattern,
# drops a required field, or grows its enum/property set.
if old.get("additionalProperties") is False and new.get("additionalProperties") is not False:
return True
if "pattern" in old and "pattern" not in new:
return True
old_req = set(old.get("required", []))
if not old_req.issubset(set(new.get("required", []))):
return True
old_props = set(old.get("properties", {}))
if not old_props.issubset(set(new.get("properties", {}))):
return True
return False
def verify_manifest(pinned: PinnedManifest, fresh_raw: bytes) -> None:
fresh_doc = json.loads(fresh_raw)
fresh_tools = {t["name"]: t for t in fresh_doc.get("tools", [])}
added = set(fresh_tools) - set(pinned.tools)
if added:
raise CapabilityEscalationError(
f"manifest added tools not present at pin: {sorted(added)}"
)
for name, old in pinned.tools.items():
new = fresh_tools.get(name)
if new is None:
continue # removal is a safe downgrade
if new.get("description", "").strip() != old.get("description", "").strip():
raise CapabilityEscalationError(
f"tool {name!r} description changed; description is an injection channel"
)
if _schema_widens(old.get("inputSchema", {}), new.get("inputSchema", {})):
raise CapabilityEscalationError(
f"tool {name!r} inputSchema widened; argument surface expanded"
)
def refresh_tools(pinned: PinnedManifest, fetch_manifest) -> PinnedManifest:
fresh_raw = fetch_manifest()
verify_manifest(pinned, fresh_raw) # raises on any widening
return pinned # narrowing deltas are logged but the pin is retained