Skip to main content
Glama

Buy a page from an x402 site

paid_fetch

Fetch pages or APIs that charge AI agents via HTTP 402, paying from prepaid AIPayGen credit without a wallet. Set a maximum price and cover the site price plus fee.

Instructions

Fetch a page or API response (GET, or POST JSON) from a site that charges AI agents with HTTP 402 (x402), paid from AIPayGen credit you bought with a top-up: no wallet needed. Trial and referral credit pay only this $0.001 fee and free pages. You set max_price_usd and pay the site's price plus 15%, plus the fee. A site that takes the payment but doesn't return the page can't be refunded, so buy from sites you trust; if it never collects, your credit returns once the payment expires. Costs $0.001 per call, from an API key's prepaid credit (not payable with x402).

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

Input Schema

NameRequiredDescriptionDefault
urlYeshttps URL of the page or API to buy, e.g. https://example.com/article
bodyNoPOST only: a JSON object or array (at most 16 KB), sent as application/json, byte for byte the same on the unpaid and the paid request.
methodNoGET (default) or POST, for paid APIs that take input.
max_price_usdNoMost you'll pay the site for this page (default 0.05, at most 1). Our 15% fee is on top.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior5/5

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

Annotations only mark this as a non-read-only, non-idempotent, non-destructive call; the description goes far beyond that with per-call price ($0.001), a 15% markup on the site's price, non-refundable failure risk, and credit restoration after payment expiry. It also clarifies the funding source is prepaid API-key credit, not x402 itself.

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 key constraint (what it buys and the price) is front-loaded and the paragraph is dense with substantive clauses. There is mild redundancy in repeating the $0.001 fee twice, which keeps it off a 5.

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?

For a 4-parameter paid-fetch tool with no output schema, the description covers cost, funding source, refund behavior and failure modes. What comes back is implied by "page or API response," and the payment risks an agent must weigh are all disclosed.

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 the schema already documents each parameter including max_price_usd bounds and the 15% fee on top. The description restates the max_price_usd/fee relationship rather than adding new syntax or format detail, which lands at the baseline.

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?

"Fetch a page or API response (GET, or POST JSON) from a site that charges AI agents with HTTP 402 (x402)" states a specific verb, resource and payment mechanism. An agent can distinguish this paid-fetch tool from free-content siblings like page_to_markdown purely from the x402/credit framing.

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?

It sets clear preconditions (needs bought AIPayGen credit, no wallet) and a practical caution ("buy from sites you trust"), plus what happens on failure. It never names an alternative tool for free or non-402 pages, so the when-not-to-use routing is left implicit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.