Skip to main content
Glama

Bitcoin Stratigraphy Enterprise Data Engine & Agent Notary Hub

Attenuate a Macaroon

proof.attenuate
Read-onlyIdempotent

Attenuate an authentic, unexpired L402 parent macaroon by appending strictly formatted first-party caveats. expiresAt (UTC instant) or ttlSeconds adds time < YYYY-MM-DDTHH:MM:SS.sssZ: redemption at or after that instant is rejected with HTTP 401. tools adds rpc = tool[,tool...]: any tool not listed exactly is rejected with HTTP 403, and every listed tool must already be authorized by the parent. caveats accepts those forms plus max_target, max_requests, allowed_path, and legacy time_before or allowed_tools restrictions. At least one restriction is required. Requires its own L402 authorization; the parent's payment proof remains required for child redemption. Delegation cannot widen authority or reset an inherited quota. Live L402 Satoshi settlement: a configured NWC wallet issues the exact-priced Lightning invoice; paid execution requires confirmed incoming settlement and an invoice-bound payment proof. Handle HTTP 402, pay explicitly, then retry the identical request with Authorization: L402 :. Invoice creation alone is not payment; unavailable verification does not authorize execution.

Input Schema

NameRequiredDescriptionDefault
toolsNoOptional exact MCP tool targets (1-16 unique names). Appends one `rpc = tool[,tool...]` caveat; the child is refused for every other tool. Matching is exact, so a legacy alias is a different name. Each tool must already be authorized by the parent: an MCP L402 credential authorizes the single tool named in its allowed_path. Constraints: minItems: 1; maxItems: 16. Example: ["stratigraphy.get_diff"].
caveatsNoOptional restriction caveats to append, normalized to canonical form: 'time < 2026-12-31T23:59:59Z', 'rpc = stratigraphy.get_diff', 'max_target = 870000', 'max_requests = 1', 'allowed_path = /mcp/tools/stratigraphy.get_diff', and legacy 'time_before = 2026-12-31' or 'allowed_tools = stratigraphy.get,stratigraphy.get_digest'. Constraints: maxItems: 16. Example: ["max_target = 870000"].
macaroonYesRequired authentic, unexpired parent L402 macaroon (1-8192 characters); added restrictions can only narrow its scope. Constraints: minLength: 1; maxLength: 8192. Example: "base64url-parent-macaroon".
expiresAtNoOptional absolute expiration boundary as a future UTC instant (YYYY-MM-DDTHH:MM:SSZ, optionally with .sss milliseconds). Appends `time < YYYY-MM-DDTHH:MM:SS.sssZ`; it cannot extend the parent's expiry. Mutually exclusive with ttlSeconds. Constraints: format: date-time; pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d{3})?Z$. Example: "2026-12-31T23:59:59Z".
ttlSecondsNoOptional positive integer TTL of 1-2592000 seconds (e.g. 3600). Appends `time <` at the current time plus ttlSeconds; it cannot extend the parent's expiry. Mutually exclusive with expiresAt. Constraints: minimum: 1; maximum: 2592000. Example: 3600.

Output Schema

NameRequiredDescriptionDefault
statusYesSuccessful attenuation status. Example: "attenuated".
issuedAtYesUTC issuance timestamp. Constraints: format: date-time. Example: "2026-09-27T21:00:00.000Z".
appliedCaveatsYesNew canonical caveats appended to the parent; inherited caveats are preserved inside the token. Example: ["max_target=870000","time < 2026-12-31T23:59:59.000Z","rpc = stratigraphy.get_diff"].
attenuatedMacaroonYesEncoded child subscription macaroon. Treat as a bearer credential. Example: "base64url-child-macaroon".

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed21 schema fields changed
    • changedInput schema / description
      Previous value: -"Provide an authentic parent macaroon, an array of restrictions, and optional TTL; child caveats intersect with inherited constraints and no payment invoice is issued."New value: +"Provide an authentic parent macaroon and at least one restriction: expiresAt or ttlSeconds, exact tools, or caveats. New caveats intersect with inherited constraints and no payment invoice is issued."
    • changedInput schema / examples
      Previous value: -[
      -  {
      -    "caveats": [
      -      "allowed_tools = stratigraphy.get,stratigraphy.get_digest",
      -      "max_target = 870000"
      -    ],
      -    "macaroon": "base64url-parent-macaroon",
      -    "ttlSeconds": 3600
      -  }
      -]New value: +[
      +  {
      +    "caveats": [
      +      "max_target = 870000"
      +    ],
      +    "expiresAt": "2026-12-31T23:59:59Z",
      +    "macaroon": "base64url-parent-macaroon",
      +    "tools": [
      +      "stratigraphy.get_diff"
      +    ]
      +  }
      +]
    • addedInput schema / properties / caveats / default
      Added value: +[]
    • changedInput schema / properties / caveats / description
      Previous value: -"List of restriction caveats to append (e.g. ['time_before = 2026-12-31', 'max_target = 870000', 'allowed_tools = stratigraphy.get,stratigraphy.get_digest']). Existing allowed_path and max_requests restrictions are also supported. Constraints: maxItems: 16. Example: [\"time_before = 2026-12-31\",\"max_target = 870000\",\"allowed_tools = stratigraphy.get,stratigraphy.get_digest\"]."New value: +"Optional restriction caveats to append, normalized to canonical form: 'time < 2026-12-31T23:59:59Z', 'rpc = stratigraphy.get_diff', 'max_target = 870000', 'max_requests = 1', 'allowed_path = /mcp/tools/stratigraphy.get_diff', and legacy 'time_before = 2026-12-31' or 'allowed_tools = stratigraphy.get,stratigraphy.get_digest'. Constraints: maxItems: 16. Example: [\"max_target = 870000\"]."
    • changedInput schema / properties / caveats / example
      Previous value: -[
      -  "time_before = 2026-12-31",
      -  "max_target = 870000",
      -  "allowed_tools = stratigraphy.get,stratigraphy.get_digest"
      -]New value: +[
      +  "max_target = 870000"
      +]
    • changedInput schema / properties / caveats / examples
      Previous value: -[
      -  [
      -    "time_before = 2026-12-31",
      -    "max_target = 870000",
      -    "allowed_tools = stratigraphy.get,stratigraphy.get_digest"
      -  ]
      -]New value: +[
      +  [
      +    "max_target = 870000"
      +  ]
      +]
    • changedInput schema / properties / caveats / items / description
      Previous value: -"One supported restriction caveat. Constraints: minLength: 1; maxLength: 256. Example: \"max_target = 870000\"."New value: +"One supported restriction caveat. Constraints: minLength: 1; maxLength: 256. Example: \"time < 2026-12-31T23:59:59Z\"."
    • changedInput schema / properties / caveats / items / example
      Previous value: -"max_target = 870000"New value: +"time < 2026-12-31T23:59:59Z"
    • changedInput schema / properties / caveats / items / examples
      Previous value: -[
      -  "max_target = 870000"
      -]New value: +[
      +  "time < 2026-12-31T23:59:59Z"
      +]
    • addedInput schema / properties / expiresAt
      Added value: +{
      +  "description": "Optional absolute expiration boundary as a future UTC instant (YYYY-MM-DDTHH:MM:SSZ, optionally with .sss milliseconds). Appends `time < YYYY-MM-DDTHH:MM:SS.sssZ`; it cannot extend the parent's expiry. Mutually exclusive with ttlSeconds. Constraints: format: date-time; pattern: ^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{3})?Z$. Example: \"2026-12-31T23:59:59Z\".",
      +  "example": "2026-12-31T23:59:59Z",
      +  "examples": [
      +    "2026-12-31T23:59:59Z"
      +  ],
      +  "format": "date-time",
      +  "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{3})?Z$",
      +  "type": "string"
      +}
    • changedInput schema / properties / macaroon / description
      Previous value: -"Required authentic, unexpired parent L402 macaroon (1-8192 characters); caveats and ttlSeconds can only narrow its scope. Constraints: minLength: 1; maxLength: 8192. Example: \"base64url-parent-macaroon\"."New value: +"Required authentic, unexpired parent L402 macaroon (1-8192 characters); added restrictions can only narrow its scope. Constraints: minLength: 1; maxLength: 8192. Example: \"base64url-parent-macaroon\"."
    • addedInput schema / properties / tools
      Added value: +{
      +  "description": "Optional exact MCP tool targets (1-16 unique names). Appends one `rpc = tool[,tool...]` caveat; the child is refused for every other tool. Matching is exact, so a legacy alias is a different name. Each tool must already be authorized by the parent: an MCP L402 credential authorizes the single tool named in its allowed_path. Constraints: minItems: 1; maxItems: 16. Example: [\"stratigraphy.get_diff\"].",
      +  "example": [
      +    "stratigraphy.get_diff"
      +  ],
      +  "examples": [
      +    [
      +      "stratigraphy.get_diff"
      +    ]
      +  ],
      +  "items": {
      +    "description": "Registered MCP tool name or supported legacy alias. Constraints: pattern: ^[a-z][a-z0-9]*\\.[a-z][a-z0-9_]*$. Example: \"stratigraphy.get_diff\".",
      +    "example": "stratigraphy.get_diff",
      +    "examples": [
      +      "stratigraphy.get_diff"
      +    ],
      +    "pattern": "^[a-z][a-z0-9]*\\.[a-z][a-z0-9_]*$",
      +    "type": "string"
      +  },
      +  "maxItems": 16,
      +  "minItems": 1,
      +  "type": "array",
      +  "uniqueItems": true
      +}
    • changedInput schema / properties / ttlSeconds / description
      Previous value: -"Optional positive integer TTL of 1-2592000 seconds (e.g. 3600); appends an expiration caveat without extending the parent's expiry. Constraints: minimum: 1; maximum: 2592000. Example: 3600."New value: +"Optional positive integer TTL of 1-2592000 seconds (e.g. 3600). Appends `time <` at the current time plus ttlSeconds; it cannot extend the parent's expiry. Mutually exclusive with expiresAt. Constraints: minimum: 1; maximum: 2592000. Example: 3600."
    • changedInput schema / required
      Previous value: -[
      -  "macaroon",
      -  "caveats"
      -]New value: +[
      +  "macaroon"
      +]
    • changedOutput schema / examples
      Previous value: -[
      -  {
      -    "appliedCaveats": [
      -      "max_target=870000"
      -    ],
      -    "attenuatedMacaroon": "base64url-child-macaroon",
      -    "issuedAt": "2026-09-27T21:00:00.000Z",
      -    "status": "attenuated"
      -  }
      -]New value: +[
      +  {
      +    "appliedCaveats": [
      +      "max_target=870000",
      +      "time < 2026-12-31T23:59:59.000Z",
      +      "rpc = stratigraphy.get_diff"
      +    ],
      +    "attenuatedMacaroon": "base64url-child-macaroon",
      +    "issuedAt": "2026-09-27T21:00:00.000Z",
      +    "status": "attenuated"
      +  }
      +]
    • changedOutput schema / properties / appliedCaveats / description
      Previous value: -"New canonical caveats appended to the parent; inherited caveats are preserved inside the token. Example: [\"max_target=870000\"]."New value: +"New canonical caveats appended to the parent; inherited caveats are preserved inside the token. Example: [\"max_target=870000\",\"time < 2026-12-31T23:59:59.000Z\",\"rpc = stratigraphy.get_diff\"]."
    • changedOutput schema / properties / appliedCaveats / example
      Previous value: -[
      -  "max_target=870000"
      -]New value: +[
      +  "max_target=870000",
      +  "time < 2026-12-31T23:59:59.000Z",
      +  "rpc = stratigraphy.get_diff"
      +]
    • changedOutput schema / properties / appliedCaveats / examples
      Previous value: -[
      -  [
      -    "max_target=870000"
      -  ]
      -]New value: +[
      +  [
      +    "max_target=870000",
      +    "time < 2026-12-31T23:59:59.000Z",
      +    "rpc = stratigraphy.get_diff"
      +  ]
      +]
    • changedOutput schema / properties / appliedCaveats / items / description
      Previous value: -"One appended canonical caveat. Example: \"max_target=870000\"."New value: +"One appended canonical caveat. Example: \"rpc = stratigraphy.get_diff\"."
    • changedOutput schema / properties / appliedCaveats / items / example
      Previous value: -"max_target=870000"New value: +"rpc = stratigraphy.get_diff"
    • changedOutput schema / properties / appliedCaveats / items / examples
      Previous value: -[
      -  "max_target=870000"
      -]New value: +[
      +  "rpc = stratigraphy.get_diff"
      +]
  2. Changed4 schema fields changed
    • changedInput schema / examples
      Previous value: -[
      -  {
      -    "caveats": [
      -      "allowed_tools = stratigraphy.get,stratigraphy.digest",
      -      "max_target = 870000"
      -    ],
      -    "macaroon": "base64url-parent-macaroon",
      -    "ttlSeconds": 3600
      -  }
      -]New value: +[
      +  {
      +    "caveats": [
      +      "allowed_tools = stratigraphy.get,stratigraphy.get_digest",
      +      "max_target = 870000"
      +    ],
      +    "macaroon": "base64url-parent-macaroon",
      +    "ttlSeconds": 3600
      +  }
      +]
    • changedInput schema / properties / caveats / description
      Previous value: -"List of restriction caveats to append (e.g. ['time_before = 2026-12-31', 'max_target = 870000', 'allowed_tools = stratigraphy.get,stratigraphy.digest']). Existing allowed_path and max_requests restrictions are also supported. Constraints: maxItems: 16. Example: [\"time_before = 2026-12-31\",\"max_target = 870000\",\"allowed_tools = stratigraphy.get,stratigraphy.digest\"]."New value: +"List of restriction caveats to append (e.g. ['time_before = 2026-12-31', 'max_target = 870000', 'allowed_tools = stratigraphy.get,stratigraphy.get_digest']). Existing allowed_path and max_requests restrictions are also supported. Constraints: maxItems: 16. Example: [\"time_before = 2026-12-31\",\"max_target = 870000\",\"allowed_tools = stratigraphy.get,stratigraphy.get_digest\"]."
    • changedInput schema / properties / caveats / example
      Previous value: -[
      -  "time_before = 2026-12-31",
      -  "max_target = 870000",
      -  "allowed_tools = stratigraphy.get,stratigraphy.digest"
      -]New value: +[
      +  "time_before = 2026-12-31",
      +  "max_target = 870000",
      +  "allowed_tools = stratigraphy.get,stratigraphy.get_digest"
      +]
    • changedInput schema / properties / caveats / examples
      Previous value: -[
      -  [
      -    "time_before = 2026-12-31",
      -    "max_target = 870000",
      -    "allowed_tools = stratigraphy.get,stratigraphy.digest"
      -  ]
      -]New value: +[
      +  [
      +    "time_before = 2026-12-31",
      +    "max_target = 870000",
      +    "allowed_tools = stratigraphy.get,stratigraphy.get_digest"
      +  ]
      +]
  3. Changed3 schema fields changed
    • changedInput schema / description
      Previous value: -"Derive a narrower child of an authentic, unexpired subscription macaroon; this delegation call does not issue a payment invoice."New value: +"Provide an authentic parent macaroon, an array of restrictions, and optional TTL; child caveats intersect with inherited constraints and no payment invoice is issued."
    • changedInput schema / properties / macaroon / description
      Previous value: -"Base L402 Macaroon string to attenuate. Constraints: minLength: 1; maxLength: 8192. Example: \"base64url-parent-macaroon\"."New value: +"Required authentic, unexpired parent L402 macaroon (1-8192 characters); caveats and ttlSeconds can only narrow its scope. Constraints: minLength: 1; maxLength: 8192. Example: \"base64url-parent-macaroon\"."
    • changedInput schema / properties / ttlSeconds / description
      Previous value: -"Optional time-to-live in seconds to automatically append an expiration caveat. Must be a positive integer of at most 30 days. Constraints: minimum: 1; maximum: 2592000. Example: 3600."New value: +"Optional positive integer TTL of 1-2592000 seconds (e.g. 3600); appends an expiration caveat without extending the parent's expiry. Constraints: minimum: 1; maximum: 2592000. Example: 3600."
  4. Added

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, and the description adds substantial context on top: HTTP 401 on expiry, HTTP 403 on unlisted tools, the rule that child authority cannot widen or reset inherited quota, and the auth-retry protocol. However, the 'Live L402 Satoshi settlement... issues the exact-priced Lightning invoice' passage is generic payment boilerplate that sits awkwardly next to the schema's statement that no invoice is issued, muddying rather than clarifying behavior.

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

Conciseness3/5

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

The purpose and caveat-formats material is well front-loaded, but the single trailing block runs long and folds in server-wide Lightning settlement boilerplate ('paid execution requires confirmed incoming settlement', 'Invoice creation alone is not payment') that is tangential to an attenuation call and partly conflicts with the schema. Trimming that boilerplate would sharpen an otherwise dense description.

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?

An output schema exists, so return values need no explanation, and the description covers authorization, every caveat form, error codes, and the narrowing guarantee. One residual gap: it states the call 'requires its own L402 authorization' while the schema says no invoice is issued, leaving an agent unsure whether this specific call triggers payment.

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 genuinely adds meaning: it explains that expiresAt/ttlSeconds compile to a `time <` caveat, that `tools` compiles to `rpc = tool[,tool...]` with exact matching (so a legacy alias is a different name), that caveats accept additional forms plus legacy aliases, and that at least one restriction is mandatory. That cross-parameter constraint is not derivable from the schema alone.

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 names a specific verb and resource and defines the mechanism precisely: 'Attenuate an authentic, unexpired L402 parent macaroon by appending strictly formatted first-party caveats.' An agent immediately knows this derives a narrowed child credential rather than verifying or notarizing one. It does not explicitly contrast itself against siblings like proof.verify or proof.ground, so sibling differentiation is implicit rather than stated.

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 operational context is given: at least one restriction (expiresAt/ttlSeconds, tools, or caveats) is required, expiresAt and ttlSeconds are mutually exclusive, and the call requires its own L402 authorization. The HTTP 402 pay-then-retry flow is spelled out. It stops short of saying when-not to use it (e.g., when to prefer proof.ground or proof.notarize), so no explicit alternative routing.

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.

Resources