complete_receipt
Finalize a pending receipt by recording execution results, costs, and output data. Updates status to completed, failed, or timeout and re-signs with Ed25519.
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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"receipt_id": "<receipt_id>",
"status": "<status>"
},
"name": "complete_receipt"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | Error details if status is "failed" (e.g., {"code": "TIMEOUT", "message": "..."}) | |
| model | No | AI model used during execution | |
| status | Yes | Final status: "completed" (success), "failed" (error occurred), or "timeout" (timed out) | |
| cost_usd | No | Total cost in USD | |
| tokens_in | No | Input tokens consumed | |
| confidence | No | Confidence score for output quality, 0.0 to 1.0 | |
| latency_ms | No | Total execution time in milliseconds | |
| receipt_id | Yes | The receipt ID to complete — must be a pending receipt (status: "pending") | |
| tokens_out | No | Output tokens generated | |
| tool_calls | No | Names of tools called during execution | |
| output_hash | No | Pre-computed SHA-256 hash of the output in format "sha256:hexstring" | |
| output_summary | No | Human-readable summary of the execution result | |
| callback_verified | No | Whether an external callback verified the result |