fill_template
Fill {{key}} placeholders in documents with data, expanding loops and conditions, then write a new file while leaving the original template unchanged.
Instructions
Fill {{key}} placeholders in a template document with data, expanding {{#each list}} loops and {{#if}}/{{#unless}} conditions. Writes a NEW file to output_path (default: _filled.); the input template is left unchanged. Run validate_template first to catch missing keys early.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | Key-value data to fill placeholders. Supports nested objects. | |
| options | No | Tool options. | |
| output_path | No | Output file path. | |
| template_path | Yes | Path to the template document containing placeholders. |