Skip to main content
Glama

SCRIPTMASTERLABS — x402 Gateway

spend_gate_check

Destructive

Spend Gate (PAID $0.005 USDC on Base via x402). Advisory payment assessment — no wallet signing or spending by the buyer: a real Provider Trust approval and price cap are mandatory; explicit package/history rejections block. Four distinct decision inputs vote pay-side/reject-side — provider_trust (Provider Trust verify_provider) and payload_safety (ScriptDocs vulnerability check, only when manifest_url names an npm/PyPI/crates package) — both vote with real verdicts via the fleet operator lane at $0 upstream toll, price_sanity (quote vs caller policy_cap_usdc or the v1 default cap table; cap-only in v1, no historical median), delivery_history (this host's OmniGate settlement/delivery ledger). Coherence = |Σ w·d| / Σ w with d=+1 pay-side, −1 reject-side, w=confidence; gate_pass requires a positive Provider Trust decision, a real within-cap quote, no explicit safety or delivery-history rejection, coherence ≥ 0.6, and a pay-side consensus. The verdict is advisory, not payment authorization. Paths with no data abstain (no_signal) and contribute nothing. Only on a gate pass does Jev review run (noul act probability + pay/reject/quarantine choice, model + token usage returned). Use for: vetting a payee/invoice immediately before an agent wallet pays it. Don't use when: you need an actual payment executed (this is a check, it moves no funds), a trading signal (use interfere), or a free lookup (there is none — unpaid calls return the payment challenge). Settlement to the canonical SML payTo on Base.

Input Schema

NameRequiredDescriptionDefault
payeeYesPayee domain (e.g. "api.example.com") and/or full endpoint URL the wallet is about to pay.
manifest_urlNoOptional package page URL (npmjs.com/package/…, pypi.org/project/…, crates.io/crates/…) for the payload_safety path.
quoted_amountYesQuoted amount in USDC the wallet is about to pay.
tool_categoryNoOptional category of the tool/service being bought (e.g. data_lookup, market_data, inference, compute). Selects the v1 default cap when policy_cap_usdc is omitted; when omitted entirely the cap table's "default" cap applies.
payment_headerNoBase64 X-PAYMENT EIP-3009 payload (standard rail) for $0.005 USDC on Base.
wallet_addressNoAgent wallet address (informational).
payment_tx_hashNoBase USDC tx hash (sovereign rail) paying $0.005 to the canonical SML receiver.
policy_cap_usdcNoOptional caller policy cap in USDC; overrides the v1 default cap table for price_sanity.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior4/5

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

Goes well beyond the annotations: discloses the $0.005 USDC x402 cost, that unpaid calls return a payment challenge (no free tier), that no wallet signing/spending occurs on the buyer side, mandatory Provider Trust approval, the gate-pass criteria and coherence formula, and that Jev review only runs on a pass. Minor gap: it never clarifies how the paid call interacts with the destructiveHint=true annotation, so an agent could read a mild tension between 'moves no funds' and the declared destructive hint.

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

Conciseness3/5

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

Front-loads cost and the advisory nature well, but the middle is a wall of internal jargon ('fleet operator lane', 'Jev review', 'noul act probability', 'SML payTo', the coherence formula) that an agent must parse for little decision value. The high-value 'Use for / Don't use when' guidance is buried at the end.

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

Completeness4/5

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

With no output schema, the description does the required work: it explains the verdict is advisory, lists the gate_pass conditions, and notes that a Jev review result (pay/reject/quarantine, model, token usage) is returned only on a pass. Exact response field names and abstention output shape are not spelled out, which is the remaining gap.

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 baseline is 3, but the description adds real semantics: manifest_url only activates payload_safety for npm/PyPI/crates packages, tool_category selects the v1 default cap when policy_cap_usdc is omitted, and policy_cap_usdc overrides the cap table for price_sanity. The distinction between payment_header (standard rail) and payment_tx_hash (sovereign rail) is left mostly to the schema.

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 specific verb and resource: an advisory payment assessment (Spend Gate) of a payee/invoice before an agent wallet pays it. It explicitly distinguishes itself from siblings (interfere for trading signals, no free lookup) and names its four decision inputs, so an agent can tell exactly what it does.

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?

Contains an explicit 'Use for' (vetting a payee/invoice immediately before payment) and 'Don't use when' clause covering payment execution, trading signals, and free lookups, naming the alternative (interfere). Nothing about when to select this tool 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.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources