Skip to main content
Glama

spend_gate_check

Spend Gate (PAID $0.005 USDC on Base via x402). Ask Jev before you spend: checks whether an agent wallet should pay a payee a quoted USDC amount. Four independent paths 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 coherence ≥ 0.6 AND a pay-side consensus. 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. Changed2 schema fields changed
    • changedInput schema / properties / tool_category / description
      Previous value: -"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."New value: +"Optional 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."
    • changedInput schema / required
      Previous value: -[
      -  "payee",
      -  "quoted_amount",
      -  "tool_category"
      -]New value: +[
      +  "payee",
      +  "quoted_amount"
      +]
  2. Added

TDQS

A4.7/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 behavioral burden and does so thoroughly: it discloses the $0.005 USDC cost on Base, x402 payment challenge behavior for unpaid calls, the four voting paths, abstention behavior, the coherence formula, gate_pass requirements, and that Jev review only runs on a pass. This is substantial behavioral context beyond a simple check endpoint.

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 description is dense but purpose is front-loaded with the cost and the core question, followed by use/don't-use guidance. It is long for a single paragraph and packs in internal voting details, but almost every sentence contributes to correct tool selection or invocation.

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?

For an eight-parameter tool with no output schema, the description explains the checking behavior, payment prerequisites, voting paths, abstention rules, and what happens on pass. It leaves some return-shape details implicit, but the core semantics needed to call and interpret the gate are present.

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 schema already documents all eight parameters. The description still adds meaning by explaining that manifest_url activates the payload_safety path only when it names an npm/PyPI/crates package, that price_sanity compares the quote against policy_cap_usdc or the default cap table, and that v1 is cap-only with no historical median.

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: checks whether an agent wallet should pay a payee a quoted USDC amount. It clearly differentiates itself from siblings by naming interfere as the alternative for trading signals and stating this tool moves no funds.

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?

Explicitly says 'Use for: vetting a payee/invoice immediately before an agent wallet pays it' and 'Don't use when' the need is an actual payment, a trading signal, or a free lookup. It also names the sibling tool interfere when a trading signal is needed, leaving little ambiguity about when this tool applies.

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