Skip to main content
Glama

convert_document

Document Converter — Office & document converter — DOCX/DOC/ODT/RTF/XLSX/XLS/ODS/CSV/PPTX/PPT/ODP/HTML/EPUB/TXT → PDF plus office round-trips (csv→xlsx, docx→odt, epub→pdf) via LibreOffice; MARKDOWN → pdf/docx/html/epub/txt via pandoc with real GFM semantics (headings, lists, tables, code fences); and DOCX/HTML/PDF → MARKDOWN (the LLM-ingestion direction — turn a document into clean GFM an agent can read; PDF via text-layer extraction); plus Jupyter notebooks (.ipynb) → pdf/html/docx/md via pandoc. Pass 'from' so the converter knows the source format. For images/audio/video use convert_file; for data-text transforms use convert_data. Capability envelope: a PDF source extracts to text/markdown only (to=md) — for editable output from a PDF use pdf_to_word / pdf_to_excel / pdf_to_text / pdf_to_images. Office conversions are same-category only (Word↔Word, Sheet↔Sheet, Slides↔Slides) plus any→pdf; cross-category conversions (e.g. Word→slides, Sheet→Word) are not supported. [category: convert]

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toYesWhat you want back. PDF works from every source. Word stays Word, spreadsheets stay spreadsheets, slides stay slides — a Word file cannot become slides. A PDF source can only come back as Markdown.pdf
fileYesMax 25 MB. Routed by filename extension first; the 'from' field is the fallback for synthetic/extensionless names.
fromYesWhat the file is now. We normally read this from the file name; set it when the file has no name or an odd one. Markdown and Jupyter notebooks always take their own route, so say so here for those two.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedInput schema / properties / from / description
      Previous value: -"Source format — REQUIRED on this path (extensionless uploads can't be sniffed reliably; this drives the converter engine). 'md' = markdown (GFM); 'ipynb' = Jupyter notebook."New value: +"What the file is now. We normally read this from the file name; set it when the file has no name or an odd one. Markdown and Jupyter notebooks always take their own route, so say so here for those two."
    • addedInput schema / properties / to / default
      Added value: +"pdf"
    • changedInput schema / properties / to / description
      Previous value: -"Target format. Must differ from 'from'. Markdown INPUT converts to pdf, docx, html, epub, txt. Markdown OUTPUT ('md') is supported from docx, html, pdf (text extraction), and ipynb. Jupyter notebooks (ipynb) convert to pdf, html, docx, md."New value: +"What you want back. PDF works from every source. Word stays Word, spreadsheets stay spreadsheets, slides stay slides — a Word file cannot become slides. A PDF source can only come back as Markdown."
  2. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations declare readOnlyHint=false, destructiveHint=false, openWorldHint=false. The description adds real behavioral context beyond them: the LibreOffice-vs-pandoc routing, the same-category restriction, and the PDF-extracts-to-text-only limitation. It stops short of describing side effects of file creation/output location, which keeps it below a 5.

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-loads the primary conversion matrix and constraints before the alternative-tool routing. It is dense and slightly repetitive (the long format list and the 'Pass from' instruction partially restate the schema), but no sentence is wasted.

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 3-param, mutation-flagged conversion tool with no output schema, the description covers inputs, conversion limits, engine routing, and alternative tools comprehensively. It does not describe the returned artifact's form, but that is a minor gap given the thoroughness elsewhere.

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 description coverage is 100%, so the baseline is 3. The description adds meaning beyond the schema by explaining converter routing per source ('from' selects the conversion engine; md and ipynb always take their own route) and re-emphasizing the 'Pass from' requirement, though much of the format list duplicates the enum values.

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+resource (document conversion) and enumerates the supported format families and conversion matrices. It explicitly distinguishes itself from sibling tools (convert_file, convert_data) and enumerates the route taken per source (LibreOffice vs pandoc). An agent can tell exactly what this tool does without opening 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 alternatives conditionally: 'For images/audio/video use convert_file; for data-text transforms use convert_data', and routes PDF-to-editable output to pdf_to_word / pdf_to_excel / pdf_to_text / pdf_to_images. It also states the exclusion envelope (same-category office only, plus any→pdf; cross-category unsupported), so when-not-to-use is explicit.

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