Skip to main content
Glama

Word (.docx) to Markdown

ai_docx_to_markdown
Read-onlyIdempotent

Convert Word .docx files to Markdown, preserving headings, lists, tables, links and footnotes. Runs locally and returns inline text or saves it to a file.

Instructions

Convert a Word .docx document to Markdown: headings (from Heading styles), bold/italic, lists, links, tables, footnotes. Images become placeholders like unless embedImages is true (then data: URIs, which can be very large). Returns the number of conversion warnings (unrecognised styles and the like) and the first few messages. Old binary .doc files are not supported. Accepts a local path or base64. Inline Markdown is cut at maxChars (default 200k); "output" saves it to a file. Runs locally; nothing is uploaded.

Input Schema

NameRequiredDescriptionDefault
fileYesThe .docx document: a local file path (absolute, or relative to the server's --root) or base64 data (raw or a data: URI).
outputNoWrite the Markdown to this file (or folder ending in "/") and return its path instead of the inline text.
maxCharsNoCut the inline Markdown after this many characters, with a note (a file written with "output" is never cut). Default 200000.
embedImagesNoEmbed images as base64 data: URIs instead of placeholders. Default false.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the readOnly/idempotent annotations it discloses the practical traits that matter: images become placeholders unless embedImages is true (data: URIs, potentially very large), inline Markdown is truncated at maxChars while a written file is never cut, and nothing is uploaded. It also describes the return payload (warning count plus first few messages), which annotations cannot convey.

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 and format are front-loaded, then behavior details, then constraints; every sentence carries information. It is dense and packed into a few long sentences, which costs a bit of scannability but little is wasted.

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

Completeness5/5

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

No output schema exists, yet the description covers return values, truncation caveats, image handling, file-vs-inline output, accepted input forms, and the unsupported .doc case. For a 4-parameter conversion tool that is everything an agent needs to call it correctly.

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%, so the baseline is 3; the description still adds real semantics by explaining the tradeoff behind embedImages (huge data: URIs) and the truncation behavior of maxChars, plus that a written output file escapes truncation. It slightly duplicates schema text ('default 200k') rather than adding further detail.

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 a Word .docx document to Markdown') and enumerates the constructs handled (headings, bold/italic, lists, links, tables, footnotes). The .docx source format cleanly separates it from ai_pdf_to_markdown, ai_html_to_markdown, and ai_markdown_to_docx (the reverse direction).

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?

Gives concrete applicable context: accepts a local path or base64, old binary .doc is explicitly excluded, and 'output' saves to a file instead of inline text. It does not name sibling converters as alternatives, so the routing is implied by format rather than stated.

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

Deploy Server

Other Tools