Skip to main content
Glama

Create a .docx

docx_create

Generate a new Word .docx from plain text paragraphs with optional styles and title. Avoids overwriting by failing if the path exists.

Instructions

Create a new Microsoft Word .docx document from plain text.

Each paragraph is either a string, or an object {text, style} where style is a Word style id such as Heading1, Heading2 or Title. The produced file is a valid OOXML package that opens in Word, WPS and LibreOffice.

Fails if the target path already exists — pick another path instead of overwriting by accident.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesWhere to create the new .docx.
titleNoDocument title (stored as document properties).
paragraphsYesParagraphs in order. Either a plain string, or {text, style}.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

With annotations already declaring write/not-idempotent/not-destructive, the description adds material context beyond them: the fail-on-existing behavior, the input shape for paragraphs, and output format compatibility (OOXML, opens in Word/WPS/LibreOffice). This is meaningful extra transparency for a mutation tool.

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 short paragraphs, front-loaded with the core action, then input shape, then the fail-safe. Every sentence earns its place with no padding.

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?

Covers creation semantics, input format, output validity, and the key failure mode. No output schema exists, but the description appropriately explains that the result is a valid file rather than describing return values.

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 100%, so parameters are already documented. The description restates the paragraph structure (string vs {text,style} with example styles) which mirrors schema but adds concrete style examples like Heading1/Title, offering marginal added value over baseline.

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 ('Create a new Microsoft Word .docx document from plain text') and distinguishes from siblings like docx_read and docx_edit, which are read/mutate tools rather than creators.

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?

The 'Fails if the target path already exists — pick another path instead of overwriting by accident' gives concrete guidance on a misuse condition. It doesn't name a sibling alternative, but it clearly delineates a when-not condition.

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