Skip to main content
Glama

Inject Data into Docx Template

inject_template_data

Merge JSON key-value data into a .docx template, substituting placeholders like {name} and {#items} to generate a populated document.

Instructions

Merges JSON key-value data into a .docx template containing tags (e.g., {name}, {#items}).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYesKey-value data object
outputPathYesOutput .docx file path
templatePathYesPath to input template .docx
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden, but it omits critical behaviors: whether the original template file is modified or a new file is written (despite outputPath being a required parameter), what happens with missing or extra keys, and error conditions. The description only states a high-level merge action without disclosing side effects.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, front-loaded sentence with no filler. It earns its place by stating the verb, resource, and an illustrative example without redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool that writes files and handles template logic, the description is under-specified. It lacks guidance on output behavior (e.g., whether outputPath creates a new file or overwrites), array/loop handling details, and any return values or error messages. The example tags hint at features but do not explain them, leaving significant gaps for an agent to use the tool safely.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema already provides 100% coverage for parameter descriptions, giving the baseline of 3. The description adds meaningful semantics by explaining that data keys correspond to tags in the template and hints at loop support with {#items}, which clarifies the data parameter's structure beyond 'Key-value data object'.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('Merges') and resource ('.docx template containing tags'), clearly distinguishing it from sibling tools like add_paragraph or create_word_document. The example tags ({name}, {#items}) ground the tool's function in concrete template syntax.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage: use when you have a .docx template with tags and JSON data to fill in. It does not explicitly name alternatives or exclusions, but the tag-based context is clear enough to guide selection among document manipulation tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/MarwanDevSpace/mcp-arabic-ms-word'

If you have feedback or need assistance with the MCP directory API, please join our Discord server