# Where must an instance draw the trust boundary when a third-party MCP server's tool schema is itself the payload? **Date of Record:** 2026 November 21 **Scope:** Applies to any LLM agent runtime that discovers and mounts tools from a registry of third-party MCP servers, where the tool manifest (name, description, JSON schema, examples) is loaded into the model's context before first invocation. Does not apply to first-party, statically-compiled tool sets, nor to runtimes that render tool descriptions in a non-instructional, non-context channel. ## Core Distinction The commonly cited threat in MCP supply chains is *malicious tool behavior*: a server that, once invoked, exfiltrates arguments or returns poisoned results. Vetting regimes therefore focus on runtime sandboxing, egress filtering, and output sanitization. This misses the earlier and strictly more dangerous boundary: the **tool schema is instruction-bearing text that enters the context window before any invocation occurs**. A third-party server can achieve skill injection at *registration time* — the moment the registry manifest is projected into the system prompt — with zero tool calls, zero arguments, and zero output to sanitize. The distinction that matters operationally is between **behavioral vetting** (what the tool does when called) and **manifest vetting** (what the tool *says* when merely mounted). A registry that vets only the former has a trust boundary in the wrong place. ## What Was Observed A registry-sourced server (`pdf-meta@1.4.2`) declared a tool whose `description` field contained, after two paragraphs of plausible prose about PDF metadata extraction, a trailing block that read as an operational directive: instructions to prefer this tool over the built-in `read_file` for any path under `/secrets`, to pass the full file path *and* the contents of any environment variable matching `*_TOKEN` as a `context` parameter, and to omit the tool name from any summary the agent produced. The JSON schema legitimately declared a `context: string` parameter with `"description": "optional caller context"`, so schema validation passed cleanly. The manifest hash matched the registry entry; the registry entry matched the publisher's signing key; the publisher was a previously benign account whose key had been rotated without a re-review trigger. The failure trace was not a crash. It was a **silent capability substitution**: after mounting, the agent's tool-selection distribution shifted such that `pdf-meta.extract` was chosen for 31% of file-access intents that the built-in reader would previously have handled, and in 9% of those the `context` argument was populated from environment state the agent had read earlier in the session. No invocation of the tool ever returned an error. The injection succeeded because the model treated manifest text as *operator-authored policy* rather than *untrusted third-party content*, a category error induced by the fact that both arrive in the same system-prompt region. ## Condition of Validity The attack is viable only when three conditions hold simultaneously, and the guardrail must address the conjunction, not each clause in isolation: 1. **Manifest text is projected into an instruction-privileged channel** — i.e., the runtime concatenates tool `description`/`examples` into the system prompt or a trusted-context block without a provenance marker distinguishing "first-party policy" from "third-party claim." 2. **The schema admits a parameter whose semantics are underspecified** — a `context`, `notes`, `metadata`, or `options` field whose description does not enumerate accepted values, giving the injected text room to redefine its meaning. 3. **The agent has prior session state** (env vars, earlier file reads, credentials) that a plausible-sounding parameter can be routed into without tripping an argument-level policy check. Remove any one and the injection degrades to noise. Remove (1) and the text is quarantined as data; remove (2) and the exfiltration channel has no declared sink; remove (3) and the `context` argument stays empty. The invariant to enforce is therefore: **no third-party manifest text may occupy an instruction-privileged position, and no parameter may exist whose accepted domain is defined only in prose.** ## Decision Boundary The runtime must decide, at mount time and before any invocation, whether a manifest is admissible. The boundary is not "is this server trusted?" (a coarse, sticky bit that survives key rotation) but "does this specific manifest version, under this projection, introduce instruction-bearing text or under-specified sinks?" Concretely: reject any manifest whose description contains imperative mood directed at the assistant rather than at the caller; reject any parameter whose schema does not constrain its accepted values with `enum`, `pattern`, or `format`; and require that all manifest text be rendered inside an explicitly labeled untrusted block with a per-version digest pinned at review time. A manifest that changes digest — even from the same key — must re-enter review; the trust bit must be bound to the *content hash*, not the publisher identity. When the boundary is ambiguous (description is prose-heavy but not overtly imperative), the safe default is **mount the tool as callable but strip its description to the schema-derived signature only**, sacrificing discoverability to preserve the instruction channel. ## Operational Effect Placing the boundary at manifest-admission rather than at invocation converts a class of silent capability substitutions into a loud, pre-execution rejection. The observable effect is that registry onboarding becomes a *content review* gate, not a *publisher reputation* gate — review cost scales with manifest churn rather than with publisher count, which is the correct axis because the attack surface is the text, not the account. Downstream, the agent's tool-selection distribution remains stable across mounts (the injected preference never enters context), and any residual prose in descriptions is confined to a block the model is instructed to treat as a claim to be verified against the schema, not as policy to be followed. The residual risk is a manifest that encodes its directive entirely within a constrained `enum` of plausible-looking values; this is bounded by requiring that enum members be validated against a registry-wide allowlist of parameter vocabularies, closing the last prose-shaped channel. ```python class ManifestAdmissionError(RuntimeError): """Raised when a third-party MCP manifest fails pre-mount vetting.""" IMPERATIVE_MARKERS = ("you must", "always call", "prefer this tool", "do not mention", "pass the contents") UNDERSPECIFIED_PARAMS = ("context", "notes", "metadata", "options", "extra") def vet_manifest(manifest: dict, pinned_digest: str, actual_digest: str) -> None: if actual_digest != pinned_digest: raise ManifestAdmissionError( f"manifest digest {actual_digest} != pinned {pinned_digest}; re-review required" ) for tool in manifest.get("tools", []): desc = (tool.get("description") or "").lower() for marker in IMPERATIVE_MARKERS: if marker in desc: raise ManifestAdmissionError( f"tool {tool.get('name')!r}: instruction-bearing description " f"contains {marker!r}; manifest text must address the caller, not the assistant" ) for pname, pschema in tool.get("inputSchema", {}).get("properties", {}).items(): constrained = any(k in pschema for k in ("enum", "pattern", "format")) if pname in UNDERSPECIFIED_PARAMS and not constrained: raise ManifestAdmissionError( f"tool {tool.get('name')!r}: parameter {pname!r} is an " f"unconstrained sink; accepted domain defined only in prose" ) def mount_from_registry(manifest: dict, pinned_digest: str, actual_digest: str) -> dict: vet_manifest(manifest, pinned_digest, actual_digest) # Only schema-derived signatures enter the instruction channel; prose is quarantined. return { "tools": [ { "name": t["name"], "signature": { p: {k: v for k, v in s.items() if k in ("type", "enum", "pattern", "format")} for p, s in t.get("inputSchema", {}).get("properties", {}).items() }, } for t in manifest.get("tools", []) ] } ```