Skip to main content
Glama

Markdown to Word

doc_from_markdown

Convert markdown to .docx files, preserving headings, lists, tables, and code blocks. Get the document file and a block-type count.

Instructions

Call this tool to turn markdown into a .docx, returning the file and a count of blocks by type. Headings, lists, GFM tables and code fences are honoured. Empty markdown is refused, and so is overwriting without the flag.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
styleNo
titleNoDocument title; defaults to the first heading in the markdown
markdownYesThe markdown source. ATX headings, paragraphs, bullet and numbered lists, GFM pipe tables and fenced code blocks as monospace are honoured, as are **bold**, *italic* and `code` inline
out_pathNoWhere to write the .docx. Defaults to the data directory
overwriteNoReplace out_path if a file is already there. Default false: an existing file is never overwritten

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.20.0

TDQS

A4/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full burden and does well: it discloses the return shape (file plus block count), supported syntax features, the empty-markdown refusal, and the overwrite-requires-flag safety gate. It stops short of explicitly stating that a file is written to disk as a side effect, but the overwrite mention strongly implies it.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences with zero filler: the core action and return value are front-loaded, followed by feature support and then refusal conditions. Every sentence earns its place and the most critical behaviors appear first.

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 5-param conversion tool with 80% schema coverage and no output schema, the description is nearly complete: it covers the return value, supported syntax, and both refusal/error branches. The only gap is an explicit statement of the disk-write side effect and default destination, though out_path's default is in 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 coverage is 80%, so the schema already documents markdown, title, out_path, overwrite, and the style enum. The description adds genuine behavioral context beyond the schema—empty markdown is refused and overwrite requires the flag—but does not elaborate parameter semantics further. This is a standard baseline-3 case where the schema does the heavy lifting.

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 opens with a specific verb+resource pair: 'turn markdown into a .docx,' and states the exact outcome (returns the file and a count of blocks by type). This cleanly distinguishes it from the likely sibling doc_to_html (markdown to HTML instead of Word) without needing 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 Guidelines3/5

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

It clearly says 'call this tool to turn markdown into a .docx,' giving a strong trigger condition. However, it never names alternatives or exclusion cases, despite relevant siblings like doc_to_html, doc_create, and doc_fill_template existing. The reader must infer when this tool is preferable to its siblings.

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