Skip to main content
Glama

render_template

Render template elements by inserting provided variables into predefined templates for dynamic content generation in AI persona management.

Instructions

Render a template element with provided variables

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesThe template name to render
variablesYesVariables to use in the template

Implementation Reference

  • MCP tool handler for 'render_template': delegates to server.renderTemplate(name, variables). Includes tool name, description, and input schema.
    // Element-specific tools { tool: { name: "render_template", description: "Render a template element with provided variables", inputSchema: { type: "object", properties: { name: { type: "string", description: "The template name to render", }, variables: { type: "object", description: "Variables to use in the template", additionalProperties: true, }, }, required: ["name", "variables"], }, }, handler: (args: RenderTemplateArgs) => server.renderTemplate(args.name, args.variables) },
  • TypeScript interface defining input arguments for render_template tool.
    interface RenderTemplateArgs { name: string; variables: Record<string, any>; }
  • Registration of render_template tool (among element tools) into the ToolRegistry during server setup.
    this.toolRegistry.registerMany(getElementTools(instance));
  • IToolHandler interface defining the server.renderTemplate method signature used by the tool handler.
    renderTemplate(name: string, variables: Record<string, any>): Promise<any>;

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/DollhouseMCP/mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server