Skip to main content
Glama

Attach receipt to expense

attach_expense_receipt

Attach the original receipt (photo or PDF) to an existing expense (gasto), so it is archived with it and goes into the gestoría export, exactly like the upload in the web app. Existing files stay; an expense holds at most 5 files (e.g. invoice plus delivery note, or a two-page ticket as two photos). contix only stores the file, it does not read it: enter the amounts with create_expense / update_expense first. Accepted: JPG, PNG, WEBP, HEIC, PDF, max 10 MB. Returns the expense id, the stored file name and how many files the expense now holds.

Input Schema

NameRequiredDescriptionDefault
filenameNooriginal file name, e.g. ticket-repsol.jpg
mime_typeNooptional; detected from the content if missing
expense_idYesexpense id from create_expense or list_expenses
file_base64Yesthe file content, base64-encoded (no data: prefix needed)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.7/5.0
Behavior5/5

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

Annotations only declare readOnlyHint=false and destructiveHint=false; the description goes well beyond by disclosing that existing files are preserved, that an expense holds at most 5 files, that contix stores but does not read the file, accepted formats and the 10 MB cap. It also pre-announces the return payload (expense id, stored file name, file count), which no structured field provides.

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?

Front-loads the core action, then layers constraints, prerequisites and return values in a tight paragraph with zero filler. The parenthetical examples (two-page ticket as two photos) clarify the file-count rule rather than padding.

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

Completeness5/5

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

For a mutation tool with no output schema, the description covers the prerequisite ordering, format/size limits, file-count ceiling, retention behavior and the return shape. Nothing an agent needs to invoke it correctly is missing.

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%, so the baseline is 3, but the description adds real meaning for file_base64/mime_type by enumerating accepted formats (JPG, PNG, WEBP, HEIC, PDF) and the 10 MB limit, which the schema does not express. It adds nothing further for expense_id or filename beyond the schema.

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 and resource ('attach the original receipt ... to an existing expense') and immediately scopes it against siblings by telling the agent to set amounts with create_expense / update_expense first. An agent can distinguish this from create_expense, update_expense and list_expenses without opening any 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 sequences usage ('enter the amounts with create_expense / update_expense first') and frames the operation as equivalent to the web app upload. It gives clear context but does not state an explicit when-not-to-use case or name a competing alternative for file storage.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources