Skip to main content
Glama

alalanet — check before you pay

Decide before paying an x402 endpoint

preflight_payment
Read-only

Call this right before you sign an x402 payment. Pass the endpoint url and the 402 it returned (PAYMENT-REQUIRED header value or JSON body), optionally your max_usd. Each payment option gets allow / hold / block with reasons (pay_to_unknown, pay_to_sanctioned, pay_to_frozen_by_issuer, price_above_listing, service_not_working, over_budget, low_trust_score ...). The decision is signed, bound to the payment hash, logged, and valid for 5 minutes. allow: pay; hold: ask your operator first; block: do not pay.

Input Schema

NameRequiredDescriptionDefault
urlYeshttps URL of the x402 endpoint you are about to pay
max_usdNoyour budget for this one call in US dollars; options above it are blocked
payment_requiredNothe 402 the endpoint returned: x402 PAYMENT-REQUIRED header value (base64) or JSON body, or an MPP WWW-Authenticate: Payment value; omit to judge the terms alalanet last observed

Output Schema

NameRequiredDescriptionDefault
chooseNo
meaningYes
optionsYes
serviceNo
decisionYes
expires_atYes
attestationNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior5/5

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

Beyond the annotations (readOnly, openWorld, not idempotent), the description discloses that the decision is signed, bound to the payment hash, logged, and valid for five minutes, plus the concrete reason vocabulary (pay_to_unknown, pay_to_sanctioned, pay_to_frozen_by_issuer, over_budget ...). That is real behavioral context an agent cannot infer from the schema, and it is consistent with readOnlyHint=true because the tool judges rather than pays.

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 front-loaded with the trigger, then the inputs, then the output semantics and action mapping, with no filler sentences. The parenthetical reason-code list is the only slightly heavy element, but it earns its place by preloading the vocabulary the agent will see in the response.

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, so return shapes need not be spelled out; the description still covers the decision categories, the five-minute validity window, and the signature binding. For a three-parameter tool with full schema coverage, nothing an agent needs to invoke it correctly is missing.

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

Parameters3/5

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

Schema description coverage is 100%, so the baseline is a 3. The description reiterates the parameters (url, the 402 payload, optional max_usd) and adds only marginal meaning, namely that an over-budget option is blocked. That is useful but does not substantially exceed what the schema already documents.

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

Purpose4/5

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

The description states a specific verb and resource: judge an x402 payment option and return allow/hold/block, with the trigger point ('right before you sign an x402 payment'). What it does is unmistakable. It stops short of naming a sibling such as lint_x402_endpoint or check_service to demarcate how it differs from endpoint-validation tools.

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

Usage Guidelines4/5

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

It gives a clear timing rule ('call this right before you sign') and defines the downstream action for each verdict (allow: pay; hold: ask your operator first; block: do not pay), which is exactly the usage guidance an agent needs. It never states exclusion conditions or names an alternative tool for cases where this one is wrong.

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