Skip to main content
Glama

Generate PDF from Text

pdf_text_to_pdf

Converts plain text or local .txt/.md files into clean, paginated A4 PDFs locally.

Instructions

Create a clean paginated A4 PDF locally from plain text content or a local .txt/.md file.

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": {
      "text": "<text>",
      "outputPath": "<outputPath>"
    },
    "name": "pdf_text_to_pdf"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYesText content to render into PDF pages
titleNoOptional document header/title
fontSizeNo
outputPathYesDestination path for generated PDF

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.0

TDQS

B3.4/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full burden. It does usefully disclose behavior: rendering is local, output is A4 and paginated, and 'clean' suggests no boilerplate chrome. It does not say whether an existing file at outputPath is overwritten, whether missing directories are created, or what is returned, which matters for a tool that writes to disk.

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?

One sentence, front-loaded with the verb and output artifact, with no redundant wording. The trailing input clause is slightly imprecise about how a .txt/.md file is actually supplied but costs little space.

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

Completeness3/5

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

For a four-parameter file-writing tool with no annotations and no output schema, the description covers the core transformation but omits overwrite semantics, filesystem requirements for outputPath, and any statement of the result. Adequate to call it, incomplete for calling it safely.

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 75%, so the baseline is 3. The description adds formatting context (A4 pages, pagination) but says nothing about `title`, `fontSize`, or how `outputPath` is resolved, so it adds little meaning beyond the structured schema.

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?

States a specific verb and resource (create a PDF), names the output format (paginated A4) and the accepted inputs (plain text or a local .txt/.md file), which separates it from pdf_images_to_pdf. It stops short of naming a sibling, and the 'from plain text content or a local .txt/.md file' phrasing is slightly muddled given the schema exposes only a single `text` string plus `outputPath`.

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 'locally' and 'plain text' framing implies the context in which this tool applies, and no network/upload step is required. There is no explicit when-to-use or when-not-to-use guidance and no routing to alternatives such as pdf_images_to_pdf, so an agent must infer the choice from the input type alone.

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