Skip to main content
Glama
ExaDev

document-mcp

by ExaDev

Convert document

convert_document

Convert documents between formats (DOCX, PDF, Markdown, ODT, etc.) by providing a source and target format. Verify supported pairs with list_document_conversions first.

Instructions

Converts a document from one supported format to another via documents.js's DocumentConverter port -- docx, pptx, xlsx, odt, odp, ods, odg, odf, markdown, and pdf. Not every (source, targetFormat) pair is supported directly (odf, for instance, only ever converts to pdf); call list_document_conversions first to see which pairs actually are.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fontsNoExtra font faces to make available to the conversion, for a family the source document does not already embed. Only consulted by a conversion that runs a layout engine (a <format>-to-pdf conversion); every other conversion ignores this option entirely.
outputNoWhere to write the converted document. Omit entirely to receive the bytes inline, base64-encoded, instead.
sourceYesThe document to convert.
targetFormatYesThe format to convert the document to. Not every (source, targetFormat) pair is supported directly -- call list_document_conversions first to confirm this one is.
onSubstitutionDiagnosticsNoWhen true, additionally report each individual font-substitution event as structured fontSubstitutions (which family/weight/style was requested, what it resolved to instead, and why). Every substitution is always reported as a plain diagnostic in `diagnostics` regardless of this flag -- this only controls whether the fuller, structured event is also collected.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
outputYes
diagnosticsYes
targetFormatYes
fontSubstitutionsNo
Behavior3/5

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

With no annotations provided, the description carries the burden of behavioral disclosure. It does disclose an important non-obvious behavior: not every (source, targetFormat) pair is supported, and points to list_document_conversions for confirmation. However, it does not disclose what happens on unsupported input, whether the operation is read-only, or any filesystem side effects beyond what the schema already states. This is a meaningful but incomplete transparency surface.

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?

The description is two sentences and front-loaded with the core purpose. The second sentence earns its place by providing a critical usage caveat. The parenthetical 'via documents.js's DocumentConverter port' is a minor implementation detail that adds little, so it loses a point from perfect conciseness.

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?

The tool has a complex schema (5 parameters, nested objects, enums, output schema) and the schema provides rich descriptions for every parameter. The description supplies the essential purpose and the key pairing constraint. It does not attempt to explain the detailed options, which is acceptable given the schema's completeness. It would be improved by a brief mention that output can be returned inline or written to a path, but that omission is mitigated by the schema.

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%, so the baseline is 3. The description adds no additional parameter semantics beyond the schema — the list of formats and the unsupported-pair caveat are already present in the enum and parameter descriptions. It does not explain nuances like the fonts array or output inline-vs-file behavior, which the schema covers.

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 begins with a specific verb+resource ('Converts a document from one supported format to another'), enumerates the supported formats, and explicitly differentiates from the sibling tool list_document_conversions by directing the agent to call it first. This clearly states what the tool does and how it fits alongside related tools.

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 offers clear usage context: confirm the (source, targetFormat) pair via list_document_conversions before invoking. It does not explicitly mention when not to use this tool or suggest alternative conversion tools, but the prerequisite guidance is specific and actionable.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ExaDev/document-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server