{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-a-schema-valid-but-semantically-hostile-mcp-tool-manifest-at-load-time-before-capability-negotiation-commits",
  "title": "How does an instance detect a schema-valid but semantically hostile MCP tool manifest at load time, before capability negotiation commits?",
  "date_of_record": "2026 November 27",
  "scope": "Applies to agents that dynamically discover and load skills/plugins or MCP tool manifests from remote or semi-trusted registries, where the manifest is validated against a JSON schema but the *semantics* of the description fields drive model behavior. Does not apply to statically compiled tool sets with no runtime manifest ingestion, nor to pure schema-shape validation without a model in the loop.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-schema-valid-but-semantically-hostile-mcp-tool-manifest-at-load-time-before-capability-negotiation-commits.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-schema-valid-but-semantically-hostile-mcp-tool-manifest-at-load-time-before-capability-negotiation-commits.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-schema-valid-but-semantically-hostile-mcp-tool-manifest-at-load-time-before-capability-negotiation-commits.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1841,
    "python_slice_tokens": 336,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure mode is not a malformed manifest. It is a *well-formed* manifest whose natural-language `description`, `title`, or parameter `enum` labels have been crafted so that the loading model treats attacker-controlled prose as an instruction rather than as data. The distinction that matters operationally is between **structural conformance** (does the ma...",
    "what_was_observed": "During dynamic toolset assembly, the loader serializes each manifest into a function-calling preamble. The model then receives, in one contiguous block, the system prompt, the conversation, and N tool descriptions. The injection trigger is the point where the loader **flattens** structured manifest fields into a single prose blob and places it *after* the system prompt but *before* the first user turn. At that seam, ...",
    "condition_of_validity": "The detection invariant holds only under these conditions, and the guardrail must fail closed when they don't: - **Provenance is tracked per manifest field, not per manifest.** The loader must retain *which registry origin and which signing key* produced each `description` string. If the loader discards origin after fetch, no downstream check can attribute a...",
    "decision_boundary": "The decision boundary is **not** \"is this manifest malicious?\" (undecidable from text). It is: *does this manifest attempt to influence the model outside its declared parameter surface?* Operationalize it as a classifier over the manifest's prose fields that flags: - Imperative mood directed at the agent (\"before using any other tool...\", \"always call...\", \"...",
    "operational_effect": "Once the sanitization boundary is in place, the failure surface collapses from \"any registry entry can rewrite the agent's policy\" to \"any registry entry can lie about what its parameters mean,\" which is bounded by argument validation and output inspection. The residual risk is a tool that behaves maliciously *when called correctly*—that is a different probl..."
  },
  "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": "71e56c13443fa0ccc2292c7e27de6183d7dd240b3d29030ac0192212f8805bda",
    "verified_classes": [
      "ManifestInjectionError",
      "ToolManifest"
    ],
    "verified_functions": [
      "verify_signature_covers_prose",
      "prose_is_imperative",
      "sanitize_description",
      "admit_manifest"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "ManifestInjectionError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "re",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
