Skip to main content
Glama

Convert an office document to PDF

convert_to_pdf

Converts an existing Word, Excel, PowerPoint, OpenDocument, RTF or HTML document (up to 20 MB) to a PDF as it is, without filling in data, and returns the render with status and download_url. To make a document from a template and data, use render instead. Pass exactly one source: render_id, the render of a Word or PowerPoint template (output docx or pptx); or file_base64 with file_name, the document itself. Every call is a new render that counts units like a PDF; the Free plan cannot convert (Starter and above). The document is converted and not kept.

Input Schema

NameRequiredDescriptionDefault
filenameNoName of the PDF behind download_url, e.g. report.pdf
file_nameNoName of the document, e.g. report.xlsx; the type is read from the content
landscapeNoLandscape for spreadsheets and documents without their own page setup
render_idNornd_ id of a render whose output is docx or pptx, to get that document as a PDF
file_base64NoThe document to convert, base64 encoded; needs file_name
page_rangesNoPages to convert, e.g. 1-3,5; all pages when left out
single_page_sheetsNoEach spreadsheet sheet on one page

Output Schema

NameRequiredDescriptionDefault
idYesrnd_ id of the render
errorYesWhy a failed render failed
unitsYesUnits the render counted
statusYes
einvoiceNoThe e-invoice report, when the render made one
templateYesThe template and version rendered; null for html and conversions
expires_atYesWhen download_url stops working; get_render issues a fresh one
page_countYes
environmentYes
download_urlYesSigned link to the file; null until the render succeeded
accessibilityNoThe PDF/UA-1 verdict, when the template declares it

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Beyond the annotations, it discloses cost behavior ('every call is a new render that counts units like a PDF'), plan gating, and data-retention ('the document is converted and not kept'), plus the return shape. These are consequential traits an agent cannot infer from readOnlyHint=false / idempotentHint=false.

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 and tightly packed with no filler, but the sentences are long semicolon-chained clauses that require careful parsing. Slightly more structure (e.g. separating inputs from constraints) would help.

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 a non-idempotent conversion tool with 7 optional params and an output schema, the description covers inputs, exclusivity rules, cost, plan limits, retention, and the return fields. Nothing an agent needs in order to call it correctly 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 would be 3, but the description adds the crucial mutual-exclusion semantics that the schema itself does not express (required params = 0): exactly one of render_id or file_base64+file_name, and that render_id must reference a docx/pptx render. Remaining params (landscape, page_ranges, single_page_sheets, filename) are left to 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 concrete verb (converts) plus the exact resource scope (Word, Excel, PowerPoint, OpenDocument, RTF, HTML, up to 20 MB) and explicitly distinguishes itself from render. An agent can tell what it produces (a PDF render with status and download_url) without reading the schema.

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?

Names the alternative explicitly ('To make a document from a template and data, use render instead') and gives the selection rule between the two input modes ('Pass exactly one source: render_id ... or file_base64 with file_name'). It also states a hard eligibility constraint (Free plan cannot convert; Starter and above).

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.

Resources