Skip to main content
Glama
georgebashi

lunchmoney-mcp

by georgebashi

attach_file_to_transaction

Attach a local image or PDF receipt to a LunchMoney transaction, validating file type and size (max 10MB).

Instructions

Attach a local image or PDF receipt (max 10MB) to a transaction. Allowed types: image/jpeg, image/png, image/heic, image/heif, application/pdf. The file is read from the local filesystem of the host running this MCP server, and its type is determined from its actual contents — files that are not a real image or PDF are rejected. If LUNCHMONEY_ATTACHMENTS_DIR is set on the host, only files inside that directory can be attached.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
notesNoOptional notes describing the attachment.
file_pathYesAbsolute or relative path to the receipt file on the local filesystem. Must be a regular file whose contents are a JPEG, PNG, HEIC, HEIF, or PDF. If the host sets LUNCHMONEY_ATTACHMENTS_DIR, the path must resolve inside that directory.
content_typeNoOptional assertion of the file's MIME type. The server always determines the real type from the file contents; if this disagrees with it, the request is rejected. Omit unless you need that check.
transaction_idYesID of the transaction to attach the file to.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.0.0

TDQS

A4.7/5.0
Behavior5/5

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

Annotations provide only idempotentHint=false, so the description carries the full burden of behavioral disclosure. It thoroughly explains that the file is read from the host's local filesystem, the type is determined from actual contents rather than extension, invalid files are rejected, and LUNCHMONEY_ATTACHMENTS_DIR restricts accessible paths. This far exceeds the minimal annotation.

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 dense sentences front-load the action and object, then pack in all critical constraints: allowed types, size cap, local filesystem source, content-based validation, and environment-directory restriction. No filler or repeated schema content.

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 is remarkably complete: it covers what is attached, what file types are allowed, the size limit, where the file comes from, how validation works, and an environment-specific restriction. Nothing needed to correctly invoke the tool 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 description coverage is 100%, so the baseline is 3. The description adds meaningful tool-level semantics beyond the schema: the 10MB size limit, the local-filesystem source, and the content-sniffing behavior. These details help the agent understand the true constraints on file_path and content_type without being redundant.

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?

The description uses a specific verb ('Attach') with a clear resource ('a transaction') and object ('a local image or PDF receipt'), and distinguishes this from sibling tools like get_transaction_attachment_url and delete_transaction_attachment by its action alone. It is immediately obvious what the tool does.

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?

The description clearly establishes when to use this tool: when a receipt file needs to be attached to a transaction. It provides strong contextual constraints (local filesystem, allowed MIME types, max size, environment-directory restriction) but does not explicitly name alternatives or state when not to use it. This is clear context without exclusions.

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