Skip to main content
Glama

x402 Router

Best live x402 API for a task (free preview)

route_x402_request
Read-onlyIdempotent

Pick the best-scored LIVE x402 endpoint for a task and return it with the top 3 alternatives (the same answer as the free POST /route). For a live-checked pick with fallbacks and the full ranked list, see get_paid_route_requirements. Free.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "route_x402_request"
  }
}

Input Schema

NameRequiredDescriptionDefault
qNoFree-text task or keyword, e.g. 'weather', 'image generation', 'token price'
chainNoChain filter: Base, Solana, or a CAIP-2 id like eip155:8453
categoryNoCategory filter, e.g. AI, Data, Finance, Search
max_priceNoMaximum price per call in USDC, e.g. 0.05

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so safety is covered; the description adds genuinely new context by disclosing the response shape (best pick + top 3 alternatives) and the cost profile ('Free', equivalent to the free POST /route). It stops short of explaining how scoring is computed or behavior when no live endpoint matches.

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

Conciseness5/5

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

Two sentences, front-loaded with the core action and result shape, with the escalation path named second. The trailing 'Free.' is a single word that carries real decision value rather than filler.

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 compensates by naming the return payload (best pick plus three alternatives), and the safety profile is fully covered by annotations. The only gap is failure/empty-result behavior for a live-index tool.

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% and each parameter carries an example in the schema, so the baseline is 3. The description only implies that 'q' is the task text; it adds no detail on filter interaction, e.g. whether chain/category filters shrink the candidate pool or cause zero results.

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 the best-scored LIVE x402 endpoint for a task') plus exactly what is returned (top pick with top 3 alternatives). It also differentiates itself against get_paid_route_requirements, so an agent can choose between them without opening either schema.

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?

Explicitly routes the agent to get_paid_route_requirements when a live-checked pick with fallbacks and a full ranked list is needed, which is a clear alternative-selection rule. It does not address other siblings such as search_x402_endpoints or compare_x402_endpoints, leaving some selection inference to the agent.

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.