Skip to main content
Glama

x402Fi

Get the x402 payment requirements for a request

get_payment_requirements
Read-onlyIdempotent

The exact x402 402 (price, USDG asset, payTo, network, extensions) for one specific request to an x402Fi endpoint, without paying or calling the paid endpoint. Quoted endpoints are priced for this exact request. Sign the returned accepts[0] with the user's own wallet, then send the request with the PAYMENT-SIGNATURE header (a seller's own v1 endpoint reads X-PAYMENT instead: see payment_header in the result).

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": "get_payment_requirements"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYesThe full request URL including any query string, e.g. https://x402fi.dev/g/stockfi-trade/v1/preflight?symbol=AAPL
bodyNoJSON body for POST/PUT/PATCH, as a string.
methodNoDefault GET.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Adds substantial context beyond the annotations: it states no payment is made and the paid endpoint is not invoked, that pricing is bound to the exact quoted request, and that the response contains a payment_header field indicating which header variant applies. Those are exactly the behavioral facts annotations cannot convey.

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?

Three dense sentences, front-loaded with what is returned and immediately followed by the workflow and the header caveat. Domain jargon (accepts[0], PAYMENT-SIGNATURE, v1 endpoint) makes it heavy for a reader, but nothing is filler.

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?

No output schema exists, yet the description still covers the return payload (price, asset, payTo, network, extensions, accepts[0], payment_header) and the follow-on signing/sending flow. Nothing essential for correct invocation 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 already 100%, so the baseline is 3, but the description adds real meaning: the url must be the exact request being priced, since quoted endpoints are priced for that specific request. Method and body semantics are left to the schema's own descriptions.

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?

Names a specific action (fetch the x402 payment requirements) scoped to one exact request URL, and enumerates the returned fields (price, USDG asset, payTo, network, extensions). It also draws a sharp line between quoting requirements and actually calling the paid endpoint, which is the key distinction an agent needs.

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?

Clearly frames the when: obtain requirements for a specific request before paying, then sign accepts[0] and resend with PAYMENT-SIGNATURE (or X-PAYMENT for a seller's v1 endpoint). Gives strong next-step context but no explicit statement of when not to use it or which sibling would cover discovery instead.

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.