Skip to main content
Glama

pay_l402_api

Destructive

Make a request to a paid API. Supports L402 (Lightning) and X402 (USDC on Base) protocols. Platform fee on the API price: 1%, rounded down, minimum 1 sat, reported as fee in the response. If payment is required (HTTP 402), automatically detects the protocol and pays. L402 is preferred when both are available. Works with an operator key (pays from the operator wallet; a default agent is provisioned automatically) or an agent key.

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_l402_api"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYesThe URL to request
bodyNoRequest body for POST/PUT requests
methodNoHTTP methodGET
max_payment_satsNoMaximum amount in satoshis to pay for this request

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already flag destructiveHint=true and openWorldHint=true, but the description adds genuinely new behavior: automatic detection and payment on HTTP 402, L402 preferred over X402, a 1% platform fee rounded down with a 1-sat minimum reported in the response, and operator-vs-agent key semantics. It omits what happens when payment exceeds max_payment_sats or fails, keeping it below a 5.

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?

Four tight sentences, front-loaded with purpose and protocol support, then payment mechanics and key modes. Each sentence carries information, though the fee sentence is dense enough to be slightly hard to parse on first read.

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 mutation tool with no output schema, the description covers the critical agent-facing concerns: automatic payment, fee reporting in the response, protocol preference, and key types. Only failure/abort semantics for exceeding max_payment_sats remain unaddressed.

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 coverage is 100%, so all four parameters are already documented in the schema. The description only indirectly illuminates max_payment_sats by describing the fee calculation; it adds no format or constraint detail for url, body, or method. Baseline 3 is appropriate.

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?

States a concrete verb and resource ('Make a request to a paid API') and names the two supported payment protocols, which clearly separates it from discovery siblings like list_l402_apis. It stops short of explicitly naming the alternative tool, so a 4 rather than a 5.

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?

The description implies when to use it (requesting an API that may return HTTP 402) and explains the automatic protocol selection and L402 preference. It gives no explicit exclusions or pointer to sibling tools such as list_l402_apis for discovering APIs, so guidance is implied rather than stated.

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.