Skip to main content
Glama
guanweiqiang

document-converter-mcp

by guanweiqiang

Convert Markdown to DOCX

markdown_to_docx
Read-onlyIdempotent

Convert Markdown files to DOCX Word documents with optional reference template for styling, table of contents, and strict validation.

Instructions

Convert a Markdown file to DOCX (Word) format using Pandoc. Arguments:

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

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

  • referenceDocx (string, optional): Path to a reference DOCX template for styling

  • toc (boolean, optional): Include a table of contents in the DOCX

  • strictMarkdown (boolean, optional): If true, reject files with structural issues (unclosed code blocks). Defaults to false

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
inputPathYesPath to the input Markdown file (relative to workspace)
outputPathNoOutput DOCX path (relative to workspace). Auto-derived if omitted.
referenceDocxNoPath to a reference DOCX template file for styling
tocNoInclude a table of contents in the DOCX. Defaults to false.
strictMarkdownNoIf true, reject input if Markdown has structural issues like unclosed code blocks.
overwriteNoAllow overwriting existing output file. Defaults to false.
Behavior1/5

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

Annotations claim readOnlyHint=true, but the tool creates an output file, contradicting read-only behavior. Description does not clarify side effects, file creation, or error handling. Annotation contradiction detected.

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?

Purpose is front-loaded in a single sentence, followed by a structured parameter list. However, the list duplicates schema details and could be more succinct.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Lacks return value details, error handling, or behavior on success/failure. With no output schema, agent has no information about what the tool returns.

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 description adds defaults (e.g., 'Defaults to false' for toc, strictMarkdown, overwrite) and clarifies auto-derivation for outputPath, providing value beyond schema.

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?

Clearly states 'Convert a Markdown file to DOCX (Word) format using Pandoc.' Verb and resource are specific, and the tool is distinct from siblings like batch_convert, docx_to_markdown, etc.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus alternatives like markdown_to_pdf or batch_convert. No conditions, exclusions, or prerequisites mentioned.

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