Skip to main content
Glama
obcraft
by obcraft

Test a route's x402 payment behavior

test_x402_route
Read-only

Verify x402 payment behavior by sending an unpaid test request to a route's paid URL, expecting a 402 Payment Required with a valid accepts[] offer.

Instructions

Send an unpaid test request to a route's paid URL and verify x402 behavior: expects 402 Payment Required with a valid accepts[] payment offer. Requires an Apiosk provider token.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
route_idYes
test_payloadNoSent as query params for GET, JSON body otherwise.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv1.8.0

TDQS

A4/5.0
Behavior4/5

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

The description discloses that the request is unpaid, that the expected result is a 402 with a valid accepts[] offer, and that a provider token is required. This adds meaningful behavioral context beyond the readOnlyHint and openWorldHint annotations.

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 with no filler. The first sentence front-loads the verb, target, and expected behavior, and the second states the prerequisite clearly.

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 a 2-parameter test tool with annotations and an output schema, the description is mostly complete: it covers the request type, expected result, and auth requirement. It could add what to do when the route does not return 402, but this is not essential given the output schema.

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?

The input schema already documents test_payload's GET/POST behavior and route_id is self-explanatory, but the description adds little parameter-specific meaning. With only 50% schema coverage, the description could have explained how route_id and test_payload relate to the expected 402 response.

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 states a specific action ('Send an unpaid test request to a route's paid URL') and a precise expected outcome (402 Payment Required with a valid accepts[] payment offer). This clearly distinguishes it from sibling route-management and execution tools.

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

Usage Guidelines3/5

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

The description gives useful context (testing x402 behavior, requires an Apiosk provider token) but does not explicitly state when to prefer this tool over alternatives such as execute or apiosk_fetch_paid. Usage is implied rather than contrasted with sibling tools.

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