Skip to main content
Glama

validate_template

Read-onlyIdempotent

Validate that template variables, loops, and conditions resolve against data, reporting missing keys to catch errors before filling documents.

Instructions

Validate that all {{placeholder}} variables, {{#each}} loops, and {{#if}}/{{#unless}} conditions in a template can be resolved against data, reporting missing keys. Read-only — never modifies the file. Call this BEFORE fill_template to catch missing keys early.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYesKey-value data to validate against placeholders.
template_pathYesPath to the template document (.docx/.xlsx).
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false. The description reinforces 'Read-only — never modifies the file' (redundant with annotations) but adds the validation scope and outcome of reporting missing keys. It does not describe the return format or error behavior, but safety traits are already covered by annotations.

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 two sentences, front-loaded with the verb and main purpose, and includes a direct usage call-to-action. Every sentence contributes value; no filler or repetition beyond what is necessary to reinforce the read-only trait (which is already in annotations but acceptable).

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?

Given the tool has only two parameters, no output schema, and strong annotations, the description covers the main purpose, the read-only nature, and the recommended invocation ordering. It lacks an explicit detail on the return value shape, but the phrase 'reporting missing keys' gives a sufficient understanding of the outcome.

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%: template_path and data are both described in the schema. The description adds slight context by explaining that data is used to resolve placeholders/loops/conditions, but it does not materially add beyond what the schema already provides, so baseline 3 applies.

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 uses a specific verb 'validate' with a clear resource (template) and enumerates the exact constructs checked: {{placeholder}} variables, {{#each}} loops, and {{#if}}/{{#unless}} conditions. It also distinguishes itself from the sibling tool fill_template by explicitly stating it should be called before it.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It explicitly says 'Call this BEFORE fill_template to catch missing keys early,' naming the alternative sibling tool and the context for use. This provides clear when-to-use and why, differentiating it from the sibling that follows.

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