Skip to main content
Glama

Fill a Word template

doc_fill_template

Replace {{placeholders}} in a .docx template with provided values, writing a new file and reporting filled, unfilled, or ignored placeholders. Omit values to list available ones.

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.1/5.0
Behavior4/5

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

Annotations declare readOnlyHint=false, destructiveHint=false and idempotentHint=false; the description adds real context on top: it writes a NEW file, reports filled/unfilled/ignored, and notes a free tier of up to 10 placeholders (implying a limit beyond that). No return format or pagination detail, but solid added value.

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 tight sentences, front-loaded with the primary action, then the discovery mode, then the pricing constraint. Zero 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?

No output schema exists, so the description's mention of reporting filled/unfilled/ignored carries the return-value burden, and it does so adequately. It's slightly incomplete on what happens to unmatched placeholders (left literal or removed) and the exact free/paid boundary.

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, but the description genuinely adds semantics: an empty/absent `values` object is a list-placeholders mode. That is behavior a caller cannot infer from the schema alone.

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

Purpose4/5

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

States a specific verb+resource: replace {{placeholders}} in a .docx and write a new file, with the extra reporting behavior described. It's clearly distinct from siblings like doc_create or doc_from_markdown, but it doesn't explicitly name an alternative to differentiate itself.

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?

Gives clear calling context, including the useful 'call it with no values to list them' discovery mode. It does not state when NOT to use it or name the sibling for related tasks (e.g. doc_create for a template-free document).

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