Skip to main content
Glama

Download an invoice attachment

download_sales_invoice_attachment
Read-onlyIdempotent

Download a sales invoice attachment as base64 content or save it to a file. Retrieve file content for attachments linked to a sales invoice by providing invoice and attachment IDs.

Instructions

Download an invoice attachment.

Download the file content of an attachment linked to a sales invoice, base64-encoded. Works for both shared library attachments and invoice-specific document attachments, as long as the attachment is linked to this invoice. The file content is only returned by this endpoint, not in the invoice GET response.

[Sales Invoices] GET /invoices/sales/{id}/attachments/{attachment_id}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesThe ID of the sales invoice.
save_pathNoOptional absolute file path to write the decoded file to. When omitted the file is returned inline as a base64 resource.
attachment_idYesThe ID of the attachment to download.
administrationNoThe client administration to act on. Only one is configured: default.
Install Server

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already cover read-only and idempotent safety, so the bar is lower. The description adds useful behavioral context: the response is base64-encoded, the content is exclusive to this endpoint, and both shared library and invoice-specific attachments are supported. This goes beyond annotations by explaining the response format and scope.

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 two short paragraphs with the core verb and resource front-loaded. The first sentence repeats the title, but the second sentence packs essential facts efficiently, and the endpoint reference is a compact, useful addition. No unnecessary filler.

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 no output schema, the description explains the base64-encoded response and the alternative of using save_path (via schema). It also clarifies the relationship between attachments and invoices. It does not mention how to obtain the attachment_id or handle errors, but for a simple download operation with annotations covering safety, the essential context is present.

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 has 100% parameter coverage, so the baseline is 3. The description adds an implicit relationship constraint—the attachment must be linked to the invoice—which is not explicitly stated in the schema property descriptions. This clarifies the semantics of the id and attachment_id parameters beyond their individual type descriptions.

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 ('Download') and resource ('invoice attachment'), and clearly states the scope: both shared library and invoice-specific attachments linked to the invoice. It also differentiates from the invoice GET endpoint by noting the file content is only returned here. This makes the tool's purpose unambiguous and distinct from siblings.

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 explains that the endpoint works for both attachment types and explicitly notes that the file content is not returned in the invoice GET response, which guides the agent away from the more general GET endpoint. However, it does not explicitly name alternatives like list_attachments or upload/delete attachment tools, so the guidance is clear context rather than an explicit when-to-use vs not-to-use.

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