Skip to main content
Glama

Upload an invoice-specific attachment

upload_sales_invoice_attachment

Upload a base64-encoded file (PDF, image, DOC, XLS) as an attachment to a sales invoice. Attachments are included in email sends and preserved on invoice updates.

Instructions

Upload an invoice-specific attachment.

Upload a file as a document-specific attachment for a sales invoice. The file content must be base64-encoded. Supported types: PDF, PNG, JPEG, GIF, DOC, DOCX, XLS, XLSX. Maximum size: 10 MB. The attachment is automatically included when the invoice is sent by email and is preserved when the invoice is updated. Do not reference these IDs in the 'attachments' field of POST/PUT requests; manage them only through this endpoint.

[Sales Invoices] POST /invoices/sales/{id}/attachments

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesThe ID of the sales invoice.
bodyYes
administrationNoThe client administration to act on. Only one is configured: default.
Install Server

TDQS

A4.5/5.0
Behavior5/5

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

Beyond the annotations (readOnlyHint=false, destructiveHint=false), the description discloses key behavioral traits: the attachment is automatically included in invoice emails, preserved on invoice updates, and managed only through this endpoint. This gives the agent a clear mental model of side effects and lifecycle behavior, exceeding what annotations provide.

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 information-dense but slightly repetitive ('Upload' appears twice) and includes an endpoint reference that may be redundant. Still, key facts are front-loaded and every sentence carries useful guidance. Minor redundancy keeps it from a 5.

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?

Given there is no output schema, the description does not specify the response format, which is a minor gap. However, for an upload operation, the key success criteria (file types, size, inclusion behavior) are covered. The description is complete enough for an agent to call the tool correctly, with only slight ambiguity about return values.

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?

The schema already describes all three top-level parameters and nested fields, so baseline is 3. The description adds meaningful details: base64-encoding requirement, supported file types, and maximum size, which complement the schema's 'Base64-encoded file content' and filename example. This adds value beyond the schema, justifying a 4.

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 states a specific verb ('Upload') and resource ('invoice-specific attachment for a sales invoice'), making the tool's purpose immediately clear. It also distinguishes it from siblings like download_sales_invoice_attachment and delete_sales_invoice_attachment by explicitly mentioning the upload action and the invoice context.

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 provides strong usage context: supported file types, size limits, and automatic inclusion in email sends. It also gives an important exclusion ('Do not reference these IDs in the 'attachments' field of POST/PUT requests'), which guides correct use. However, it does not explicitly name alternative tools or state when not to use this endpoint, leaving some inference to the agent.

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

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/vladxyz/informer-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server