Skip to main content
Glama

Verify a receipt

verify_receipt
Read-only

Validate a canli validation receipt offline by checking its Ed25519 signature, output hash, and id. Provide the receipt or its id to fetch and confirm authenticity.

Instructions

Verify a receipt offline: its Ed25519 signature against the bundled canlicapital.com key, its output hash and its id. Send an id to fetch it first, or the receipt itself. The receipt is content-hashed, reproducible from the open-source core it names, and signed with Ed25519 by a key published at https://canlicapital.com/.well-known/canli-receipt-keys.json.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNoReceipt id from a validation result.
receiptNoA receipt object, to verify without fetching.
include_receiptNoWith id: also return the stored receipt.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorNo
validNo
checksNo
key_idNo
meaningNo
receipt_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.13.0
    • removedInput schema / properties / receipt / additionalProperties
      Removed value: -{}
    • removedInput schema / properties / receipt / propertyNames
      Removed value: -{
      -  "type": "string"
      -}
    • removedOutput schema / additionalProperties
      Removed value: -{}
    • changedOutput schema / properties / error / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": {},
      -    "properties": {},
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "properties": {},
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
  2. Changed2 schema fields changedv0.12.0
    • addedInput schema / properties / include_receipt
      Added value: +{
      +  "description": "With id: also return the stored receipt.",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / receipt / description
      Previous value: -"A receipt as get_receipt returns it, to verify without fetching."New value: +"A receipt object, to verify without fetching."
  3. Changed3 schema fields changedv0.10.1
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • changedInput schema / properties / receipt / description
      Previous value: -"A receipt as get_receipt returns it (its data), to verify without fetching it."New value: +"A receipt as get_receipt returns it, to verify without fetching."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "https://json-schema.org/draft/2020-12/schema",
      +  "additionalProperties": {},
      +  "description": "valid is true only when the signature, output hash and content id all check out; checks lists each.",
      +  "properties": {
      +    "checks": {},
      +    "error": {
      +      "anyOf": [
      +        {
      +          "additionalProperties": {},
      +          "properties": {},
      +          "type": "object"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "key_id": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "meaning": {
      +      "type": "string"
      +    },
      +    "receipt_id": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "valid": {
      +      "type": "boolean"
      +    }
      +  },
      +  "type": "object"
      +}
  4. Addedv0.6.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint/destructiveHint, so the safety profile is covered. The description adds substantial non-structured context: verification is offline, the algorithm is Ed25519, the key is bundled/published at a specific well-known URL, and receipts are content-hashed and reproducible from a named open-source core.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the core action and efficiently packed. Slightly redundant, restating the signature/Ed25519/key concept twice and appending a long URL mid-sentence, but no sentence is wasted.

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?

With an output schema present, the description needn't document return values, and it covers both input paths plus the crypto semantics. The only gap is failure behavior — what a failed or tampered-verification result looks like — which the output schema may or may not cover.

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 description coverage is 100%, so the baseline is 3. The description goes beyond the schema by clarifying the id-vs-receipt relationship (id triggers a fetch, receipt verifies without fetching), which resolves the real ambiguity in a zero-required-parameter 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?

States a specific verb (verify) and resource (receipt), and enumerates exactly what is checked: the Ed25519 signature against a named key, the output hash, and the id. An agent can distinguish this from the validate_* and backtest siblings without opening a schema.

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?

Explicitly covers the two input modes — 'Send an id to fetch it first, or the receipt itself' — which is the key usage decision for this tool. It does not, however, say when verification is warranted versus skipping it, nor reference any sibling tool.

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