Skip to main content
Glama

Fill a prompt template with variables

generate-prompt
Read-onlyIdempotent

Fill a prompt template with supplied variables. Use {name} placeholders with matching vars.name; missing variables become empty text. Returns a prompt string without invoking a model; code/image modes can add framing.

Input Schema

NameRequiredDescriptionDefault
seedNoOptional deterministic seed for the {{RAND_INT:min,max}} helper, not ordinary placeholders.
typeNoPrompt template category: text, code or image; default text.
varsNoObject mapping placeholder names to values, e.g. {"name":"Ada"} for {name}.
templateYesTemplate text, e.g. Hello {name}; omitted variables are replaced with empty text.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedInput schema / properties / seed / description
      Previous value: -"Optional deterministic seed supported by the upstream template generator."New value: +"Optional deterministic seed for the {{RAND_INT:min,max}} helper, not ordinary placeholders."
    • changedInput schema / properties / template / description
      Previous value: -"Template string with variable placeholders, limited to 4096 characters."New value: +"Template text, e.g. Hello {name}; omitted variables are replaced with empty text."
    • changedInput schema / properties / vars / description
      Previous value: -"Map of placeholder names to replacement values."New value: +"Object mapping placeholder names to values, e.g. {\"name\":\"Ada\"} for {name}."
  2. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so the safety profile is covered. The description adds real behavioral context beyond that: missing variables are replaced with empty text (a silent-failure mode worth knowing), the return is a prompt string, and code/image modes add framing.

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 short sentences, each earning its place: purpose, placeholder syntax plus fallback behavior, then return semantics and mode framing. Front-loaded with the core action and no 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?

With no output schema, the description correctly states what comes back ('a prompt string without invoking a model'), and it covers the mode enum and variable substitution behavior. The only gap is the deterministic seed helper, which the schema does document but the description never ties into the rendering behavior.

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%, so the baseline is 3. The description reinforces the {name} → vars.name mapping and the missing-variable behavior, but adds little syntax detail the schema does not already carry, and it never mentions the seed parameter's {{RAND_INT:min,max}} helper.

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 specific verb and resource ('Fill a prompt template with supplied variables') and immediately clarifies the non-obvious boundary that it does not invoke a model. That distinction separates it cleanly from the generate-* siblings, which all produce data rather than rendered template text.

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?

It implicitly scopes usage by stating the tool only renders a prompt string and never calls a model, which tells the agent this is a pre-processing step rather than a generation step. However, it names no alternative and gives no explicit when-to-use or when-not-to-use condition.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources