Skip to main content
Glama
DeltaX-Public

DeltaX Preflight

Official

preflight_hash_policy

Read-onlyIdempotent

Validates a Preflight v2 policy and returns its canonical SHA-256 digest, letting you pin owner-controlled rules outside an untrusted proposal. Invalid policies return an error, not a hash.

Instructions

Validate a Preflight v2 policy and return {policy_hash}, its canonical SHA-256 digest. Invalid policies return a tool error, not a hash.

When to use

  • To pin owner-controlled rules outside an untrusted proposal.

When NOT to use

  • Do not treat a caller-supplied hash as proof of policy ownership. Use preflight_check to evaluate candidates once policy and evidence are ready.

Input Schema

NameRequiredDescriptionDefault
policyYesOwner-controlled Preflight v2 object with schema_version "2", policy_id, and 1-100 hard constraints using eq, in, lte, gte, or exists.

Output Schema

NameRequiredDescriptionDefault
policy_hashYesCanonical SHA-256 digest.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.1.4
    • addedInput schema / properties / policy / examples
      Added value: +[
      +  {
      +    "constraints": [
      +      {
      +        "id": "approved",
      +        "op": "eq",
      +        "path": "/approved",
      +        "source": "candidate",
      +        "value": true
      +      }
      +    ],
      +    "kind": "policy",
      +    "policy_id": "example-policy",
      +    "schema_version": "2"
      +  }
      +]
  2. Changed1 schema field changedv0.1.3
    • addedInput schema / properties / policy / type
      Added value: +"object"
  3. Changed2 schema fields changedv0.1.2
    • changedInput schema / properties / policy / description
      Previous value: -"Preflight v2 policy JSON document."New value: +"Owner-controlled Preflight v2 object with schema_version \"2\", policy_id, and 1-100 hard constraints using eq, in, lte, gte, or exists."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "policy_hash": {
      +      "description": "Canonical SHA-256 digest.",
      +      "pattern": "^[a-f0-9]{64}$",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "policy_hash"
      +  ],
      +  "type": "object"
      +}
  4. First observed

TDQS

A4.7/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already carry readOnlyHint, idempotency, non-destructiveness and closed-world scope, so the safety profile is covered. The description still adds real behavioral value: invalid policies raise a tool error rather than returning a hash, and it warns against trusting externally supplied hashes. Minor gap: no statement about determinism across schema-equivalent policy shapes beyond the 'canonical' wording.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded outcome sentence followed by two short scoped sections; every line either states behavior or routes to an alternative. No filler and no repetition of schema details.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Output schema exists and the description still names the returned field and the failure mode (tool error, no hash). Combined with the ownership caveat, an agent has everything needed to call it correctly in the pin-then-check workflow.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Single parameter with 100% schema description coverage including an inline example, so the schema does the heavy lifting. The description adds only that validation is against the v2 policy structure; the constraint ops and count limits live in the schema, which is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a concrete verb (validate) plus the resource (Preflight v2 policy) and the exact return ({policy_hash}, canonical SHA-256 digest). It also delineates the boundary against sibling preflight_check, so an agent can pick it without inspecting schemas.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit 'When to use' (pinning owner-controlled rules outside an untrusted proposal) and 'When NOT to use' (don't treat a caller-supplied hash as proof of ownership), with the correct alternative named — preflight_check for evaluating candidates. Nothing is left to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.