Fill a Word template
doc_fill_templateReplace {{placeholders}} in a .docx, save a new filled file, and report filled, unfilled, or ignored placeholders. Call with no values to list placeholders.
Instructions
Call this tool to replace {{placeholders}} in a .docx and write a new file, reporting what was filled, unfilled or ignored. Call it with no values to list them. Free: templates up to 10 placeholders.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| values | No | Placeholder name to value, e.g. {client: "Acme", fee: "EUR 4,500.00"} | |
| out_path | No | Where to write the filled .docx. Defaults to <template>-filled.docx | |
| overwrite | No | Replace out_path if a file is already there. Default false: an existing file is never overwritten | |
| template_path | Yes | Path to the .docx template containing {{placeholders}}. Every style, table, header, footer and image of the original is kept. Placeholders split across runs by Word's editor are handled, because the substitution runs on the joined text of each paragraph |