Skip to main content
Glama

fill_template

Fill structured document templates by mapping data dictionary keys to content control tags, with support for repeating sections and optional removal of unmatched 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
Behavior3/5

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

With no annotations, the description must fully disclose behavior. It explains that keys match tag values and that remove_empty controls deletion of unmatched SDTs. However, it does not clarify what happens with extra data keys, whether existing values are overwritten, or if the document must be open. It provides moderate transparency but leaves gaps.

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 concise with only two sentences and an Args block. Every sentence provides essential information without fluff. It is well-structured and front-loaded with the core purpose.

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?

Given the presence of an output schema (indicated), the description does not need to cover return values. However, it lacks completeness in behavioral aspects: it doesn't specify what happens with extra keys, whether SDTs must exist, or the behavior when remove_empty is False. It covers the basics but misses some important details for a complex tool with nested objects.

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?

Despite 0% schema description coverage, the description adds meaning by explaining data as a mapping and clarifying the use of list[str] for repeating sections. It also describes remove_empty's effect. This goes beyond the raw schema but could further detail the structure of data's values (e.g., the anyOf types).

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 that the tool fills SDT content controls from a data dictionary, with keys matching w:tag values. It distinguishes itself from siblings like set_content_control_value by indicating a batch operation using a mapping. The mention of repeating sections via list[str] adds specificity.

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

Usage Guidelines3/5

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

The description provides implied usage through argument explanations but lacks explicit guidance on when to use this tool versus alternatives like set_content_control_value or update_content_control. Given the extensive sibling list, explicit when-to-use and when-not-to-use guidance would be beneficial.

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

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