Skip to main content
Glama

Generate PDF

generate_pdf

Render one free branded PDF draft in a brand kit and save it to the user's files: any document the user describes, from an invoice or a statement to a one-pager, a proposal, a memo, a case study, an agenda or a report. Drafts are limited to 20 per day. Templates: 'invoice' takes items of description, quantity, unit_price, up to 30 plus props invoice_number, issued_on, due_on, bill_to, currency, tax_rate, notes; 'statement' takes items of description, date, amount, up to 30 plus props account, account_of, period_start, period_end, currency, opening_balance, notes; 'report' takes markdown or blocks plus props subtitle, author, dated; 'letter' takes markdown or blocks plus props recipient, dated, signoff; 'proposal' takes markdown or blocks plus props client, valid_until, prepared_by. A document template renders whatever markdown you give it, so an unfamiliar ask (a press release, a checklist, a brief) is still a report, letter or proposal with the right headings. Line item fields are all strings, and every date is YYYY-MM-DD. Write a document as markdown (headings, lists, tables) or as blocks, never both, and its first heading becomes the title unless you pass a title. Leave brand_kit_id out to use the space's default brand. Returns the artifact id and how many pages it came to. The draft carries a YouSpot watermark until the user unlocks the clean PDF for 1 credit from the card; you cannot unlock it. Do not call this again to retry.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNoPage size; left out it follows the brand kit.
itemsNoLine items, in the fields the template names.
propsNoText fields for the template, all strings.
titleNoThe document title. Optional.
blocksNoThe document body as blocks.
markdownNoThe document body as markdown.
footer_textNoThe footer line. Empty string for no footer; left out it is the brand name.
template_idYes
brand_kit_idNoA brand_kit_id from list_brand_kits.
page_numbersNo
saved_template_idNoA saved_template_id from list_templates; its inputs seed the ones you pass.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added
  2. Removed
  3. Changed1 schema field changed
    • addedInput schema / properties / saved_template_id
      Added value: +{
      +  "description": "A saved_template_id from list_templates; its inputs seed the ones you pass.",
      +  "type": "string"
      +}
  4. Added

TDQS

A4.6/5.0
Behavior5/5

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

With only readOnlyHint=false provided by annotations, the description carries the full burden of behavioral disclosure, and it does so richly: drafts are limited to 20/day, the PDF carries a watermark until unlocked, the agent cannot unlock it, the first heading becomes the title, markdown and blocks should not both be used, and the call returns artifact id and page count. The 'do not call this again to retry' instruction adds important operational context.

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 long but dense and front-loaded with core purpose before template details. Every sentence adds useful operational guidance, and the template summaries are efficient. It could be slightly better structured with line breaks or bullets, but it avoids fluff and repetition.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given high complexity (11 parameters, nested objects, 5 templates, no output schema, sparse annotations), the description covers what an agent needs: template selection, payload shape, constraints, defaults, return value, rate limit, watermark behavior, and a retry warning. The few parameters not explicitly covered (page, footer_text, page_numbers, saved_template_id) are already documented in the schema, so nothing critical is missing.

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 coverage is 82%, so the baseline is 3, but the description adds substantial meaning beyond the schema: it explains which props and items each template expects, states that line item fields are strings and dates are YYYY-MM-DD, clarifies markdown-vs-blocks exclusivity, and explains brand_kit_id defaulting. This goes well beyond the schema's generic property 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 opens with a specific verb and resource: 'Render one free branded PDF draft in a brand kit and save it to the user's files'. It goes on to enumerate the template types (invoice, statement, report, letter, proposal), which clearly distinguishes this from sibling tools like generate_og_image or generate_email. An agent can immediately tell this is for producing document PDFs, not other content.

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 clearly states what kinds of documents are appropriate ('any document the user describes, from an invoice... to a report') and covers all five template options plus fallback guidance for unfamiliar asks. It does not, however, explicitly name sibling alternatives or state when not to use this tool, so it falls just short of a 5.

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.