Skip to main content
Glama

Fill a prompt template with variables

generate-prompt
Read-onlyIdempotent

Fill a prompt template with provided variables. Use to assemble a prompt string from a caller-supplied template and variable map. It does not invoke or pay for any AI model. Returns constructed prompt text; inspect template placeholders before use.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
seedNoOptional deterministic seed supported by the upstream template generator.
typeNoPrompt template category: text, code or image; default text.
varsNoMap of placeholder names to replacement values.
templateYesTemplate string with variable placeholders, limited to 4096 characters.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • addedInput schema / properties / seed / description
      Added value: +"Optional deterministic seed supported by the upstream template generator."
    • addedInput schema / properties / template / description
      Added value: +"Template string with variable placeholders, limited to 4096 characters."
    • addedInput schema / properties / type / description
      Added value: +"Prompt template category: text, code or image; default text."
    • addedInput schema / properties / vars / description
      Added value: +"Map of placeholder names to replacement values."
  2. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, closed-world, so the safety profile is covered. The description adds value beyond that by clarifying the tool does not invoke or bill a model and by warning to inspect template placeholders before use.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three short sentences, the core purpose is front-loaded, and the return-value note earns its place since there is no output schema. The first two sentences overlap slightly in restating the template/variable-map idea, keeping it from a 5.

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 the return ('constructed prompt text'), and the schema fully documents parameters. The placeholder-inspection caveat covers the main failure mode. Only minor gaps remain (e.g., behavior with missing vars), so it is near-complete rather than exhaustive.

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 coverage is 100%, so the four parameters (template, vars, type, seed) are already documented in the schema with descriptions and an enum. The description only restates 'template and variable map' and adds no format or constraint detail beyond the schema; 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?

States a specific verb+resource ('Fill a prompt template with provided variables') and clarifies the mechanism ('assemble a prompt string from a caller-supplied template and variable map'). This is easily distinguished from siblings like is-prompt-minify or generate-lorem.

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 context ('Use to assemble a prompt string...') and an explicit negative scope ('It does not invoke or pay for any AI model'), which prevents a caller from mistaking it for an LLM execution tool. It does not name an alternative sibling (e.g., is-prompt-minify) or state when not to use it, so it falls short of a 5.

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