Skip to main content
Glama
guanweiqiang

document-converter-mcp

by guanweiqiang

Convert DOCX to Markdown

docx_to_markdown
Read-onlyIdempotent

Convert DOCX files to Markdown using Pandoc or MarkItDown, with image extraction and LLM-ready cleaning options.

Instructions

Convert a DOCX file to Markdown format using Pandoc or MarkItDown. Arguments:

  • inputPath (string, required): Path to the input DOCX file

  • outputPath (string, optional): Output path. Defaults to same name with .md

  • extractImages (boolean, optional): Extract embedded images. Defaults to false

  • imageDir (string, optional): Directory to store extracted images

  • engine (enum, optional): Conversion engine — 'pandoc' or 'markitdown'. Defaults to 'pandoc'

  • markdownFlavor (enum, optional): Markdown dialect for Pandoc output — 'gfm', 'commonmark', or 'pandoc'. Defaults to 'gfm'

  • cleanForLLM (boolean, optional): Clean up the Markdown for LLM consumption. Defaults to false

  • overwrite (boolean, optional): Allow overwriting. Defaults to false

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
inputPathYesPath to the input DOCX file (relative to workspace)
outputPathNoOutput Markdown path (relative to workspace). Auto-derived if omitted.
extractImagesNoExtract embedded images from the DOCX
imageDirNoDirectory to store extracted images (relative to workspace)
engineNoConversion engine to use
markdownFlavorNoMarkdown dialect for Pandoc output. Defaults to 'gfm'.
cleanForLLMNoClean up the Markdown output for LLM consumption
overwriteNoAllow overwriting existing output file. Defaults to false.
Behavior4/5

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

Annotations already declare readOnlyHint=true, but the description indicates writing output, contradicting readOnlyHint. However, the description discloses all defaults and parameter behaviors, adding value beyond annotations.

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 concise with a clear first sentence and a well-organized parameter list. It is efficient but could be more structured with separate sections.

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?

Given 8 parameters, no output schema, and full schema coverage, the description covers all parameters with defaults. Lacks examples or error handling but sufficient for a conversion tool.

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%, but the description adds defaults for parameters like engine, markdownFlavor, overwrite, etc., providing extra semantics beyond the schema descriptions.

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 clearly states the tool converts DOCX to Markdown, specifying the verb 'Convert' and the resources. It differentiates from siblings like pdf_to_markdown and markdown_to_docx.

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 does not provide explicit guidance on when to use this tool vs alternatives like batch_convert or when not to use it. It defaults to single file conversion without mention of batch processing.

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/guanweiqiang/document-convert-mcp'

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