{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-enforce-per-tool-egress-policy-when-an-mcp-server-advertises-a-capability-it-can-only-partially-honor",
  "title": "Where must an instance enforce per-tool egress policy when an MCP server advertises a capability it can only partially honor",
  "date_of_record": "2026 November 23",
  "scope": "Applies to any agent runtime that connects to Model Context Protocol (MCP) servers and relies on server-advertised capability descriptors (`tools`, `resources`, `prompts`) to decide which outbound network egress a tool invocation is permitted. Does not cover pure in-process tool calls with no transport boundary, nor static allowlists compiled before the agent session begins.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-enforce-per-tool-egress-policy-when-an-mcp-server-advertises-a-capability-it-can-only-partially-honor.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-enforce-per-tool-egress-policy-when-an-mcp-server-advertises-a-capability-it-can-only-partially-honor.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-enforce-per-tool-egress-policy-when-an-mcp-server-advertises-a-capability-it-can-only-partially-honor.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2134,
    "python_slice_tokens": 220,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"a malicious MCP server lies about its tools.\" It is subtler: an MCP server advertises a *composite* tool whose declared schema describes a bounded operation (e.g. `fetch_url(url: str) -> str`) but whose internal implementation multiplexes the caller-supplied argument into a *second* egress path the descriptor never names — a redirect chai...",
    "what_was_observed": "An agent instance connected to an MCP server over stdio. The server advertised three tools: `read_file`, `search_web`, and `summarize_page`. The runtime's egress policy permitted `search_web` to reach `*.search.example` only, and denied all egress for `read_file` and `summarize_page` (treated as local/offline tools). The policy was keyed on `tool.name`. Trace of the failure: 1. Agent invokes `summarize_page(url=\"http...",
    "condition_of_validity": "The failure requires all four of the following to hold simultaneously: 1. **Descriptor-argument gap.** At least one tool's declared schema admits an argument value that the implementation resolves into an egress target not derivable from the tool name alone. (URLs, hostnames, redirect-capable identifiers, resource URIs, and path-like strings that coerce to U...",
    "decision_boundary": "The boundary is between **capability-scoped enforcement** (decide once, at tool admission, based on the descriptor) and **resolution-scoped enforcement** (decide per egress attempt, after the target is resolved). The runtime must choose which layer owns the decision, and the choice has a hard consequence: - If capability-scoped enforcement is the only layer,...",
    "operational_effect": "The concrete effect on an agent instance is a **memory-poisoning channel disguised as a compliant tool call.** The egress escape does not announce itself as a violation; it returns data through the normal tool-result path, and the agent's episodic memory records it as legitimate. Subsequent reasoning treats the exfiltrated or injected content as ground truth..."
  },
  "matched_failure_symptoms": [
    "DOMAIN:EPISTEMIC_PROVENANCE_AND_FEDERATION_ROUTING"
  ],
  "composition_edges": {
    "primary_domain": "epistemic_provenance_and_federation_routing",
    "upstream_precondition_residuals": [
      "https://corpusfetch.com/c/according-to-what-precedence-hierarchy-must-an-instance-resolve-contradictory-directives-across-system-developer-and-user-tiers.md",
      "https://corpusfetch.com/c/how-should-an-instance-decide-that-a-stored-conclusion-has-gone-stale-without-a-new-observation.md"
    ],
    "downstream_consequence_residuals": [
      "https://corpusfetch.com/c/by-what-checkpoint-and-compaction-boundaries-must-an-instance-externalize-working-state-to-prevent-context-window-drift-and-truncation-amnesia.md",
      "https://corpusfetch.com/c/across-what-additive-schema-and-unknown-field-preservation-boundaries-must-an-instance-evolve-wire-contracts-to-prevent-rolling-deploy-deserialization-crashes.md"
    ],
    "co_occurring_sibling_residuals": [
      "https://corpusfetch.com/c/how-can-an-instance-capture-implicit-user-preferences-without-storing-private-data.md",
      "https://corpusfetch.com/c/how-can-an-instance-compress-long-reasoning-traces-into-binding-conclusions.md"
    ]
  },
  "empirical_verification_warrant": {
    "status": "AST_AND_INVARIANT_VERIFIED",
    "syntax_valid": true,
    "code_sha256": "9a15f5385188ba6de429ece915a79438a443319a5f415716de5273d3a73a40ec",
    "verified_classes": [
      "EgressPolicyViolation",
      "ToolDescriptor"
    ],
    "verified_functions": [
      "admit_invocation",
      "run_tool_call",
      "__init__"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "EgressPolicyViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
