Skip to main content
Glama

generate_pdf

Turn a report or document you write as HTML into a PDF and get a link to it (a quote, job report, statement, summary). This is the in-app copilot's generate_pdf: when the workspace's instructions or an action's answer say to call generate_pdf, this is it. Write the BODY as clean semantic HTML in html (h1/h2/h3, p, tables, lists) and it gets a branded letterhead with the title and today's date; or pass a COMPLETE document (……) to control the whole layout (a customer's own letterhead, page size, colours) — it is used as-is, with no letterhead added. No . The answer has the link, a summary of what was rendered and a picture of page 1: look at the picture and fix the HTML before you tell the user it's ready. The link is public — anyone with it can open the file. The PDF isn't put on any record: to attach it, use the workspace's own action for that, or propose_write.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
htmlYesEither the report BODY as semantic HTML (gets the branded letterhead), or a COMPLETE <html> document (used as-is, no letterhead). No <script>.
brandNoOptional letterhead branding: { company_name, accent_color (hex like #2563eb), logo_url }. Fill from the org's known details; omit any you don't know.
titleYesDocument title — shown at the top of the letterhead and used for the filename (e.g. 'March Revenue Summary').
filenameNoOptional download filename WITHOUT extension (defaults to the title).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the annotations (readOnlyHint=false, openWorldHint=true, destructiveHint=false) by disclosing that the link is public, that the document is not attached to any record, that complete HTML is used as-is with no letterhead, and that <script> is disallowed. It also prescribes an inspect-the-preview step before telling the user it's ready.

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?

Front-loaded with the core action, mentions the sibling, then details modes and caveats in a logical order. Dense but every sentence carries operational content; the parenthetical examples are slightly loose but not wasteful.

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?

Covers inputs, the public-link caveat, the absence of record attachment, and even the return shape (link, summary, page-1 image) despite no output schema. Nothing essential for correct invocation 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 100%, so the baseline is 3, but the description adds real meaning: the two-mode contract of `html` (body gets branded letterhead vs. complete document used as-is) and how evidence of rendering is returned. It doesn't expand on brand/filename beyond the schema.

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?

States a specific verb+resource ('Turn a report or document you write as HTML into a PDF and get a link') and explicitly resolves identity ambiguity against the copilot's own generate_pdf. An agent can tell this apart from generate_document/generate_estimate siblings via the HTML-to-PDF framing.

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?

Gives clear triggering context ('when the workspace's instructions or an action's answer say to call generate_pdf, this is it') and routes attachment to the workspace's own action or propose_write. It does not explicitly contrast with generate_document, so it stops short of a full when/when-not.

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.