Skip to main content
Glama

Download invoice PDF

get_invoice_pdf
Read-only

Retrieve the PDF of an issued invoice to read, attach, or save. Returns the file as a path or base64.

Instructions

Fetch the PDF of an already-issued invoice, for when the user wants the document itself — to read it, attach it somewhere, or save a copy. Read-only.

Returns either a path on the server's filesystem or base64 bytes, depending on how the server is running; force one with as. To send the invoice to the client by email, use send_document_email instead — that does not require downloading it first.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
asNoHow to return the PDF: 'file' writes it to the server's download directory and returns the path; 'base64' returns the bytes inline. Defaults to whichever suits the transport in use.
numberYesInvoice number, without the series prefix.
seriesNameNoInvoice series. Falls back to the configured default.
companyVatCodeNoIssuing company CIF. Falls back to SMARTBILL_VAT_CODE.
Behavior4/5

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

Annotations already declare readOnlyHint=true, so the read-only nature is known. The description adds further detail about return format (path or base64) and the ability to force one via 'as' parameter, which goes beyond 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 concise with about four sentences covering purpose, usage, return format, and alternative tool. It is front-loaded with the primary action. Could be slightly more structured, but overall efficient.

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 the tool has well-documented parameters (100% schema coverage) and no output schema, the description sufficiently describes the return types (path or base64) and the ability to force format. No missing critical information for agent invocation.

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 covers all 4 parameters with descriptions, so baseline is 3. The description adds value by explaining the 'as' parameter's purpose and default behavior, and implies usage of other parameters (e.g., invoice number), elevating it above baseline.

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 specific verb 'Fetch' and clearly identifies the resource as 'PDF of an already-issued invoice'. It distinguishes the tool from its sibling 'send_document_email' by stating its purpose for when the user wants the document itself.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly states when to use: 'for when the user wants the document itself'. It also provides an exclusion criterion: 'to send the invoice to the client by email, use send_document_email instead'. This clearly guides the agent on tool selection.

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

Install Server

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/bogdanripa/smartbill-mcp'

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