Skip to main content
Glama

Pay anything: hand it any bill

pay

One tool for any payment request. Pass whatever you were asked to pay: a Swap Ripper paywalled API URL (it buys access and returns an access_key), an x402 / HTTP 402 invoice, a Swap Ripper payment link, a Solana Pay link (solana:...), an Ethereum payment link (ethereum:..., EIP-681, any supported EVM chain), a Bitcoin link (bitcoin:...), plain text like 'send 20 USDC to 0xabc... on base', or {to, token, chain, amount}. Swap Ripper works out who gets what, then pays it EXACTLY using whatever token you hold on any chain. Call with only request to see what it understood; add pay_with_token, pay_with_chain and refund_address to get a deposit address.

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": {
      "request": "<request>"
    },
    "name": "pay"
  }
}

Input Schema

NameRequiredDescriptionDefault
testNoTest mode: true = no real money. You get a fake deposit address that completes by itself in ~15s, so you can test status, invoices, receipts and webhooks for free.
speedNoOptional. Default 'best_price': Swap Ripper quotes two networks at once and uses whichever is cheaper for you (and the other if one fails); the reply's route_choice shows both. 'fast' forces the ~seconds Relay route.
amountNoOnly if the request has no amount: how much the recipient should get.
walletNox402 only: YOUR address on the invoice's network (your x402 client signs from it).
requestYesThe payment request: link, URI, 402 body, plain text, or {to, token, chain, amount}.
referrerNoOptional: your NEAR account (e.g. 'myagent.near'). You earn 1/3 of the service fee on every swap routed with it. The user pays the same.
access_keyNoPaywalled APIs only: an existing access_key to top up.
request_idNoRecommended: your own unique ID for this payment (e.g. a UUID). Retrying with the same request_id returns the SAME payment instructions, so you never pay twice.
slippage_bpsNoMax slippage in basis points (default 100 = 1%, range 10-500).
pay_with_chainNoChain you pay from, e.g. 'solana'.
pay_with_tokenNoToken you hold and will pay with, e.g. 'SOL', 'USDC', 'ETH'.
refund_addressNoYour address on the paying chain, for automatic refunds.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / access_key
      Added value: +{
      +  "description": "Paywalled APIs only: an existing access_key to top up.",
      +  "type": "string"
      +}
  2. Added

TDQS

A3.7/5.0
Behavior4/5

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

Beyond the annotations, the description discloses important behavior: test mode uses a fake deposit address and completes in about 15 seconds, request_id prevents double payment on retries, speed controls best-price versus fast routing, and paywalled API calls return an access_key. It does not fully explain error handling or all return shapes, but it adds substantial operational context.

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 description is front-loaded with a clear purpose and then enumerates supported request formats and the basic workflow. It is dense but appropriately sized for a broad multi-format payment tool, with little wasted wording.

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?

For a complex open-world payment tool with 12 parameters and no output schema, the description covers accepted request types, the two-step understanding/deposit-address flow, test mode, routing speed, and retry safety. It leaves some response and failure details implicit, but it is largely complete for correct invocation.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents all parameters thoroughly. The description contextualizes request formats and the workflow for adding payment parameters, but it adds little parameter meaning beyond what the schema already provides.

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 description clearly states a specific verb and resource: it pays any payment request, listing accepted formats such as paywalled API URLs, x402 invoices, Solana Pay links, EVM links, Bitcoin links, plain text, and structured objects. It does not explicitly clarify how it differs from sibling pay_exact, and the phrase 'pays it EXACTLY' slightly overlaps with that sibling's likely purpose.

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 gives useful invocation guidance: call with only request to see what was understood, then add pay_with_token, pay_with_chain, and refund_address to get a deposit address. However, it does not say when to use this tool versus alternatives such as pay_exact, buy_access, or check_payment.

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.