Skip to main content
Glama

Get invoice PDF link

get_invoice_pdf
Read-only

Return a temporary (1 hour) signed download URL for an invoice's PDF. Works for any document visible to the caller: imported invoices return their uploaded file; invoices issued in Kema Invoice (by the app or an agent) are rendered server-side with the workspace branding and, once certified, embed the Factur-X XML. Drafts render too (flagged is_draft: true) but are not legal documents yet.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
invoice_idYesThe invoice UUID.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlNoSigned download URL, present when available is true.
reasonNoWhy the PDF could not be produced and what to do next, present when available is false.
is_draftYesTrue when the document is still a Draft: the PDF is a preview, not a legal document.
availableYesTrue when a download URL is returned; false only when the PDF could not be produced.
invoice_numberYesDocument number, handy to name the downloaded file.
expires_in_secondsNoLifetime of the signed URL in seconds, present when available is true.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • changedOutput schema / properties / available / description
      Previous value: -"False when the invoice has no stored PDF."New value: +"True when a download URL is returned; false only when the PDF could not be produced."
    • addedOutput schema / properties / invoice_number
      Added value: +{
      +  "description": "Document number, handy to name the downloaded file.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / is_draft
      Added value: +{
      +  "description": "True when the document is still a Draft: the PDF is a preview, not a legal document.",
      +  "type": "boolean"
      +}
    • changedOutput schema / properties / reason / description
      Previous value: -"Why no PDF is available, present when available is false."New value: +"Why the PDF could not be produced and what to do next, present when available is false."
    • changedOutput schema / required
      Previous value: -[
      -  "available"
      -]New value: +[
      +  "available",
      +  "is_draft",
      +  "invoice_number"
      +]
  2. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "available": {
      +      "description": "False when the invoice has no stored PDF.",
      +      "type": "boolean"
      +    },
      +    "expires_in_seconds": {
      +      "description": "Lifetime of the signed URL in seconds, present when available is true.",
      +      "maximum": 9007199254740991,
      +      "minimum": -9007199254740991,
      +      "type": "integer"
      +    },
      +    "reason": {
      +      "description": "Why no PDF is available, present when available is false.",
      +      "type": "string"
      +    },
      +    "url": {
      +      "description": "Signed download URL, present when available is true.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "available"
      +  ],
      +  "type": "object"
      +}
  3. First observed

TDQS

A4.4/5.0
Behavior4/5

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

The readOnlyHint annotation already signals no mutation, and the description adds meaningful behavioral details: server-side rendering, workspace branding, Factur-X embedding for certified invoices, draft behavior, and a 1-hour expiry. No side effects or auth details are mentioned, but the provided information is sufficient.

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 concise, information-dense sentences with no redundant content. Each sentence adds a distinct piece of value: the core return value, behavior by invoice type, and draft handling.

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?

Covers key edge cases (imported vs. issued, drafts, certification) and describes the output nature. Since an output schema is present, the lack of explicit return-value details is acceptable, though error conditions are not mentioned.

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 only parameter invoice_id is documented in the schema, and the description adds context about invoice visibility and applicability to drafts and issued documents. This makes the parameter's role clear beyond the minimal schema description.

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?

Clearly states it returns a temporary signed download URL for an invoice PDF, with a specific action and resource. It distinguishes itself from get_invoice by focusing on the PDF artifact rather than invoice data.

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?

Provides situational guidance: works for any visible document, explains differing behavior for imported vs. issued invoices, and clarifies how drafts are handled. It does not explicitly compare to sibling get_invoice, but the context makes the appropriate use case clear.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.