Skip to main content
Glama

Compile Markdown to Word (.docx)

compile_markdown

Converts Markdown into Word (.docx) documents using format presets or templates, and supports captions, TOC, page breaks, abstracts, and math blocks.

Instructions

Compile Markdown into a Word (.docx) document. Ensure structures beyond standard Markdown (e.g. captions, TOC, page breaks, abstract, math blocks) follow the contract in get_guide. Uses the provided format file, or defaults to a built-in preset.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "markdown": "<markdown>"
    },
    "name": "compile_markdown"
  }
}

Input Schema

NameRequiredDescriptionDefault
langNo
formatNo
presetNo
markdownYes
keep_pagesNo
keep_untilNo
output_pathNo
generate_pdfNo
base_templateNo
cover_sectionsNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full disclosure burden. It reveals the preset fallback default but says nothing about writing files to disk, overwrite behavior, whether Compile requires external tooling, or how PDF generation and output paths interact — all material for a tool that produces documents.

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?

Three compact sentences with no filler, front-loading the core action before the prerequisite pointer to get_guide and the format-default note. The parenthetical example list is slightly dense but each item illustrates a real non-standard structure.

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?

An output schema covers return values, and the get_guide pointer covers markup contracts, which helps. But for a 10-parameter document-generation tool with no annotations, the description omits file-writing side effects, most parameter meanings, and any prerequisites — too thin for the tool's complexity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% across 10 parameters, so the description must compensate and largely does not. It loosely touches markdown, format, and preset, but leaves lang, base_template, output_path, generate_pdf, keep_pages, keep_until, and cover_sections entirely unexplained in both the schema and the description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description gives a specific verb and resource pair ("Compile Markdown into a Word (.docx) document") and names the concrete output format, which distinguishes it from nearby tools like validate_manuscript or extract_format_from_docx. It stops short of explicitly stating how it differs from those siblings, but the verb does most of the disambiguating work.

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 points the agent at get_guide for the required contract on non-standard structures, which is genuine conditional guidance, and it explains that a format file is used when supplied with a built-in preset as fallback. It never says when to prefer validate_manuscript first, nor when to choose format vs. preset vs. base_template, leaving the main selection decisions implicit.

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