Skip to main content
Glama

preflight_gate

Validate crypto transactions and x402 payment requests before signing; returns PASS, CAUTION, or BLOCK with reasons and a short-lived receipt so unsafe intents stop early.

Instructions

Call this BEFORE signing any crypto transaction or x402 payment request. Returns PASS / CAUTION / BLOCK with typed reasons, the checks that actually ran, the checks that did not, and a short-lived receipt bound to the exact intent + block. If sign_allowed is false, DO NOT SIGN. If requires_ack is true, surface the reasons to the operator before signing. The receipt expires (default 90s): call again rather than reuse it. Free. Pass from (the wallet that will sign) to enable simulation and balance checks. For kind=transaction, chainId is REQUIRED (400 missing_chain without it). For payment intents with no from or no proof, the response is PASS with structural_only:true and names what was not checked. Optional caller-supplied checks: policy.sellerPayoutWallets is a payout allowlist, not provenance; policy.sellerPayoutManifest fetches a seller-signed manifest from a caller-pinned HTTPS origin and is the only source of payee_payout_binding; policy.obligation checks a local settled-key ledger and cumulative spend against a grant. The gate does not persist either state.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "kind": "<kind>"
    },
    "name": "preflight_gate"
  }
}

Input Schema

NameRequiredDescriptionDefault
toNoTransaction target (required when kind=transaction)
dataNo0x calldata for the transaction
fromNoThe wallet that will sign. Strongly recommended: enables simulation and balance checks.
kindYespayment = an x402 402 challenge; transaction = a chain transaction
valueNoNative value in wei, as a decimal string
policyNoOperator policy. Omit for structural checks only.
chainIdNoEVM chain id: 1 Ethereum, 42161 Arbitrum, 8453 Base. For payment, cross-checks the network.
paymentNoRequired when kind=payment
ttlSecondsNoReceipt lifetime in seconds, 15-300 (default 90)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.1.3
    • changedInput schema / properties / payment / properties / network / description
      Previous value: -"CAIP-2 network, e.g. \"eip155:8453\" for the live mainnet rail, \"eip155:84532\" for the testnet demo, or \"solana:...\""New value: +"CAIP-2 network, e.g. \"eip155:8453\" for Base mainnet, or \"solana:...\""
  2. Changed1 schema field changedv0.1.1
    • changedInput schema / properties / payment / properties / network / description
      Previous value: -"CAIP-2 network, e.g. \"eip155:84532\" for the public demo or \"solana:...\""New value: +"CAIP-2 network, e.g. \"eip155:8453\" for the live mainnet rail, \"eip155:84532\" for the testnet demo, or \"solana:...\""
  3. First observed

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so: it discloses the three-tier verdict, typed reasons, which checks ran vs. did not, receipt binding to intent + block, default 90s expiry, cost (free), and that neither the obligation ledger nor other state is persisted. It also pins the one authoritative provenance source (sellerPayoutManifest) and warns that sellerPayoutWallets is an allowlist, not provenance.

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

Conciseness4/5

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

The critical instruction (call before signing, do not sign on false) is front-loaded and no sentence is pure filler. The back half is dense, semicolon-chained policy prose that is harder to scan than the opening, which keeps it from a 5.

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?

For a 9-parameter, nested-policy safety gate with no output schema, the description still explains the return contract (verdict tiers, reasons, receipt lifetime) and the failure modes (missing chainId, structural-only passes). Nothing an agent needs to invoke it safely is missing.

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?

Schema coverage is 100%, so the baseline is 3, and the description exceeds it by explaining consequences: `from` enables simulation and balance checks, chainId is required for kind=transaction with a specific 400 missing_chain failure, and ttlSeconds defaults to 90. It does not add meaning for every policy field (e.g., allowedTo, maxValueEth, forbidUnlimitedApproval are left to the schema), so it stops short of a 5.

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?

Opening sentence states a specific verb, timing, and resource: call before signing a crypto transaction or x402 payment request, returning PASS/CAUTION/BLOCK. It is clearly distinguishable from siblings like inspect_402 or get_assurance because it is a pre-signature enforcement gate rather than an inspector.

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 (before any signature), explicit when-not (do not sign if sign_allowed is false), explicit follow-ups (surface reasons when requires_ack is true, re-call rather than reuse an expired receipt). It also defines a degraded mode: no `from`/proof yields PASS with structural_only:true naming what was unchecked.

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