Skip to main content
Glama
xlsx-for-ai

xlsx-for-ai

by senoff

xlsx_receipt

Attach a cryptographic AI-generation receipt to a workbook, recording the generating agent, time, prompt hash, and source inputs for provenance and audit.

Instructions

Use this when you need to attach a cryptographic AI-generation receipt to a workbook — who/what/when generated it, against which inputs.

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": {
      "file_path": "<file_path>",
      "agent_name": "<agent_name>"
    },
    "name": "xlsx_receipt"
  }
}

Input Schema

NameRequiredDescriptionDefault
out_pathNoOptional: write the receipted workbook to this absolute path. If omitted, the bytes are returned in _meta.file_b64 only.
file_pathYesAbsolute path to the .xlsx file to receipt.
agent_nameYesCanonical agent name (lowercase + dot/dash/underscore/slash/colon, 1-128 chars). Examples: "claude-sonnet-4-6", "claude-code/0.5.2", "custom:my-agent-v1".
descriptionNoOptional: short human-readable description of what the workbook is (≤256 chars).
prompt_hashNoOptional: hex SHA-256 of the prompt or instruction set that produced the workbook.
covers_sheetsNoOptional: sheets covered by the content hash. Default: all sheets.
mcp_tools_calledNoOptional: list of MCP tool names the agent called during generation.
agent_display_nameNoOptional: human-readable display name (e.g., "Acme Q4 Forecast Bot").
agent_identity_urlNoOptional: caller-declared identity URL (GitHub repo, registry entry, etc.).
source_file_hashesNoOptional: array of {name, sha256} entries describing source files the agent read to produce this workbook.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed18 schema fields changedv4.3.1
    • removedInput schema / properties / agent
      Removed value: -{
      -  "properties": {
      -    "display_name": {
      -      "maxLength": 256,
      -      "type": "string"
      -    },
      -    "identity_url": {
      -      "maxLength": 512,
      -      "type": "string"
      -    },
      -    "name": {
      -      "maxLength": 128,
      -      "minLength": 1,
      -      "pattern": "^[a-z0-9][a-z0-9\\-_/.:]{0,127}$",
      -      "type": "string"
      -    }
      -  },
      -  "required": [
      -    "name"
      -  ],
      -  "type": "object"
      -}
    • addedInput schema / properties / agent_display_name
      Added value: +{
      +  "description": "Optional: human-readable display name (e.g., \"Acme Q4 Forecast Bot\").",
      +  "type": "string"
      +}
    • addedInput schema / properties / agent_identity_url
      Added value: +{
      +  "description": "Optional: caller-declared identity URL (GitHub repo, registry entry, etc.).",
      +  "type": "string"
      +}
    • addedInput schema / properties / agent_name
      Added value: +{
      +  "description": "Canonical agent name (lowercase + dot/dash/underscore/slash/colon, 1-128 chars). Examples: \"claude-sonnet-4-6\", \"claude-code/0.5.2\", \"custom:my-agent-v1\".",
      +  "type": "string"
      +}
    • addedInput schema / properties / covers_sheets / description
      Added value: +"Optional: sheets covered by the content hash. Default: all sheets."
    • removedInput schema / properties / covers_sheets / items / maxLength
      Removed value: -128
    • removedInput schema / properties / covers_sheets / maxItems
      Removed value: -100
    • addedInput schema / properties / description / description
      Added value: +"Optional: short human-readable description of what the workbook is (≤256 chars)."
    • removedInput schema / properties / description / maxLength
      Removed value: -256
    • removedInput schema / properties / file_b64
      Removed value: -{
      -  "type": "string"
      -}
    • addedInput schema / properties / file_path
      Added value: +{
      +  "description": "Absolute path to the .xlsx file to receipt.",
      +  "type": "string"
      +}
    • removedInput schema / properties / inputs
      Removed value: -{
      -  "properties": {
      -    "custom": {
      -      "type": "object"
      -    },
      -    "mcp_tools_called": {
      -      "items": {
      -        "maxLength": 128,
      -        "minLength": 1,
      -        "type": "string"
      -      },
      -      "maxItems": 100,
      -      "type": "array"
      -    },
      -    "prompt_hash": {
      -      "pattern": "^[a-f0-9]{64}$",
      -      "type": "string"
      -    },
      -    "source_file_hashes": {
      -      "items": {
      -        "properties": {
      -          "name": {
      -            "maxLength": 256,
      -            "minLength": 1,
      -            "type": "string"
      -          },
      -          "sha256": {
      -            "pattern": "^[a-f0-9]{64}$",
      -            "type": "string"
      -          }
      -        },
      -        "required": [
      -          "name",
      -          "sha256"
      -        ],
      -        "type": "object"
      -      },
      -      "maxItems": 200,
      -      "type": "array"
      -    }
      -  },
      -  "type": "object"
      -}
    • addedInput schema / properties / mcp_tools_called
      Added value: +{
      +  "description": "Optional: list of MCP tool names the agent called during generation.",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedInput schema / properties / out_path
      Added value: +{
      +  "description": "Optional: write the receipted workbook to this absolute path. If omitted, the bytes are returned in _meta.file_b64 only.",
      +  "type": "string"
      +}
    • addedInput schema / properties / prompt_hash
      Added value: +{
      +  "description": "Optional: hex SHA-256 of the prompt or instruction set that produced the workbook.",
      +  "type": "string"
      +}
    • addedInput schema / properties / source_file_hashes
      Added value: +{
      +  "description": "Optional: array of {name, sha256} entries describing source files the agent read to produce this workbook.",
      +  "items": {
      +    "properties": {
      +      "name": {
      +        "type": "string"
      +      },
      +      "sha256": {
      +        "description": "Hex SHA-256 (64 lowercase chars).",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "name",
      +      "sha256"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • removedInput schema / properties / workbook_handle
      Removed value: -{
      -  "maxLength": 128,
      -  "minLength": 1,
      -  "type": "string"
      -}
    • changedInput schema / required
      Previous value: -[
      -  "agent"
      -]New value: +[
      +  "file_path",
      +  "agent_name"
      +]
  2. First observedv3.2.1

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare this is a non-read-only, non-destructive, non-idempotent, closed-world write, so the safety profile is covered. The description adds useful conceptual context (what a receipt attests to) but says nothing about whether the source workbook is modified in place or a new artifact is emitted, nor that repeated calls produce distinct 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?

A single sentence with the trigger front-loaded and zero filler; every clause (cryptographic, who/what/when, against which inputs) carries distinct meaning.

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

Completeness3/5

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

For a 10-parameter mutation tool with no output schema, the description covers the purpose but omits the one thing an agent most needs to know: whether the original .xlsx is overwritten or a receipted copy is produced. The schema fills in the rest, so the definition is workable but not self-sufficient.

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%, so every one of the 10 parameters is already documented, including the out_path-vs-_meta.file_b64 return behavior. The description only maps its 'who/what/when/inputs' phrase loosely onto the agent_*/description/prompt_hash/source_file_hashes families; baseline 3 applies since the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description gives a specific verb and resource: 'attach a cryptographic AI-generation receipt to a workbook', and enumerates the receipt's content (who/what/when/inputs). That is enough to separate it from read-only siblings like xlsx_verify_receipt or xlsx_describe, though no sibling is named explicitly.

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

Usage Guidelines3/5

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

The trigger condition 'Use this when you need to attach ... a receipt' is stated, which is a genuine usage hint. It offers no when-not guidance, no prerequisites (e.g., the file must already exist as .xlsx), and no pointer to xlsx_verify_receipt for the read/verify direction.

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