Skip to main content
Glama

Fill a Word template

doc_fill_template

Replace {{placeholders}} in a .docx, save a new filled file, and report filled, unfilled, or ignored placeholders. Call with no values to list placeholders.

Instructions

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
template_pathYesPath to the .docx template containing {{placeholders}}. Every style, table, header, footer and image of the original is kept. Placeholders split across runs by Word's editor are handled, because the substitution runs on the joined text of each paragraph

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.20.0

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden. It discloses that the tool writes a new file, reports filled/unfilled/ignored placeholders, lists placeholders when called without values, and imposes a free-tier limit of 10 placeholders. These are meaningful behavioral traits beyond what the schema already expresses.

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 three concise sentences, front-loaded with the primary action and followed by the no-values behavior and the free-tier constraint. Every sentence earns its place and there is no repetition of schema details.

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?

For a moderately complex tool with no output schema, the description covers the main behavior, the alternative no-values invocation, and the key free-tier limitation. Parameter defaults and path behavior are handled by the schema. The only minor gap is the exact return format, though the filled/unfilled/ignored report is mentioned.

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?

Schema description coverage is 100%, so the baseline is 3. The description adds extra semantic value by explaining that omitting values triggers placeholder listing, which directly clarifies the optional values parameter. It also frames the meaning of placeholders in context, going slightly beyond the schema descriptions.

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 action and resource: replace {{placeholders}} in a .docx and write a new file. It also clarifies that calling with no values lists placeholders, which is a distinct behavior. This clearly separates it from sibling doc tools like doc_create, doc_read, or doc_from_markdown.

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 explicitly says when to call the tool: to replace placeholders or to list placeholders with no values. It gives clear usage context, though it does not mention alternatives or exclusions such as 'use doc_from_markdown instead when creating a document from scratch.'

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

Deploy Server

Other Tools