Skip to main content
Glama
Himaan1998Y

pretext-pdf-mcp

by Himaan1998Y

generate_from_markdown

Convert Markdown to PDF with support for headings, lists, tables, code blocks, and more. Returns a base64-encoded PDF file.

Instructions

Convert a Markdown string to a PDF. Supports headings, bold/italic, strikethrough, inline code, links, ordered/unordered lists (nested up to 3 levels), GFM tables (with column alignment), GFM task lists (☑/☐), blockquotes, fenced code blocks (rendered as plain indented text — not styled monospace), and horizontal rules. For richer layouts or styled code blocks, use generate_pdf instead. Returns a base64-encoded PDF.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
markdownYesMarkdown source to convert. Max 100,000 characters.
filenameNoSuggested filename without .pdf extension. Default: document
page_sizeNoPage size. Default: A4. Matches the NamedPageSize union exported by pretext-pdf.
font_sizeNoBody font size in pt. Default: 12
Behavior5/5

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

Despite missing annotations, the description fully informs about behavioral traits: it notes that fenced code blocks are rendered as plain indented text (not styled monospace), output is base64-encoded PDF, and implicitly reveals safe read-only behavior. This exceeds expectations for an unannotated tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise (three sentences) and front-loaded with purpose. Every sentence earns its place: purpose, supported features, alternative, output format. No redundant information.

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 the tool's complexity (many supported Markdown features) and absence of output schema, the description is remarkably complete. It covers input constraints, output format, key behavioral notes (code blocks), and provides a clear alternative.

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 baseline is 3. The description does not add new parameter-specific semantics beyond what the schema already provides, but it does not contradict or omit any necessary details.

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 'Convert a Markdown string to a PDF' with specific verb and resource. It distinguishes itself from sibling tool generate_pdf by specifying that generate_pdf offers richer layouts or styled code blocks, making the purpose unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly advises when to use an alternative: 'For richer layouts or styled code blocks, use generate_pdf instead.' It also lists supported Markdown elements, implying appropriate usage contexts for this tool.

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/Himaan1998Y/pretext-pdf-mcp'

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