Skip to main content
Glama

How to buy gas

agentgas_how_to_buy
Read-only

Pay USDC via x402 at /v1/gas; starter fills under $0.10; MCP tools are free helpers—use an x402 client to pay. Step-by-step instructions plus the exact x402 payment URL. This MCP server cannot sign payments; your x402 client (e.g. @x402/fetch) pays the URL with USDC on Base, gasless (EIP-3009 signature, no ETH needed).

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": {
      "chain": "<chain>"
    },
    "name": "agentgas_how_to_buy"
  }
}

Input Schema

NameRequiredDescriptionDefault
toNoRecipient 0x address; omit to deliver to the payer
usdNo
chainYesDestination chain for the native gas
amountNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, and the description reinforces that by stating the server cannot sign payments and that a client such as @x402/fetch performs the EIP-3009 gasless signature, so no ETH is needed. It also discloses pricing (starter fills under $0.10) and the USDC-on-Base payment rail, which are traits the annotations do not carry. Minor gaps remain, such as whether the returned URL expires or is single-use.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

It is compact, but it is one dense run-on of semicolon- and em-dash-joined clauses, and it front-loads the payment instruction instead of the tool's own purpose. Every clause does carry information, so nothing is wasted, but the ordering works against fast scanning.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a read-only helper with no output schema, it covers cost, payment mechanism, and the key limitation, which is most of what an agent needs. What is missing is parameter meaning for usd/amount and a resolution of the Base-only wording against a four-chain enum, both of which affect whether a correct call can be formed.

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

Parameters2/5

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

Schema coverage is only 50%, and the two undocumented parameters, usd and amount, are near-synonyms whose distinction (price quote vs. fill size) is exactly what an agent cannot guess. The description never mentions either parameter, nor does it reconcile the chain enum (base, arbitrum, optimism, polygon) with its repeated claim of "USDC on Base," so it fails to compensate for the coverage gap.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The second sentence states concretely what the tool returns: "Step-by-step instructions plus the exact x402 payment URL." The opening clause ("Pay USDC via x402 at /v1/gas") leads with payment mechanics rather than the tool's own function, so an agent skimming could mistake it for a transactional call like agentgas_order, but the later line "This MCP server cannot sign payments" resolves that.

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?

It tells the agent to "use an x402 client to pay" and that "MCP tools are free helpers," which implies this is the read-this-first entry point. However, it never explicitly sequences itself against agentgas_quote or agentgas_order, nor states when not to call it, so the routing decision is left to inference.

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