Convert Markdown to DOCX
markdown_to_docxConvert 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
| Name | Required | Description | Default |
|---|---|---|---|
| inputPath | Yes | Path to the input Markdown file (relative to workspace) | |
| outputPath | No | Output DOCX path (relative to workspace). Auto-derived if omitted. | |
| referenceDocx | No | Path to a reference DOCX template file for styling | |
| toc | No | Include a table of contents in the DOCX. Defaults to false. | |
| strictMarkdown | No | If true, reject input if Markdown has structural issues like unclosed code blocks. | |
| overwrite | No | Allow overwriting existing output file. Defaults to false. |