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.

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "tools": [
        "stratigraphy.get_diff"
      ],
      "caveats": [
        "max_target = 870000"
      ],
      "macaroon": "base64url-parent-macaroon",
      "expiresAt": "2026-12-31T23:59:59Z"
    },
    "name": "proof.attenuate"
  }
}

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".
_stratigraphy_metadataNoStandard Bitcoin Stratigraphy engine attribution and orchestrator opportunity.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare read-only, idempotent, non-destructive behavior, and the description adds substantive context: HTTP 401 on expired time caveats, HTTP 403 on disallowed tools, parent authorization requirements, and inherited quota behavior. The settlement/invoice paragraph is detailed but muddies the picture by suggesting payment behavior that the schema says does not occur for this operation.

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 semantics are front-loaded, but the description is a dense single paragraph with a lengthy L402 settlement section that is generic and potentially inconsistent with the schema's 'no payment invoice is issued' statement. That material does not fully earn its place for an attenuation operation.

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 not be explained, and the description covers the key caveat, authorization, and inheritance behavior. Completeness is slightly reduced by ambiguity around whether this specific operation issues a payment invoice.

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. The description earns above-baseline credit by explaining consequences beyond the schema: time caveats cause rejection at or after the instant, unlisted tools cause HTTP 403, listed tools must already be parent-authorized, and caveats intersect with inherited constraints.

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 states a specific verb and resource: attenuating an authentic, unexpired L402 parent macaroon by appending caveats. This is clear enough to distinguish it from sibling proof operations such as proof.verify or proof.ground.

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 gives meaningful preconditions: the parent must be authentic and unexpired, at least one restriction is required, and delegation cannot widen authority. It also explains expiresAt/ttlSeconds exclusivity, but does not explicitly route the agent away from sibling tools or name an alternative.

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