Skip to main content
Glama

Pay and Fetch [Paid: NGT, capped]

pay_and_fetch
Destructive

Fetches a paywalled URL and automatically pays HTTP 402 requests in NGT on Base within your per-call cap and session budget, returning the response with payment details.

Instructions

Fetch a paid URL. If the site asks for payment (HTTP 402), pay automatically in NGT on Base only when the price is at or under your per-request cap and session budget. Returns the response (JSON, or text cut to the first 50,000 characters) plus amount paid, seller wallet and Base transaction. Host headers from NGT_HOST_HEADERS are added for you; you cannot set or see them. Each call spends real NGT; do not call in a loop. On failure, follow the next step in the error.

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

Input Schema

NameRequiredDescriptionDefault
urlYesThe paywalled https URL.
bodyNoJSON request body for POST.
methodNo
max_price_ngtNoMost to pay for this call, in NGT. Cannot exceed the server cap of 0.01 NGT.
max_price_usdcNoIgnored: the user has not turned USDC on, so this server pays only NGT.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.7.4

TDQS

A4.1/5.0
Behavior5/5

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

Annotations already flag a non-read-only, destructive, open-world, non-idempotent call, and the description goes well beyond them: each call spends real NGT, the server cap is 0.01 NGT, host headers from NGT_HOST_HEADERS are injected invisibly, responses are truncated at 50,000 characters, and the receipt fields (amount, seller wallet, Base tx) are disclosed. The spend/destructive framing is consistent with the annotations rather than contradicting them.

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

Conciseness5/5

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

Six tight sentences, front-loaded with purpose, then payment conditions, return shape, hidden headers, cost warning, and failure handling. Every sentence carries information an agent needs before spending money; nothing is filler.

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 no output schema, the description does the work of describing returns and error behavior ('follow the next step in the error'), which is substantial for a money-spending tool. The remaining gap is the undefined session budget and any wallet-funding prerequisite, which an agent must discover elsewhere.

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 80%, so the schema already documents url, body, method, max_price_ngt and the ignored max_price_usdc. The description adds the notion of a per-request cap and a session budget that constrains max_price_ngt, but it does not explain how the session budget is set or how max_price_ngt interacts with the 0.01 server cap beyond what the schema states.

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 opens with a specific verb and resource ('Fetch a paid URL') and immediately defines the distinctive behavior: automatic NGT payment on HTTP 402. It also sketches the return shape (non-streamed JSON or text truncated at 50,000 chars), which implicitly separates it from a streaming sibling, though no sibling is named explicitly.

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?

Clear conditions for the paid path are given (only when price is at or under the per-request cap and session budget, NGT on Base only) plus an explicit prohibition against looping. What's missing is routing guidance: nothing says when to prefer this over fetch_ngt_stream or to check ngt_wallet_status first.

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