Skip to main content
Glama
manganate006

OpenLMNP

Attach Document

attach_document
Destructive

Attach supporting documents like invoices, receipts, or quotes to expenses, assets, or work items. Accepts base64, server file path, or HTTP URL input for flexible uploads.

Instructions

Attache un document justificatif (facture, reçu, devis) à une charge, un mobilier ou un poste de travaux. Trois modes d'entrée mutuellement exclusifs : file_base64 (contenu encodé), file_path (chemin absolu sur le serveur, nécessite MCP_FILE_PATH_PREFIX), file_url (URL http/https téléchargée par le serveur). Le chemin de stockage est : documents/{user_id}/{type}/{filename}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeYes
labelYes
amountNo
file_urlNo
filenameNo
file_pathNo
record_idYes
file_base64No
document_dateNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A3.7/5.0
Behavior3/5

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

Given destructiveHint=true, the description adds useful behavioral context such as the storage path ('documents/{user_id}/{type}/{filename}') and the requirement for file_path to have MCP_FILE_PATH_PREFIX. However, it does not disclose potential side effects like overwriting existing documents or what happens on duplicate attachments, leaving some ambiguity beyond the annotation.

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?

The description is concise, using only two sentences. The first sentence delivers the core purpose, and the second packs the input modes and storage path efficiently. There is no fluff, and the structure front-loads the most important information.

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

Completeness2/5

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

The tool is moderately complex with 9 parameters, no output schema, and no parameter descriptions. The description covers the file modes but leaves required parameters like record_id and label undefined, and does not clarify the meaning of type beyond its use in the storage path. It also omits any constraints on file size/type and what the tool returns, making it incomplete for reliable invocation.

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?

The description significantly clarifies the three file-input parameters (file_base64, file_path, file_url) and indirectly explains filename via the storage path. It also hints at the meaning of type through the storage path. However, with schema description coverage at 0%, it does not explain record_id, label, amount, or document_date, leaving ambiguity for about half the parameters.

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 clearly states the action ('Attache un document justificatif'), the object ('document'), and the target records ('une charge, un mobilier ou un poste de travaux'). It also specifies document types (facture, reçu, devis) and distinguishes itself from sibling tools like delete_document or export_documents.

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?

It provides explicit usage guidance by listing three mutually exclusive input modes (file_base64, file_path, file_url) and calls out the prerequisite for file_path (MCP_FILE_PATH_PREFIX). It implies when to use this tool (to attach a document to a record) but does not explicitly discuss alternatives or exclusions, though that is largely self-evident.

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