Skip to main content
Glama

Office document to PDF (LibreOffice)

api2pdf_office_to_pdf
Destructive

Convert an office document (Word, Excel, PowerPoint, ODT, and many more) at a URL to a PDF using LibreOffice. Returns a { FileUrl } (valid ~24h). BILLED. Api2Pdf API: POST /libreoffice/any-to-pdf.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesURL of the source document to convert to PDF.
inlineNoIf true (Api2Pdf default), the generated file is served inline; if false, as an attachment.
optionsNoEngine-specific render options (page size, margins, orientation, headers/footers, etc.). Passed through verbatim to Api2Pdf.
storageNoCustom storage target, used when useCustomStorage is true.
fileNameNoA name for the generated file, e.g. 'invoice.pdf'.
output_binaryNoIf true, return the raw file bytes as base64 instead of a FileUrl. Default false (recommended for agents — returns a short-lived link).
extraHTTPHeadersNoExtra HTTP headers Api2Pdf forwards when it fetches a source URL (e.g. auth for a protected page/file).
useCustomStorageNoIf true, Api2Pdf uploads the result to your own storage (see `storage`) instead of hosting it.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Beyond the destructiveHint annotation, the description discloses that this operation is BILLED and that the returned FileUrl expires in about 24 hours, both important behavioral traits. It also states the underlying API endpoint. The statement that it returns a FileUrl is slightly over-broad since output_binary can change that, but the schema clarifies.

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?

Three short sentences deliver the core purpose, the output/expiry, the cost warning, and the API route with no filler. The most critical information (what it converts and to what) is front-loaded.

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?

For a conversion tool with 8 parameters, nested objects, a cost implication, and no output schema, the description covers the essential behavior well: input kind, engine, output URL lifetime, and billing. It does not describe error cases or asynchronous behavior, but the schema covers parameters and the description gives enough for correct invocation.

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?

The input schema already covers all 8 parameters with 100% description coverage, so the description does not need to explain parameters. It adds no parameter-level information beyond the schema, which is acceptable but not above baseline.

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 uses a specific verb ('convert') plus a resource ('office document... at a URL') and target format ('to a PDF'), and names the engine (LibreOffice). It clearly distinguishes this tool from siblings like api2pdf_html_to_pdf or api2pdf_url_to_pdf by restricting input to office document formats.

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 makes the intended use clear: converting Word, Excel, PowerPoint, ODT, and similar office documents from a URL. It implicitly tells the agent not to use this for HTML or Markdown inputs, but it does not explicitly name sibling alternatives or state when not to use it.

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.

TDQS

A4.3/5.0
Disambiguation5/5

Each tool targets a distinct operation: conversions, PDF manipulations, file deletion, and account/service info are clearly separated. Even the three HTML-to-PDF tools are distinguished by source type or rendering engine.

Naming Consistency5/5

All tools follow a consistent api2pdf_ prefix with snake_case verb-based names such as add_password, merge_pdfs, and url_to_pdf. The pattern is predictable and makes it easy to infer what each tool does.

Tool Count4/5

Sixteen tools is slightly above the typical 3-15 range, but the count is justified by the breadth of Api2Pdf's functionality spanning creation, manipulation, conversion, deletion, and account management.

Completeness5/5

The surface covers the full PDF lifecycle: generate from multiple sources, manipulate via merge/extract/compress/password, convert to markdown, delete files, plus billing and status checks. No obvious missing operations for the documented purpose.