Skip to main content
Glama

Rellenar plantilla de prompt

prompt-template-fill
Read-onlyIdempotent

Rellena marcadores {{variable}} de una plantilla con valores, informando faltantes y no usados; sin ejecutar código. Cuándo: un flujo de agente necesita un resultado exacto y repetible para un paso auxiliar (tokens, costos, reintentos, fragmentos, ranking, limpieza de JSON). No para: estimar heurísticamente cuántos tokens de LLM usa un texto, con un rango de ±25 % (token-estimate). Efectos secundarios: ninguno (solo lectura, sin red, sin estado guardado). Determinista: la misma entrada da la misma salida. Límites: entrada JSON de hasta 64 KB, 1 s por llamada, resultado de hasta 1 MB.

EN: Fills {{variable}} placeholders (dotted paths allowed, optional {{name|default}}) from a values object, reporting missing and unused variables; strict mode fails on missing values. No code execution. When: an agent loop needs an exact, repeatable result for a bookkeeping step (tokens, costs, retries, chunking, ranking, JSON clean-up). [EN completo / full EN: inputSchema.description]

Input Schema

NameRequiredDescriptionDefault
escapeNoEscape inserted values (optional; one of: none, html, json; default "none").none
strictNoFail when a variable is missing and has no default (boolean; optional; default false).
valuesNoValues object (object; optional; default {}).
templateYesTemplate text (string; required).

Output Schema

NameRequiredDescriptionDefault
textNo
unusedNo
missingNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / template / examples
      Added value: +[
      +  "Hola {{user.name}}, tu plan es {{plan|gratis}}. {{x}}"
      +]
  2. Changed1 schema field changed
    • addedInput schema / description
      Added value: +"EN: Fills {{variable}} placeholders (dotted paths allowed, optional {{name|default}}) from a values object, reporting missing and unused variables; strict mode fails on missing values. No code execution. When: an agent loop needs an exact, repeatable result for a bookkeeping step (tokens, costs, retries, chunking, ranking, JSON clean-up). Not for: heuristically estimating how many LLM tokens a text uses (token-estimate). Side effects: none (read-only, no network access, no stored state). Deterministic: the same input gives the same output. Limits: JSON input up to 64 KB, 1 s per call, result up to 1 MB."
  3. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare read-only, idempotent, closed-world, non-destructive. The description adds substantial context beyond that: no code execution, deterministic output, missing/unused variable reporting, strict-mode failure, and concrete limits (64 KB input, 1 s, 1 MB result).

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?

Front-loads the purpose, then layers When / Not-for / side effects / limits with clear labels. Slightly dense and mixes Spanish and English, but every clause carries information.

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

Completeness5/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 need not be explained, and annotations cover the safety profile. The description fills remaining gaps (determinism, limits, failure modes, alternative tool), making it complete for correct invocation.

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 100%, so the schema already documents all four parameters and earns a baseline 3. The description adds template-syntax meaning (dotted paths, {{name|default}}) and strict-mode behavior that complement the schema text.

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: fills {{variable}} placeholders from a values object, including dotted paths and defaults. It explicitly names the sibling it is not (token-estimate), so an agent can distinguish it from nearby tools without opening the schema.

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?

Gives an explicit When (exact, repeatable bookkeeping steps like tokens, costs, retries, chunking, ranking, JSON clean-up) and an explicit Not-for (heuristic token estimation via token-estimate). The condition that selects between the two is spelled out.

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