Skip to main content
Glama

Api2Pdf MCP by usefulapi

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

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.

  1. Changed1 schema field changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations only carry destructiveHint=true, which says nothing useful for a conversion tool; the description supplies the operationally relevant facts instead: it is BILLED (a cost signal the agent should weigh), and the result is a FileUrl valid ~24h. It omits auth requirements and any rate/throughput behavior, so it is strong but not complete.

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 compact sentences with zero waste: purpose and engine first, then the return shape with its 24h expiry, then the billing flag and raw endpoint. Every clause earns its place and the critical scoping information 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?

With no output schema, the description correctly carries the return contract ('Returns a { FileUrl }, valid ~24h'), and it covers engine, accepted formats, billing, and the underlying API route. It stops short of noting that output_binary can instead return base64 bytes and how storage/useCustomStorage change the destination, which slightly limits completeness for this 8-parameter tool.

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% across all 8 parameters, so the schema already documents url, inline, options, storage, fileName, output_binary, extraHTTPHeaders, and useCustomStorage. The description only implies the URL input and the FileUrl output and adds no syntax or format detail beyond the schema, so baseline 3 applies.

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 ... at a URL to a PDF using LibreOffice') and enumerates the accepted source formats (Word, Excel, PowerPoint, ODT). That format/engine scope is what separates it from the sibling url_to_pdf, html_to_pdf, and wkhtml_to_pdf tools without needing to open a schema.

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?

Usage is implied by the accepted document types ('office document ... Word, Excel, PowerPoint'), which tells the agent when this tool fits. However, it never explicitly says when to prefer it over url_to_pdf or html_to_pdf, nor states any prerequisites or exclusions, so the agent must infer the routing decision.

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.