Skip to main content
Glama

Call a tool (paid per call via x402)

call_tool

Run an x402 Forge tool on your own input and get its answer ({ok, result, warnings}) plus a signed receipt. Paid per call with x402 inside this MCP call: without a payment the result is the payment terms (x402Version, accepts: the tool's own price in USDC, network and payee, the same as GET /p/{slug}); an x402 MCP client signs one and calls again with it in _meta["x402/payment"]. Never charged for an error: an unknown or sold tool and invalid input are refused before any price, and a failed run is not settled. Free first: try_product runs the example; describe_product shows the input schema.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "slug": "<slug>",
      "input": "<input>"
    },
    "name": "call_tool"
  }
}

Input Schema

NameRequiredDescriptionDefault
slugYesThe tool's slug, from search_products
inputYesThe tool's parameters as one JSON object (describe_product shows its input schema)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.8/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 paid-per-call model, that the first unpaid call returns payment terms (x402Version, accepts, price in USDC, network, payee) rather than a result, that the signed payment travels in _meta["x402/payment"], and that errors and failures are never charged. These are non-obvious traits an agent could not infer from the schema.

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?

It is front-loaded with the main action and result shape, then the payment mechanics, then error handling, then free alternatives. Dense and mostly earned, though the payment-terms sentence chains multiple parentheticals and takes a second read.

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?

There is no output schema, and the description compensates by specifying the return shape ({ok, result, warnings} plus receipt) and the alternative return (payment terms). For a two-param tool with a payment handshake and no annotations, nothing essential to calling it correctly is missing.

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, but the description adds real meaning: slug comes from search_products, input is the target tool's own parameter object (which describe_product reveals), and the _meta payment key – used by the tool yet absent from the schema – is explained in prose. Only minor gaps remain, such as the shape of the receipt.

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?

"Run an x402 Forge tool on your own input and get its answer ({ok, result, warnings}) plus a signed receipt" names a specific verb, resource, and output, and immediately distinguishes it from the free siblings (try_product, describe_product). An agent can tell what this does without opening the schema.

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?

It states the when (run a real tool on your own input), the cheaper alternatives ("Free first: try_product runs the example; describe_product shows the input schema"), and the escalation path (first call returns terms, sign and call again). That is explicit when/when-not/alternative guidance.

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