Skip to main content
Glama

template_fill

Fill templates by replacing every {{key}} token with values from a data object; fails and names any keys that lack values.

Instructions

Fill a template by replacing every {{key}} token with String(data[key]); fails, naming the keys, if any {{key}} has no value in data. [conductor: verified pure command]

Input Schema

NameRequiredDescriptionDefault
dataYes
templateYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.1

TDQS

A4.2/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, and it does disclose key behavior beyond the schema: values are coerced via String(data[key]) and the operation fails with an error that names the missing keys. It does not say what happens with nested/non-scalar values or what the successful return looks like, which keeps it short of a 5.

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?

A single dense sentence that leads with the action, then the substitution rule, then the failure mode. No filler; the trailing conductor tag is the only non-essential element.

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 two-parameter, no-output-schema utility, the description covers the operation, the coercion rule, and the error contract, which is enough to call it correctly. It stops short of explaining return value shape or behavior with object-valued keys.

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 coverage is 0% and there are no property descriptions, so the description must compensate — and it does by explaining that `template` holds {{key}} tokens and `data` is the key-value map those tokens resolve against. That is substantially more than the bare schema conveys, though edge-case semantics for nested keys remain unstated.

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 gives a precise verb and resource ("Fill a template") and immediately specifies the exact mechanism: replacing every {{key}} token with String(data[key]). No sibling tool (slugify, fix_json, truncate, etc.) offers template substitution, so the operation is unambiguous.

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?

Usage is implied by the mechanism rather than stated: an agent can infer this is the tool for rendering a tokenized template against a data map, and no sibling competes for that job. However, there is no explicit when-to-use framing or exclusion, so the score stays at the minimum-viable level.

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