Create a .docx
docx_createGenerate 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.
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": {
"path": "<path>",
"paragraphs": "<paragraphs>"
},
"name": "docx_create"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Where to create the new .docx. | |
| title | No | Document title (stored as document properties). | |
| paragraphs | Yes | Paragraphs in order. Either a plain string, or {text, style}. |