Skip to main content
Glama

Stackin

get_invoice_pdf

Read-onlyIdempotent

Return the printable rendering of a document, as a PDF.

Works for both types — a DANFE for nfe, a DANFSe for nfse. The PDF comes back base64-encoded in content_base64; the XML, not this, is the legally valid document. A 502 from here means the authorizer is unavailable, not that the invoice is wrong.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
access_keyYes
document_typeYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
access_keyYes
content_typeNoapplication/pdf
content_base64YesThe PDF bytes, base64-encoded. Decode before saving.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observed

TDQS

A3.7/5.0
Behavior4/5

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

Beyond the annotations (readOnlyHint=true, idempotentHint=true, destructiveHint=false), the description adds three distinct behaviors: the PDF arrives base64-encoded in content_base64, the XML is the legally authoritative document (not this PDF), and a 502 error signals authorizer unavailability rather than invoice invalidity. This is rich error and return-format context that annotations cannot convey. No contradiction with annotations.

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 purpose is front-loaded in the first sentence, followed by scope, return format, legal context, and error interpretation. Five sentences each carry distinct information with no filler or repetition. Slightly long for a 2-parameter tool, but every sentence earns its place given the valuable behavioral context it conveys.

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?

For a simple 2-param read tool with an output schema present, the description is nearly complete: it covers output encoding (base64 in content_base64), legal significance, and error interpretation. The only meaningful gap is the undocumented access_key parameter, but the output schema and annotations cover most of the remaining surface area.

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?

With 0% schema description coverage, the description must compensate for both parameters. It handles document_type well by mapping the enum values (nfe→DANFE, nfse→DANFSe), which adds meaning beyond the raw enum list. However, access_key is never described - its purpose, format, or constraints are left entirely to the schema, which provides only a title. Compensation is partial.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening line 'Return the printable rendering of a document, as a PDF' states a specific resource and output format. The follow-up clarifies scope ('Works for both types — a DANFE for nfe, a DANFSe for nfse'), which helps differentiate it from sibling tools like consult_invoice (which presumably returns XML). The verb 'Return' is generic, but the resource and format make the purpose clear.

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

Usage Guidelines3/5

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

Usage is implied rather than stated. The description hints that the XML (not the PDF) is the legally valid document, which subtly suggests an agent might prefer another tool for legal/validation purposes, but it never names an alternative like consult_invoice or states explicit when-to/when-not-to conditions. The scope note about both types is helpful but not a routing guide.

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.