Skip to main content
Glama

bitcoin-stratigraphy

Ground Agent Context in Bitcoin State

proof.ground

PURPOSE: Creates a signed epistemic anchor receipt for agent context grounded in the current Bitcoin tip. USAGE: Use to ground agent context and obtain a verifiable receipt. Do NOT use for raw ZK proof verification; use proof.verify instead. PARAMETERS: Accepts contextHash as a 64-character case-insensitive hexadecimal SHA-256 digest, agentId as a trimmed 1-256 character string, and an optional metadata object. BEHAVIOR: Validates context and checks Bitcoin tip and signing readiness before requesting payment; after 250-sat L402 settlement, returns a signed receipt without a second HTTP payment. Rate limit: 60 req/min per IP shared across /mcp. RETURNS: Object containing receipt with signed payload, Merkle proof, NIP-78 signature, normalized contextHash and agentId, blockHeight, blockHash, and timestamp; verify it through /api/v1/zk/verify. ERRORS: -32602 (Invalid Parameters) for malformed context, HTTP 402 (Payment Required) with a 250-sat invoice when unpaid, 429 (Rate Limit), or 503 when Bitcoin tip or signing is unavailable.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
agentIdYesTrimmed client or agent identifier string from 1 to 256 characters.research-agent-7
metadataNoKey-value JSON object containing arbitrary metadata.
contextHashYes64-character case-insensitive hexadecimal SHA-256 digest string; normalized to lowercase.4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
receiptYesFull signed receipt; send unchanged to POST /api/v1/zk/verify as attestation.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations are present (readOnlyHint:false, idempotentHint:false, destructiveHint:false), and the description adds substantial behavioral context beyond them. It discloses the payment flow (250-sat L402 settlement, no second HTTP payment), validation of Bitcoin tip and signing readiness, rate limits (60 req/min shared across /mcp), and error conditions (402, 429, 503, -32602). No contradiction with annotations.

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 structured with labeled sections (PURPOSE, USAGE, PARAMETERS, BEHAVIOR, RETURNS, ERRORS) that front-load purpose and make scanning easy. Length is justified by the tool's complexity (payment, verification, multiple error modes). No redundant sentences; each section adds necessary information.

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

Completeness5/5

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

Despite having an output schema, the description still summarizes the return object's fields and gives a verification endpoint, which is useful. It also covers parameter validation and error handling, making the tool safe to invoke without external documentation. The addition of rate limits and settlement details completes the invocation context.

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%, and each parameter is already documented in the schema with details like the pattern, min/max lengths, and normalization. The description simply repeats these facts in the PARAMETERS section without adding new semantic meaning, so the baseline of 3 is appropriate.

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 opens with 'Creates a signed epistemic anchor receipt for agent context grounded in the current Bitcoin tip', which states a specific verb, resource, and scope. It also explicitly distinguishes this tool from proof.verify by naming the alternative for raw ZK proof verification, allowing an agent to select it correctly without opening schemas.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The USAGE section states 'Use to ground agent context and obtain a verifiable receipt' and explicitly says 'Do NOT use for raw ZK proof verification; use proof.verify instead.' This provides clear when-to-use and when-not-to-use guidance with the specific alternative. No ambiguity remains about which sibling to choose.

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