Skip to main content
Glama

Which x402 API should I call

x402_recommend

Use when your agent has a task it cannot do itself and must pick which paid x402 endpoint to call. Returns up to 5 ranked candidates with URL, price, network, method and the seller's own example body - plus the evidence: we challenged it ourselves and it answered 402, and its real payer and repeat counts. Never recommends our own endpoints: the index excludes them by construction. If nothing qualifies you get the near misses and why, never filler. Deterministic, no model. $0.01 per call, paid over x402 (USDC).

Input Schema

NameRequiredDescriptionDefault
maxNoHow many candidates to return, 1 to 5. Default 3.
needYesThe task, in plain words. Scored against the name, tags, description and URL of every verified endpoint in the index.
maxPriceNoOptional ceiling in USD per call, for example 0.01. Candidates above it are dropped.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/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 return shape (up to 5 ranked candidates with URL, price, network, method, example body), the evidence backing each pick (challenged with a live 402, real payer and repeat counts), an exclusion rule (never its own endpoints), failure behavior (near misses with reasons, no filler), determinism, and a stated $0.01 USDC cost via x402.

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 usage condition is front-loaded and most sentences carry distinct information (cost, exclusions, failure mode). A few phrases lean promotional ("never filler", "by construction") and could be trimmed without losing meaning.

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?

No output schema and no annotations exist, yet the description describes the returned fields, the guarantee of evidence, the empty-result behavior, and the payment model. An agent has everything needed to decide to call it and to interpret the result.

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 every parameter is already documented, which sets the baseline at 3. The description adds no syntax or format guidance beyond the schema, though it does clarify that `need` is scored against name, tags, description and URL through the schema itself rather than the prose.

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: pick which paid x402 endpoint to call for a task the agent cannot do itself. This is clearly distinguishable from siblings like catalog (browsing) and do (execution), since the description establishes it as a recommendation layer over the index.

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?

"Use when your agent has a task it cannot do itself and must pick which paid x402 endpoint to call" gives a clear triggering condition. It doesn't name sibling alternatives such as catalog or do to say when those are preferable, so it stops short of a 5.

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