Skip to main content
Glama

Gotenberg by pagespool

Convert office documents to PDF with LibreOffice

office_to_pdf
Read-only

Convert an office document up to 4 MB to a PDF with LibreOffice (Gotenberg).

Word, Excel, PowerPoint, OpenDocument and the other formats LibreOffice opens. Pass the file as base64 in content_base64, or as a download link in file, and its name in filename: the extension tells LibreOffice the format. Returns {"download_url": "<link>", "size_bytes": <PDF size>, "expires_in_minutes": 60}: give the user the download_url. Requires an API key.

Credits: 1 per call.

Input Schema

NameRequiredDescriptionDefault
fileNoThe file as a download link, instead of `content_base64`. In ChatGPT, pass the user's uploaded file here. Other clients can set `download_url` to a public https URL.
filenameYesThe file name with its extension (.docx, .doc, .odt, .xlsx, .pptx, .rtf, …). LibreOffice reads the file by its extension.
content_base64NoThe file, base64-encoded. Up to 4 MB before encoding.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Beyond the readOnlyHint/openWorldHint annotations, it discloses the 4 MB input ceiling, the API-key requirement, the 1-credit cost per call, and the 60-minute expiry on the produced artifact. Those are exactly the operational facts an agent needs before committing a call.

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 lead sentence front-loads purpose plus the size limit; subsequent sentences cover formats, input paths, and return value in ascending order of detail. Only the echoed return JSON slightly duplicates the output schema, and it is compact enough to justify itself as a usage cue.

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 conversion tool with nested parameters, a 4 MB ceiling, and external fetches, the definition covers input alternatives, size limits, auth, cost, and the expiry behavior of the returned link. 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 baseline is 3, and the description earns the extra point by explaining the two mutually exclusive input paths ('content_base64' or 'file') and the critical fact that the 'filename' extension determines the parsed format. It stops short of detailing the nested file object, which the schema already documents.

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 and resource ('Convert an office document ... to a PDF') plus the engine (LibreOffice/Gotenberg) and an explicit format list (Word, Excel, PowerPoint, OpenDocument). That format scope implicitly separates it from the html_to_pdf sibling without either schema being opened.

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 description explains how to supply input (base64 vs. download link vs. filename extension) and the 4 MB ceiling, which steers usage. But it never states when to pick this over html_to_pdf, nor any when-not conditions, so the guidance is operational rather than selection-oriented.

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