Skip to main content
Glama

MIRAI

Brief for paying an x402 URL

pay_brief
Read-only

Reads one URL's 402 without paying and says what paying it would take: the price in USDG, the address it pays, whether a USDG wallet on Robinhood Chain can pay it, the payer's balance and shortfall, and whether the agent's MIRAI line can cover the shortfall. Returns the code to pay it with @miraifi/x402. Nothing is signed, paid or borrowed.

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": {
      "url": "<url>"
    },
    "name": "pay_brief"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYesthe https URL of the paid endpoint
agentNoERC-8004 agent id whose MIRAI line could cover a shortfall
payerNothe paying wallet, to read its USDG balance
methodNohow the endpoint is called (POST is probed with an empty JSON object)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint and openWorldHint, and the description reinforces this with 'Nothing is signed, paid or borrowed', directly addressing the agent's main safety concern for a payment-adjacent tool. It also discloses that POST endpoints are probed with an empty JSON object, a non-obvious side effect not captured in 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?

One dense sentence listing outputs followed by a short handoff line and a safety guarantee; the key capability is front-loaded and nothing is padding. The output enumeration is long but each item is a distinct returned datum, so it earns its place.

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 carries the return-value burden and does so by enumerating the reported fields plus the payable-code handoff. The shape and exact field names of the response remain unspecified, which is the main residual gap for a tool an agent may need to parse.

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 by explaining what each optional input is for: the payer's USDG balance read and the agent's MIRAI line used to cover a shortfall. That connects 'payer' and 'agent' to the returned diagnostics in a way the schema does not.

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 concrete verb and resource ('Reads one URL's 402 without paying') and enumerates exactly what it returns: price in USDG, payee address, wallet payability, balance and shortfall, and MIRAI line coverage. This is specific enough that an agent can distinguish it from the prepare_* and quote_* siblings at a glance.

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?

The dry-run framing ('without paying', 'says what paying it would take') clearly establishes the use case: inspect a 402 before committing to payment, then hand off to the returned @miraifi/x402 code. It does not name an explicit alternative or state when not to call it, which keeps it 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.