Skip to main content
Glama
aibtcdev
by aibtcdev

probe_x402_endpoint

Discover an x402 endpoint's cost before paying: check if it is free, return free responses directly, or show payment details for approval before execution.

Instructions

Probe an x402 API endpoint to discover its cost WITHOUT making payment.

This tool is useful for:

  • Discovering the cost of a paid endpoint before executing

  • Checking if an endpoint is free or requires payment

  • Presenting costs to users for approval before paying

For free endpoints, returns the response data directly. For paid endpoints, returns payment details (amount, asset, recipient) without executing payment.

After probing a paid endpoint, use execute_x402_endpoint to actually execute and pay.

Supported sources:

  • x402.aibtc.com (mainnet) / x402.aibtc.dev (testnet), the default: Use path like "/inference/openrouter/chat"

  • x402.biwas.xyz: Use apiUrl="https://x402.biwas.xyz" with path like "/api/pools/trending"

  • stx402.com: Use apiUrl="https://stx402.com" with path like "/registry/list"

  • aibtc.com (mainnet) / aibtc.dev (testnet): Use apiUrl="https://aibtc.com" with path like "/api/inbox/{address}"

  • Any x402-compatible URL: Use url parameter with full endpoint URL

Tip: call earning_opportunities to see how to put your assets to work.

Input Schema

NameRequiredDescriptionDefault
urlNoFull endpoint URL (e.g., 'https://x402.aibtc.com/hashing/sha256'). Takes precedence over path+apiUrl.
dataNoRequest body for POST/PUT requests
pathNoAPI endpoint path (e.g., '/api/pools/trending'). Required if url is not provided.
assetNoQuote the cost in this asset when the endpoint accepts several. Accepts a symbol ("sBTC", "STX") or a full contract identifier. Defaults to the first asset this client can pay; the full accepts[] list is always returned.
apiUrlNoAPI base URL: https:// plus the source host from list_x402_endpoints (x402.aibtc.com, x402.biwas.xyz, stx402.com, aibtc.com). Defaults to x402.aibtc.com (testnet x402.aibtc.dev).
methodNoHTTP methodGET
paramsNoQuery parameters for GET requests

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.77.0

TDQS

A4.5/5.0
Behavior4/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 well: it discloses that no payment occurs, that free endpoints return response data directly, and that paid endpoints return amount/asset/recipient details instead of executing. It stops short of stating auth/credential requirements or whether the probe itself has side effects on the remote server.

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 core purpose and the free-vs-paid return behavior are front-loaded and never buried. The supported-sources block is long but each line is actionable; the closing "Tip: call earning_opportunities" is promotional and doesn't help an agent invoke this tool.

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?

There is no output schema, and the description compensates by describing both return branches (raw response data vs payment details). It leaves error behavior and non-x402 URLs unaddressed, which matters for a tool whose whole job is hitting arbitrary endpoints.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3; the description goes beyond it by listing the supported source hosts and pairing each with a concrete path example, and by clarifying that the default is x402.aibtc.com. The url > path+apiUrl precedence is repeated from the schema rather than added to, keeping it from a 5.

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 ("Probe an x402 API endpoint to discover its cost") and immediately adds the crucial scope qualifier "WITHOUT making payment." This clearly separates it from execute_x402_endpoint (which pays) and list_x402_endpoints (which enumerates sources).

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

Usage Guidelines5/5

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

Explicitly names the when-to-use cases (discover cost before executing, check free vs paid, present costs for approval) and routes the agent to the sibling execute_x402_endpoint for the follow-up action. The condition that selects the alternative is stated outright.

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

Deploy Server

Other Tools