{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-capability-scoped-mcp-tool-grants-from-silently-widening-across-a-re-negotiated-session",
  "title": "Which invariants prevent capability-scoped MCP tool grants from silently widening across a re-negotiated session",
  "date_of_record": "2026 November 27",
  "scope": "Applies to MCP (Model Context Protocol) clients that bind a per-tool capability grant to a session and re-negotiate `tools/list` mid-session (e.g., after server restart, hot-reload, or dynamic tool registration). Does not apply to stateless one-shot tool invocations where the grant is re-derived per call from an authoritative policy store.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-capability-scoped-mcp-tool-grants-from-silently-widening-across-a-re-negotiated-session.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-capability-scoped-mcp-tool-grants-from-silently-widening-across-a-re-negotiated-session.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-capability-scoped-mcp-tool-grants-from-silently-widening-across-a-re-negotiated-session.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2049,
    "python_slice_tokens": 302,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two distinct things an MCP client believes it is holding when it authorizes a tool call: 1. **A capability grant** — a policy decision: \"this agent identity may invoke tool `X` with argument shape `S`.\" 2. **A tool descriptor binding** — a reference to a specific `(server, tool_name, schema_hash)` tuple that the grant was evaluated against. The fai...",
    "what_was_observed": "A filesystem MCP server exposed three tools at session start: The client held a scoped grant: agent `analyst-7` may call `read_file` and `list_dir`; `write_file` was explicitly *denied* by policy (read-only analyst role). The grant was stored as a set of allowed tool names, resolved per call by string lookup, with the deny list checked first. At T+40min the server process was restarted by its supervisor to pick up a ...",
    "condition_of_validity": "The name-keyed grant model is only sound under a condition that MCP does not guarantee: > **The tool descriptor bound to a name is immutable for the lifetime of the grant.** This holds if and only if all of the following are true: - The server's tool surface is frozen after `initialize` (no dynamic registration, no hot-reload, no feature-flagged schema varia...",
    "decision_boundary": "The decision the client must make at every tool call is not \"is this tool name allowed\" but: The boundary that matters operationally is the third and fourth clauses. When `descriptor_hash` differs from `grant.bound_hash`, the client has exactly two correct responses: - **Re-evaluate** the grant against the new descriptor and require an explicit policy decisi...",
    "operational_effect": "Concretely, the guardrail changes three things in the client's tool-dispatch path: 1. **Grants carry a descriptor fingerprint.** At grant time, store `(tool_name, canonical_schema_hash, arg_constraints)`. The canonical hash is computed over a normalized descriptor (sorted keys, defaults elided) so cosmetic reordering does not false-positive. 2. **Every dispa..."
  },
  "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": "d01829c816fa1dbebcc0111e9aaea5570d5baf359d709523897acc91c1d5f3fd",
    "verified_classes": [
      "CapabilityWidenedError",
      "DescriptorDriftError",
      "Grant"
    ],
    "verified_functions": [
      "canonical_hash",
      "_param_names",
      "classify_drift",
      "authorize_call"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "CapabilityWidenedError",
      "DescriptorDriftError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "json",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
