Skip to main content
Glama

v1_preflight

Preflight an x402 resource URL to avoid wasted payments. Evaluates reachability, terms, price, catalog, and age to produce a spend-guard score from 0 to 100.

Instructions

[costs $0.01 USDC per call] Score an x402 resource URL before paying it: reachability, terms, catalog presence, age. Spend-guard preflight: deterministic 0-100 score for any x402 resource URL before an agent pays it. One SSRF-guarded probe of the live 402 (terms decode, payTo, price sanity) plus origin /.well-known/x402.json plus our collector's Bazaar presence and observed age. Rubric: start 50; +15 valid 402; +10 terms decode; +5 payTo; +5 price<=$5 (-10 above); +10 catalog; +15 Bazaar-listed; +10 age>=7d (+5 >=1d); -20 unreachable. Raw signals in every response; auditable. Not an endorsement.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
resourceYesThe x402 resource URL to preflight, exactly as advertised.
Behavior4/5

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

With no annotations, the description bears the full burden. It discloses cost ($0.01 USDC), probing behavior (SSRF-guarded, single probe), scoring rubric (starting at 50 with adjustments), and output nature ('Raw signals in every response; auditable. Not an endorsement.'). It does not mention side effects beyond cost, but is otherwise thorough.

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 concise (under 100 words) and front-loaded with the main purpose. However, the rubric detail is somewhat dense and could be structured more clearly. Still, every sentence adds value and there is no redundancy.

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?

Given one parameter, no output schema, and no annotations, the description covers all necessary aspects: purpose, cost, behavior, rubric, and output nature. There are no missing critical details for an AI agent to use this tool correctly.

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 coverage is 100%, so baseline is 3. The description adds minimal extra meaning: it indicates the URL should be 'exactly as advertised', but the schema already has a pattern and description. The single parameter is well-defined, so no need for additional explanation.

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?

The description explicitly states the tool's purpose: 'Score an x402 resource URL before paying it: reachability, terms, catalog presence, age.' The verb 'score' and resource 'x402 resource URL' are specific, and the tool is clearly distinct from siblings (no other tool does preflight assessment).

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?

The description specifies when to use: 'before an agent pays it' and describes it as a 'spend-guard preflight'. It implies the tool is for evaluating resource URLs before payment. While it doesn't explicitly state when not to use or name alternatives, the usage context is clear and the tool is unique among siblings.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Marysbrain/x402-gateway-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server