Metis — Fill Document Template
fill_document_templateFill a stored Word template by replacing specified paragraph keys and save a copy, preserving letterhead, styles, and fixed wording. Use after reading the template keys.
Instructions
Fill a stored Word template (e.g. an ethics-committee cover letter) and save a copy.
Call read_document_template first to get the paragraph keys. The template's
letterhead, styles and fixed wording are kept; only the listed paragraphs change.
Args:
edits: JSON object mapping paragraph keys to their new text, e.g.
{"p5": "Antwerp, 14 October 2026", "p19": "This study ...", "h0": ""}.
An empty string empties that paragraph; null deletes it.
template: Template name or part of it. Empty = the first stored document template.
filename: Output name; derived from the template when omitted.
Returns:
Where the filled document was saved, including a path that opens from Windows.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| edits | Yes | ||
| filename | No | ||
| template | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |