Skip to main content
Glama

Get invoice PDF

ws_invoice_pdf
Read-onlyIdempotent

Retrieve an invoice as a PDF document. Choose base64 to get the encoded file for decoding and saving, or binary to get file size and type without raw bytes.

Instructions

Fetch an invoice as a PDF. base64 returns the document encoded for a caller that will decode and save it. binary reports the size and type only — raw PDF bytes are never inlined into a tool result, because they would flood the conversation without being usable.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
formatNobase64 returns the encoded document; binary returns metadata and a byte count only.binary
userIdNoAccount id, or the literal "self" for the authenticated account. Defaults to "self".self
invoiceIdYesInvoice id, as returned by ws_invoice_list.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnlyHint, idempotentHint, destructiveHint=false), so the bar is lower. The description adds genuine behavioral context beyond annotations: it discloses that raw PDF bytes are deliberately never inlined into a tool result because they 'would flood the conversation without being usable,' and explains what each format actually returns. This is a meaningful design-behavior disclosure, not just a restatement of the schema.

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?

Two sentences, roughly 45 words, with the primary purpose front-loaded before the format details. Every clause earns its place; there is no filler, and the behavioral note is folded into the format explanation rather than stated redundantly.

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 read-only fetch tool with three parameters fully documented in the schema and no output schema, the description covers the key decision point (format behavior) and return semantics for both modes. The userId and invoiceId params are fully covered by the schema. Minor gap: it doesn't explain what happens if no invoice is found for the given id, but for a simple fetch tool with strong annotations this is a small omission.

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 description coverage is 100%, so baseline is 3. The description adds value on top of the schema for the format parameter: it explains the caller intent ('will decode and save it') and reinforces the binary behavior ('reports the size and type only') beyond the schema's terse 'returns metadata and a byte count only.' The rationale about flooding the conversation clarifies how the response should be handled.

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?

Opens with a specific verb+resource+format — "Fetch an invoice as a PDF" — which immediately distinguishes it from sibling ws_invoice_get (JSON data) and ws_invoice_list. Not a tautology of the title; it states the exact deliverable and the two concrete return modes.

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?

The description gives solid guidance on choosing base64 vs binary for the format parameter, explaining that base64 is for a caller that will decode and save, while binary returns only metadata. However, it never explicitly routes the agent to/from sibling alternatives (e.g., when to prefer ws_invoice_get or ws_invoice_list over this PDF tool); that selection is left implied by the phrase 'as a PDF'.

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