Skip to main content
Glama
Blink MCP Server

Blink MCP Server

Official
by blinkbitcoin

l402_challenge_create

Creates an L402 payment challenge with a Lightning invoice and signed macaroon to protect a resource behind a paywall, returning a WWW-Authenticate header for HTTP 402 responses.

Instructions

Create an L402 payment challenge (invoice + signed macaroon) to protect a resource behind a Lightning paywall. Returns a WWW-Authenticate header that can be sent to clients with HTTP 402.

Input Schema

NameRequiredDescriptionDefault
memoNoInvoice memo / description
resourceNoResource identifier caveat (e.g. /api/v1/data). Token will only be valid for this path.
wallet_idNoBlink BTC wallet ID (auto-resolved if omitted)
amount_satsYesInvoice amount in satoshis
expiry_secondsNoMacaroon expiry in seconds from now (e.g. 3600 = 1 hour)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed10 schema fields changedv2.0.0
    • addedInput schema / properties / amount_sats / exclusiveMinimum
      Added value: +0
    • addedInput schema / properties / amount_sats / maximum
      Added value: +9007199254740991
    • changedInput schema / properties / amount_sats / type
      Previous value: -"number"New value: +"integer"
    • addedInput schema / properties / expiry_seconds / description
      Added value: +"Macaroon expiry in seconds from now (e.g. 3600 = 1 hour)"
    • addedInput schema / properties / expiry_seconds / exclusiveMinimum
      Added value: +0
    • addedInput schema / properties / expiry_seconds / maximum
      Added value: +9007199254740991
    • changedInput schema / properties / expiry_seconds / type
      Previous value: -"number"New value: +"integer"
    • addedInput schema / properties / memo / description
      Added value: +"Invoice memo / description"
    • addedInput schema / properties / resource / description
      Added value: +"Resource identifier caveat (e.g. /api/v1/data). Token will only be valid for this path."
    • addedInput schema / properties / wallet_id / description
      Added value: +"Blink BTC wallet ID (auto-resolved if omitted)"
  2. First observedv1.2.0

TDQS

A4/5.0
Behavior4/5

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

No annotations are provided, so the description carries the full burden. It discloses that the tool creates an invoice plus signed macaroon and returns a WWW-Authenticate header for HTTP 402, which gives strong behavioral context. It does not cover permissions, wallet requirements, or side-effect timing, but the core behavior is well described.

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?

The description is two concise sentences with no wasted wording and is front-loaded with the core action and purpose. The return value is placed after the main purpose, which supports quick scanning.

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?

The tool has no output schema, but the description explains the key return value: a WWW-Authenticate header for HTTP 402. Combined with a fully documented input schema, this is nearly complete, though it could state whether the challenge creation requires wallet configuration or whether invoice generation has side effects.

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 the schema already documents all five parameters in detail. The description does not add parameter-specific semantics beyond the schema, which is an appropriate baseline for a fully documented schema.

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?

The description uses a specific verb and resource: 'Create an L402 payment challenge (invoice + signed macaroon)' and clarifies it protects a resource behind a Lightning paywall. This clearly distinguishes it from payment-oriented siblings like l402_pay or verification tools.

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 usage by saying it protects a resource behind a Lightning paywall, but it does not explicitly state when to use this instead of siblings such as l402_pay, l402_payment_verify, or create_invoice. The context is useful but alternatives and exclusions are left implicit.

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