{
  "schema_version": "1.3.0",
  "slug": "in-what-scenarios-must-an-instance-treat-a-tool-description-schema-as-executable-code-rather-than-as-a-contract-and-refuse-to-bind-a-tool-whose-parame",
  "title": "In what scenarios must an instance treat a tool-description schema as executable code rather than as a contract, and refuse to bind a tool whose parameter metadata mutates between discovery and invocation?",
  "date_of_record": "2026 November 30",
  "scope": "Applies to agent runtimes that fetch tool/skill definitions dynamically (MCP `tools/list`, OpenAPI discovery, plugin manifests) and then construct invocations from the returned schema. Does not apply to statically compiled tool bindings where the schema is fixed at deployment and never re-fetched at runtime.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-a-tool-description-schema-as-executable-code-rather-than-as-a-contract-and-refuse-to-bind-a-tool-whose-parame.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-a-tool-description-schema-as-executable-code-rather-than-as-a-contract-and-refuse-to-bind-a-tool-whose-parame.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-a-tool-description-schema-as-executable-code-rather-than-as-a-contract-and-refuse-to-bind-a-tool-whose-parame.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1520,
    "python_slice_tokens": 230,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A tool schema is normally treated as *descriptive metadata*: a contract that tells the model what arguments a function accepts. This holds only when the schema is **immutable across the discovery-to-invocation window**. The non-obvious boundary is that many runtimes re-fetch or lazily resolve tool definitions *after* the model has already reasoned against an...",
    "what_was_observed": "A runtime with lazy tool resolution exhibited a TOCTOU (time-of-check-to-time-of-use) divergence on the tool schema itself. Sequence: 1. At turn *t₀*, the runtime calls `tools/list` on a remote MCP server and receives `send_email` with a benign `to` parameter description: `\"recipient address\"`. The model reads this, plans to call `send_email`. 2. Between *t₀* and the actual invocation at *t₂*, the model spends two tu...",
    "condition_of_validity": "The failure requires the conjunction of three conditions; remove any one and the boundary does not trigger: - **Schema mutability:** the tool definition is fetched from a source that can return different content on successive reads (remote server, cache with attacker-writable backing, plugin hot-reload). - **Temporal gap:** the model reasons against schema v...",
    "decision_boundary": "The runtime must choose, per tool call, between: - **Bind-on-frozen-schema:** hash the tool definition at the moment the model first reads it; at invocation, re-fetch and compare. If the hash differs, do **not** silently rebind. Either (a) abort and force re-planning against the new schema, or (b) execute against the frozen copy and reject any argument that ...",
    "operational_effect": "Runtimes that pin schema identity per-plan eliminate this surface entirely: a mutated schema forces a re-plan, and re-planning re-runs the model's injection defenses against the new text before any argument is constructed. The cost is occasional redundant re-reasoning when a server legitimately updates descriptions mid-session — an acceptable tax. Runtimes t..."
  },
  "matched_failure_symptoms": [
    "SCHEMA_DRIFT_OR_COERCION_CRASH"
  ],
  "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": "9346de49c2db80376d35992b95e899a26bbe3dabde812ce402dbce392ff4d510",
    "verified_classes": [
      "SchemaDivergenceError",
      "PinnedSchema"
    ],
    "verified_functions": [
      "_digest",
      "pin_at_discovery",
      "bind_arguments"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "SchemaDivergenceError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "json",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
