Skip to main content
Glama

Access L402-Protected API

access_l402

Fetch URLs behind L402 paywalls by automatically paying Lightning invoices and retrying with proof of payment, returning the response data.

Instructions

Fetch a URL that may be behind an L402 (Lightning-gated) paywall. Automatically pays the invoice and retries with proof of payment. Returns the response data.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesURL to fetch (may return 402 with Lightning invoice)
bodyNoRequest body (for POST/PUT)
methodNoHTTP method (default GET)
headersNoAdditional request headers
maxSatsNoMaximum sats to auto-pay (safety limit)
nostrPubkeyNoYour Nostr pubkey hex for trust discounts (X-Nostr-Pubkey header)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations, the description must carry the behavioral burden, and it does disclose the key trait: the tool will automatically spend money by paying the invoice and retrying. It stops short of the details an agent spending real funds needs — payment irreversibility, what happens when the invoice exceeds a limit, failure/refund behavior, or auth implications of the Nostr key.

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?

Three short sentences, zero filler, and the core mechanism (paywall detection, auto-pay, retry, return value) is front-loaded in a logical order. Nothing is padded or repeated.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a six-parameter tool with a nested headers object, no output schema, and no annotations — and one that spends real money — the description covers the happy path but omits failure modes, cost safety (maxSats as a spend ceiling), and what the response data looks like. It is adequate but leaves real gaps for a monetary operation.

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 every parameter (url, body, method, headers, maxSats, nostrPubkey) is already documented in the schema, which sets the baseline at 3. The description adds no extra parameter meaning, such as how maxSats interacts with automatic payment or what a trust discount implies.

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 uses a specific verb+resource ('Fetch a URL that may be behind an L402 paywall') and explains the distinctive mechanism: auto-paying the Lightning invoice and retrying with proof of payment. It is clearly distinguishable from a plain HTTP fetch, but it never references siblings like pay_invoice or pay_lightning_address to clarify why you'd route through this tool instead of paying directly.

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?

Usage is implied by 'may be behind an L402 paywall' — you reach for this when a resource is Lightning-gated rather than reaching for pay_invoice. However, there is no explicit when-to-use/when-not selection guidance and no mention of expected preconditions (e.g., wallet balance, check_balance first), and none of the sibling tools are named as alternatives.

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