Skip to main content
Glama

templates

Fill a Word template

doc_fill_template

Call this tool to replace {{placeholders}} in a .docx and write a new file, reporting what was filled, unfilled or ignored. Call it with no values to list them. Free: templates up to 10 placeholders.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
valuesNoPlaceholder name to value, e.g. {client: "Acme", fee: "EUR 4,500.00"}
out_pathNoWhere to write the filled .docx. Defaults to <template>-filled.docx
overwriteNoReplace out_path if a file is already there. Default false: an existing file is never overwritten
docx_base64NoThe .docx template itself, base64-encoded, instead of uploading it first
template_pathNoName of a template uploaded with doc_upload

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

It discloses that the tool reports filled, unfilled, and ignored placeholders, and that calling with no values lists them. It also mentions the free-tier placeholder limit. Annotations provide no safety hints, so the description carries the behavioral disclosure burden and does so well, though it does not discuss overwrite side effects beyond the schema.

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?

Three short sentences, each adding distinct value: the core action, the no-values special behavior, and the free-tier limit. The most important information is front-loaded with no redundant filler.

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

Completeness4/5

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

The description covers the essential behavior, special no-values call mode, and output reporting, while the schema documents all five parameters. It lacks explicit guidance on choosing between template_path and docx_base64, but the schema hints at that distinction, so the overall picture is sufficient for correct invocation.

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

Parameters3/5

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

Schema description coverage is 100%, so the parameters are fully documented in structured fields. The description adds the useful behavior 'call with no values to list them', but does not add further parameter-specific semantics beyond what the schema already provides.

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 states a specific verb ('replace'), a specific resource ({{placeholders}} in a .docx), and the resulting action ('write a new file'). It clearly distinguishes this tool from siblings like doc_create, doc_read, and doc_to_html by focusing on template filling.

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 gives clear usage context: call it to fill a template and call it with no values to list placeholders. It does not explicitly name alternative tools or state when not to use it, but the purpose is specific enough that the intended usage is clear.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.