Skip to main content
Glama

Receipts: Mint receipt

metrecept_mint_receipt

Mint a fresh signed Ed25519 receipt (compact JWS) of a chosen kind via a real gateway call, returning kid, iat, and verify_url to show or test receipt verification end to end.

Instructions

Mint one fresh signed Ed25519 receipt (compact JWS) of a chosen kind by making the smallest real gateway call that produces it, and return the receipt with its kid, iat and a verify_url. Use it to show or test receipt verification end to end, or to attach a real receipt to a demo or bug report. Not for a run you already made: use metrecept_get_session_receipt. Not for a public savings page: use metrecept_publish_savings_receipt. Each kind makes real calls billed as normal (cache_miss, finops, cache_bypass, web_fetch and api_call are metered; cache_hit bills one miss then a hit). Anyone can check verify_url in a browser against the public key directory. Errors come back as JSON {"error", ...}: no_api_service when kind api_call has no registered service, no_receipt when none of that kind came back. Requires a Metrecept API key (METRECEPT_API_KEY env on stdio, or Authorization: Bearer on remote HTTP); results are scoped to that key's tenant only.

Input Schema

NameRequiredDescriptionDefault
kindYesReceipt kind to mint. cache_miss/finops: one fresh "mock" chat call. cache_hit: the same prompt twice, receipt from the replay. cache_bypass: fresh call with cache_control no_store. web_fetch: chat call grounded in https://example.com/. session: one tagged chat call, then the session aggregate. custody: one "access" custody record for a placeholder subject. statement: this month's ledger statement. carve: one carve hop over the label, disperse off. savings: savings attestation. api_call: GET through your first registered API service (needs one).
labelNoFree text mixed into the minted request so each run is unique and recognisable, e.g. a PR or ticket id (default "metrecept-mint").metrecept-mint

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.4.1

TDQS

A4.9/5.0
Behavior5/5

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

With no annotations, the description carries the behavioral burden thoroughly: it discloses real gateway calls, per-kind metering behavior, signed Ed25519/JWS output, browser verification against the public key directory, structured error codes, API-key auth requirements, and tenant scoping. These are exactly the operational details an agent needs before invoking a billed mutating-style tool.

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 front-loaded with purpose, then usage and exclusions, then billing, verification, errors, and auth. Despite its length, every sentence adds operational value for a multi-kind billed tool, with no filler.

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?

Given the complexity, no annotations, and an output schema, the description is complete enough: it covers purpose, alternatives, billing, error modes, verification, and authentication/scoping. Return-value details are appropriately left to the output schema while the description still names the key fields.

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 schema already defines both parameters including the kind enum and label. The description adds useful parameter-specific behavior beyond the schema, notably which kinds are metered, how cache_hit is billed, and the api_call no_api_service error condition, though it does not add meaning for every enum value.

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: mint one signed Ed25519 receipt of a chosen kind, returning compact JWS with kid, iat, and verify_url. It explicitly distinguishes itself from metrecept_get_session_receipt and metrecept_publish_savings_receipt, so an agent can select it without opening sibling 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?

It gives clear use cases: show or test receipt verification end to end, attach a real receipt to a demo or bug report. It also gives explicit exclusions with alternatives for an existing run and a public savings page, plus notes that each kind makes real billed calls.

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