Skip to main content
Glama

fill_template

Fill {{key}} placeholders in documents with data, expanding loops and conditions, then write a new file while leaving the original template unchanged.

Instructions

Fill {{key}} placeholders in a template document with data, expanding {{#each list}} loops and {{#if}}/{{#unless}} conditions. Writes a NEW file to output_path (default: _filled.); the input template is left unchanged. Run validate_template first to catch missing keys early.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYesKey-value data to fill placeholders. Supports nested objects.
optionsNoTool options.
output_pathNoOutput file path.
template_pathYesPath to the template document containing placeholders.
Behavior4/5

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

Annotations already indicate non-read-only and non-destructive behavior. The description adds valuable context beyond annotations: it writes a NEW file, leaves the input unchanged, and specifies the default output_path naming pattern. This gives agents clear expectations about the operation's side effects.

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 highly focused sentences: purpose, output behavior, and recommended preceding action. No filler or repetition—every sentence earns its place.

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 core behavior, output file handling, and validation workflow, which is sufficient for a 4-param tool with no output schema. Minor gaps remain (e.g., no explicit return value, no overwrite policy), but these are not critical given the effective annotation coverage.

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 covers 100% of parameters with basic descriptions. The description goes further by explaining the placeholder syntax ({{key}}, loops, conditionals) that relates to the data parameter, and clarifies the output_path default behavior, adding meaning beyond the schema.

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 explicitly states it fills {{key}} placeholders with data and expands loops/conditionals, using a specific verb+resource. It clearly distinguishes this tool from siblings like create_office_document, edit_office_document, and validate_template.

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 advises running validate_template first to catch missing keys, providing clear sequencing guidance. However, it doesn't explicitly mention when not to use this tool or name alternative fill/preview tools, so it doesn't reach the top score.

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/Tianshang301/TianshangScribe'

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