Skip to main content
Glama

fill_template

Fill structured document tags (SDT) in Word files using a data dictionary, with optional removal of unmatched content controls.

Instructions

Fill SDT content controls from data dict. Keys match w:tag values.

Args: data: Mapping of tag names to values. Use list[str] for repeating sections. remove_empty: If True, remove SDTs with no matching key in data.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYes
remove_emptyNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior2/5

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

No annotations are provided, so the description must disclose behavioral traits. It does not mention whether it overwrites or appends, what happens to unmatched keys, or any side effects like document mutation or permission requirements.

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

Conciseness4/5

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

The description is very concise (two short sentences plus parameter explanations). It avoids unnecessary words, though the parameter details are embedded rather than separately listed.

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

Completeness3/5

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

The description is incomplete for a template-filling tool. It does not explain the return value (despite an output schema existing), error handling for missing keys or invalid data, or behavior when data dict contains extra keys.

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?

With 0% schema description coverage, the description adds essential meaning: it explains that 'data' keys correspond to w:tag values and that 'remove_empty' deletes SDTs without matching keys. This goes beyond the schema's type definitions.

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 clearly states the verb 'fill' and resource 'SDT content controls', explaining that it maps a data dictionary to content controls using w:tag values. This distinguishes it from sibling tools like set_content_control_value or update_content_control.

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

Usage Guidelines2/5

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

The description provides no explicit guidance on when to use this tool versus alternatives (e.g., set_content_control_value for single controls, update_content_control for updates). It assumes user knowledge of SDT and w:tag without contextual hints.

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/SecurityRonin/docx-mcp'

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