Skip to main content
Glama

Bewijsstuk bewaren

attach_receipt

Store the original receipt or purchase invoice for an expense from a file, path, URL, or base64 content; the document is archived and the database keeps only a SHA-256 hash.

Instructions

Store the original receipt or purchase invoice of an expense (JPG, PNG, WEBP, HEIC or PDF, max 10 MB). Pass exactly one source: file when the app hands you an uploaded file object, file_path when Bookiz runs on the same computer as you, url for an https download link, or content_base64. The file is e-mailed to the owner’s archive mailbox or written to the data folder; the database keeps only a SHA-256 hash. If you cannot pass the file, give the owner the upload link from record_expense.

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": {
      "ref": "<ref>"
    },
    "name": "attach_receipt"
  }
}

Input Schema

NameRequiredDescriptionDefault
refYesExpense reference, e.g. K2026-001
urlNo
fileNo
file_pathNo
content_base64No

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior4/5

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

Beyond the annotations (readOnlyHint=false, destructiveHint=false, openWorldHint=true), the description discloses where the payload actually goes — the owner's archive mailbox or the data folder — and that only a SHA-256 hash is persisted in the database. The accepted formats and 10 MB cap add practical call constraints. It stops short of covering deduplication, error behavior, or what is returned on success.

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?

Three tight sentences, front-loaded with the resource and format/size limits, then the source-selection rules, then the storage consequence and fallback. No sentence is decorative; every clause carries operational information.

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 five-parameter write tool with a nested object and no output schema, the definition covers formats, size limit, source selection, storage destination, and a fallback path. The remaining gap is what the call returns or how failures surface, which an agent might want before retrying.

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 only 20% (just ref), so the description must carry the load: it does so for all four source parameters and their preconditions. The nested file object's required members (download_url, file_id) are left to the schema, and ref's format is only documented in the schema, so it is not a full compensation.

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?

"Store the original receipt or purchase invoice of an expense" gives a specific verb and resource, and the closing sentence distinguishes it from record_expense by naming the sibling as the alternative path. An agent can tell this is the attachment-upload tool, not the expense-creation tool, without opening the schema.

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?

The description spells out exactly which of the four source parameters to use and under which runtime condition (app-supplied file object, same machine, https link, base64), and states they are mutually exclusive with "pass exactly one source." It also covers the fallback when no file can be passed, routing the agent to record_expense's upload link.

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