Skip to main content
Glama

Apply Template

apply_template

Generates a ready-to-use prompt by filling a named prompt template with a subject for image generation, editing, or analysis workflows.

Instructions

Apply a prompt template with a subject to generate a ready-to-use prompt.

Input Schema

NameRequiredDescriptionDefault
subjectYesThe subject to fill into the template (e.g., 'wireless headphones', 'coffee shop')
template_nameYesName of the template (e.g., 'product_hero', 'instagram_post'). Use list_templates() to see all.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.4

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden, yet it says nothing about that this is a pure text transform (no generation side effects), what happens with an unknown template_name, or whether output is a plain string prompt. It does at least imply the return is 'a ready-to-use prompt', which is the one behavioral fact conveyed.

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?

A single front-loaded sentence with no filler; nothing is wasted. It is arguably too terse rather than verbose, but as a structural matter it is tight and clear.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists so return values needn't be explained, and parameters are fully covered by the schema. However, with zero annotations on a tool that sits in a suite of image-generation siblings, the description should still clarify that it only produces prompt text and not an image, and how it relates to optimize_prompt/generate_image.

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 both parameters (template_name, subject) are already documented with examples and the list_templates pointer. The description restates that a subject is filled into a template but adds no syntax or format detail beyond the schema, matching the baseline-3 case.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb ('apply') and resource ('prompt template') plus the outcome ('generate a ready-to-use prompt'), which is clear enough to distinguish it from image-mutation siblings like edit_image or transform_image. It doesn't explicitly differentiate from the nearest sibling list_templates (only the schema hints at that), so it stops short of a 5.

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

Usage Guidelines2/5

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

No when-to-use or when-not-to-use guidance is given, and no alternatives are named despite siblings like list_templates, optimize_prompt, and generate_image that an agent could easily confuse it with. The only routing hint ('Use list_templates() to see all') lives in the schema property, not the description.

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