Skip to main content
Glama

complete_receipt

Finalize pending receipts by recording execution results, costs, and output data. Updates status to completed, failed, or timeout with Ed25519 signing. Completes two-phase tracking for cryptographic accountability after initial receipt creation.

Instructions

Finalize a pending receipt by recording execution results, costs, and output data. Updates the receipt status to completed, failed, or timeout and re-signs with Ed25519. Use after create_receipt when you need to record results separately from creation (two-phase tracking). Cannot complete an already-completed receipt. Returns the updated signed receipt.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
receipt_idYesThe receipt ID to complete — must be a pending receipt (status: "pending")
statusYesFinal status: "completed" (success), "failed" (error occurred), or "timeout" (timed out)
output_hashNoPre-computed SHA-256 hash of the output in format "sha256:hexstring"
output_summaryNoHuman-readable summary of the execution result
modelNoAI model used during execution
tokens_inNoInput tokens consumed
tokens_outNoOutput tokens generated
cost_usdNoTotal cost in USD
latency_msNoTotal execution time in milliseconds
tool_callsNoNames of tools called during execution
confidenceNoConfidence score for output quality, 0.0 to 1.0
callback_verifiedNoWhether an external callback verified the result
errorNoError details if status is "failed" (e.g., {"code": "TIMEOUT", "message": "..."})
Behavior4/5

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

With no annotations provided, the description carries the full disclosure burden. It successfully communicates the cryptographic re-signing behavior ('re-signs with Ed25519'), state transition mechanics (pending to completed/failed/timeout), and return value ('updated signed receipt'). Minor gap: does not specify error behavior when attempting to complete non-existent or already-completed receipts.

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?

Five sentences with zero redundancy: purpose, mechanism, usage context, constraint, and return value. Each sentence earns its place. The description is front-loaded with the core action and maintains high information density throughout.

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?

For a complex 13-parameter stateful tool with cryptographic operations, the description adequately covers the workflow (two-phase tracking), state machine constraints, and return value despite the absence of annotations or output schema. Could be improved with error condition specifics, but sufficient for correct invocation.

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%, establishing a baseline of 3. The description adds value by semantically grouping the 13 parameters into 'execution results, costs, and output data,' providing conceptual structure that helps an agent understand what information to aggregate when calling the tool.

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 a specific verb-resource combination ('Finalize a pending receipt') and scope ('recording execution results, costs, and output data'). It clearly distinguishes from sibling tool create_receipt by positioning itself as the second phase of a two-phase tracking workflow.

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?

Explicitly states when to use ('Use after create_receipt... two-phase tracking') and critical constraints ('Cannot complete an already-completed receipt'). The temporal sequencing relative to create_receipt provides clear decision criteria for tool selection.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/webaesbyamin/agent-receipts'

If you have feedback or need assistance with the MCP directory API, please join our Discord server