Skip to main content
Glama

Create PDF Document

pdf-document

Create PDF documents with automatic pagination for reports, articles, contracts, and sequential content. Supports text, headings, images, dividers, and page breaks with customizable formatting and page setup.

Instructions

Create a flowing PDF document with automatic pagination.

Best for: Reports, articles, letters, contracts, and documents with sequential content.

Content flows naturally from top to bottom. Pages break automatically when content exceeds page height. Use "pageBreak" to force page breaks, "divider" for horizontal rules, and "spacer" for vertical spacing.

Supported content types:

  • text: Body text with optional formatting (bold, italic, color, alignment)

  • heading: Section headings (larger font, bold by default)

  • image: Inline images that flow with content

  • divider: Horizontal line separators

  • spacer: Vertical whitespace

  • pageBreak: Force new page

Default margins: Varies by page size (e.g., 72pt/1" for Letter, ~56pt for A4).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filenameNoOptional logical filename (metadata only). Storage uses UUID. Defaults to "document.pdf".
titleNoDocument title metadata
authorNoDocument author metadata
fontNoFont strategy (default: auto). Built-ins: Helvetica, Times-Roman, Courier. Use a path or URL for Unicode.
pageSetupNoPage configuration including size, margins, and background color.
contentYesDocument content in flow order

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It does well by explaining key behavioral traits: 'Content flows naturally from top to bottom. Pages break automatically when content exceeds page height,' describing default margins that vary by page size, and listing supported content types with their purposes. It doesn't mention error conditions, performance characteristics, or output format details, but provides substantial operational context for a creation tool.

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 well-structured and appropriately sized. It starts with the core purpose, then provides usage guidance, explains key behaviors, lists content types, and ends with margin defaults. Most sentences earn their place, though the content type listing could be more concise. The information is front-loaded with the most important details first.

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?

Given the tool's complexity (6 parameters with nested objects) and the presence of an output schema (which means return values don't need explanation), the description provides good contextual completeness. It covers the tool's purpose, appropriate use cases, key behaviors, and content semantics. With no annotations, it could benefit from mentioning error conditions or performance limits, but it's largely complete for guiding usage.

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?

Schema description coverage is 100%, so the schema already documents all parameters thoroughly. The description adds some value by explaining the purpose of content types like 'pageBreak', 'divider', and 'spacer', and mentioning default margin behavior. However, it doesn't provide significant additional semantic meaning beyond what's already in the comprehensive schema 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 clearly states the tool creates a 'flowing PDF document with automatic pagination' and specifies it's 'best for: Reports, articles, letters, contracts, and documents with sequential content.' This distinguishes it from sibling tools like pdf-image (likely for image manipulation), pdf-layout (likely for fixed layouts), and pdf-resume (likely specialized for resumes). The description goes beyond the name/title by explaining the flowing nature and target use cases.

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 provides clear context about when to use this tool ('Best for: Reports, articles, letters, contracts, and documents with sequential content') and mentions the text-measure tool for precise dimensions. However, it doesn't explicitly state when NOT to use this tool versus alternatives like pdf-layout or pdf-resume, nor does it provide exclusion criteria or prerequisites for usage.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mcp-z/mcp-pdf'

If you have feedback or need assistance with the MCP directory API, please join our Discord server