| name | word-xml-injector |
| description | Advanced skill for inspecting, parsing, modifying, and injecting raw WordprocessingML XML elements and templates into Microsoft Word (.docx) files. |
WordprocessingML XML Injector & Template Skill
This skill provides advanced protocols for inspecting, modifying, and injecting raw WordprocessingML XML elements and dataset templates into Microsoft Word (.docx) files.
1. Core Workflows
Workflow 1: Dataset Template Injection (inject_template_data)
Used for rendering document templates containing curly-brace tags:
- Simple placeholders:
{client_name}, {date}, {reference_number}
- Array loops:
{#items}{name}: {amount} SAR{/items}
- Conditional blocks:
{#isApproved}معتمد{/isApproved}
{
"tool": "inject_template_data",
"arguments": {
"templatePath": "path/to/template.docx",
"data": {
"client_name": "شركة التقنية المتقدمة",
"items": [
{ "name": "خادم MCP العربي", "amount": "15,000" },
{ "name": "نظام الأتمتة الذكي", "amount": "25,000" }
]
},
"outputPath": "path/to/rendered_document.docx"
}
}
Workflow 2: Surgical Tag Replacement (modify_word_xml_element)
Used for modifying text nodes or injecting XML tags inside word/document.xml:
{
"tool": "modify_word_xml_element",
"arguments": {
"filePath": "path/to/document.docx",
"targetText": "النص القديم",
"replacementText": "النص الجديد",
"outputPath": "path/to/updated_document.docx"
}
}