Skip to main content
Glama

Generate PDF

generate_pdf
Destructive

Render one branded PDF 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. It costs 1 credit, or nothing on a Solo or Pro plan. Do not call this again to retry.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "template_id": "<template_id>"
    },
    "name": "generate_pdf"
  }
}

Input 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_idYesThe template to render. plan_generation lists each one.
brand_kit_idNoA brand_kit_id from list_brand_kits.
page_numbersNoPage numbers in the footer; left out it follows the brand kit.
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. Changed2 schema fields changed
    • addedInput schema / properties / page_numbers / description
      Added value: +"Page numbers in the footer; left out it follows the brand kit."
    • addedInput schema / properties / template_id / description
      Added value: +"The template to render. plan_generation lists each one."
  2. Added
  3. Removed
  4. 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"
      +}
  5. Added

TDQS

A4.5/5.0
Behavior5/5

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

With readOnlyHint=false and destructiveHint=true already declared, the description still adds substantial non-structured behavior: a 20-drafts-per-day cap, 1-credit cost (free on Solo/Pro), persistence to the user's files, and explicit instruction not to retry after a call. The 'do not call again to retry' warning is the kind of non-idempotency signal annotations cannot express.

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?

Purpose and credit/daily-limit constraints are front-loaded, and every sentence carries actionable information, including the otherwise-undocumented per-template field contracts. The downside is that it is one long unbroken paragraph mixing purpose, template schemas, formatting rules, and cost, which makes scanning harder than a short bulleted structure would.

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?

For an 11-parameter tool with nested items/blocks and no output schema, the description covers the mutation semantics, per-template field requirements, formatting rules, branding defaults, cost limits, and the return value (artifact id plus page count). An agent has everything needed to call it correctly on the first attempt.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3, but the description goes far beyond it: it enumerates the item fields and props per template (invoice/statement items capped at 30, up to 30 items, etc.), states line-item fields are strings and dates are YYYY-MM-DD, and rules out mixing markdown with blocks. It also explains that the first heading becomes the title unless a title is passed, which is behavior the schema cannot convey.

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 description opens with a specific verb and resource: 'Render one branded PDF in a brand kit and save it to the user's files,' plus concrete examples of document types. It implicitly separates itself from generate_markdown/generate_view by stating the output is a PDF saved to files and returning an artifact id, but it never names an alternative tool, so sibling differentiation is inferred rather than stated.

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?

Strong context: it maps unfamiliar asks (press release, checklist, brief) onto report/letter/proposal, says to omit brand_kit_id for the space default, and warns 'Do not call this again to retry.' The main gap is that it does not say when to pick this over generate_markdown or another generator, which is the natural sibling decision an agent faces.

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.