Skip to main content
Glama

Sell your API to agents (any coin)

create_paywall

For API/website OWNERS: put a paywall in front of any https API in seconds, no code. Set a price per pack (e.g. 1 USDC for 1000 calls) and your wallet. You get a gateway_url: agents calling it get HTTP 402 with buying instructions, pay with ANY coin on any chain (money goes straight to you), then their calls are forwarded to your API. Returns an admin_key for stats and an off switch. Add listed=true to appear in the public directory, test=true to try it free.

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": {
      "upstream_url": "<upstream_url>",
      "price_per_pack": "<price_per_pack>",
      "calls_per_pack": "<calls_per_pack>",
      "recipient": "<recipient>"
    },
    "name": "create_paywall"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNoShort name shown to buyers, e.g. 'Weather API'.
testNoTest paywall: only free test-mode payments count.
chainNoChain you receive on (default base).
tokenNoToken you receive (default USDC).
listedNoList in the public directory (find_paywalls).
recipientYesYour wallet address on the chain you receive on.
descriptionNoWhat your API does (shown in the directory).
upstream_urlYesYour API's base URL (https), e.g. https://api.example.com/v1. Paths and queries after the gateway URL are appended.
calls_per_packYesCalls included in one pack, e.g. 1000.
price_per_packYesPrice of one pack, in the token you receive, e.g. '1'. Must be worth at least $1.
upstream_headerNoOptional secret header added to forwarded calls so only Swap Ripper can reach your API, e.g. 'Authorization: Bearer abc123'.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.5/5.0
Behavior5/5

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

Annotations only declare that this is a non-read-only, non-idempotent, open-world creation; the description goes well beyond that by explaining the resulting HTTP 402 flow, that funds go directly to the recipient, and that an admin_key and kill switch come back. It also discloses the free test-mode behavior, which is non-obvious operational context an agent could not infer from 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?

Front-loaded with the audience and the core action, and every sentence carries information about outcomes rather than restating the name. It does read as one long run-on paragraph mixing flow, return values, and option flags, so a small structural cost.

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 11 parameters and no output schema, the description carries the return-value burden and does so by naming gateway_url and admin_key. It stops short of explaining duplicate-paywall behavior (relevant given idempotentHint=false) or how the rendered gateway URL maps to upstream paths beyond the schema note.

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: a worked pricing example (1 USDC per 1000 calls), the wallet requirement, and the effect of listed and test. It does not cover upstream_header, chain/token defaults, or the $1 minimum beyond what the schema already says.

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 specific verb and resource ('put a paywall in front of any https API') and frames the audience as API/website OWNERS, which separates it from the agent-side paying tools in the sibling list. It also names the concrete artifacts produced (gateway_url, admin_key, off switch), so an agent knows exactly what effect the call has.

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 'For API/website OWNERS' framing plus the listed=true and test=true variants give clear context for when to use each mode. What's missing is explicit routing away from alternatives (e.g., 'to consume a paywall, use pay/buy_access instead of this') and any prerequisite notes about wallet/recipient setup.

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.