Skip to main content
Glama

template_create

Create reusable task templates with variable placeholders to standardize workflows in project management systems.

Instructions

Create a reusable task template. Templates define a set of tasks that can be instantiated into any epic. Use {variable} placeholders for dynamic values.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesTemplate name (must be unique)
descriptionNoTemplate description
tasksYesTask definitions. Use {variable} for placeholders.

Implementation Reference

  • The handler function `handleTemplateCreate` performs the insertion of a new template into the database.
    function handleTemplateCreate(args: Record<string, unknown>) {
      const db = getDb();
      const name = args.name as string;
      const description = (args.description as string) ?? null;
      const tasks = args.tasks as Array<Record<string, unknown>>;
    
      const templateData = JSON.stringify(tasks);
    
      const template = db
        .prepare('INSERT INTO templates (name, description, template_data) VALUES (?, ?, ?) RETURNING *')
        .get(name, description, templateData);
    
      const row = template as Record<string, unknown>;
      logActivity(db, 'template', row.id as number, 'created', null, null, null,
        `Template '${name}' created with ${tasks.length} task(s)`);
    
      return { ...row, tasks };
    }
  • Input schema definition for the `template_create` tool.
    {
      name: 'template_create',
      description:
        'Create a reusable task template. Templates define a set of tasks that can be instantiated into any epic. Use {variable} placeholders for dynamic values.',
      annotations: { title: 'Create Template', readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false },
      inputSchema: {
        type: 'object',
        properties: {
          name: { type: 'string', description: 'Template name (must be unique)' },
          description: { type: 'string', description: 'Template description' },
          tasks: {
            type: 'array',
            description: 'Task definitions. Use {variable} for placeholders.',
            items: {
              type: 'object',
              properties: {
                title: { type: 'string', description: 'Task title (supports {variable} placeholders)' },
                description: { type: 'string', description: 'Task description (supports {variable} placeholders)' },
                priority: { type: 'string', enum: ['low', 'medium', 'high', 'critical'], default: 'medium' },
                estimated_hours: { type: 'number' },
                tags: { type: 'array', items: { type: 'string' } },
              },
              required: ['title'],
            },
          },
        },
        required: ['name', 'tasks'],
      },
    },
  • Registration of the `template_create` handler in the `handlers` object.
    export const handlers: Record<string, ToolHandler> = {
      template_create: handleTemplateCreate,
      template_list: handleTemplateList,
      template_apply: handleTemplateApply,
      template_delete: handleTemplateDelete,
    };
Behavior3/5

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

Annotations already indicate this is a non-readOnly, non-destructive mutation (readOnlyHint=false, destructiveHint=false). The description adds useful context about template reusability and variable placeholders, but doesn't disclose behavioral traits like permissions needed, rate limits, or what happens on duplicate names beyond schema uniqueness.

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?

Two sentences, front-loaded with the core purpose, followed by implementation guidance. Zero waste—every sentence earns its place by explaining template functionality and placeholder usage.

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?

For a creation tool with good annotations and full schema coverage, the description is reasonably complete. It explains the template's purpose and variable system. However, without an output schema, it doesn't describe what's returned (e.g., template ID), leaving a minor gap.

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 parameters are well-documented in the schema. The description adds marginal value by mentioning variable placeholders for tasks, which aligns with schema descriptions but doesn't provide additional semantic context beyond what's already structured.

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 clearly states the verb ('Create') and resource ('reusable task template'), explaining that templates define task sets for instantiation into epics. It distinguishes from siblings like template_apply (instantiates) and template_list (lists).

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?

The description explains when to use this tool ('Create a reusable task template') and mentions the purpose ('can be instantiated into any epic'), providing clear context. However, it doesn't explicitly state when NOT to use it or name alternatives like template_apply for instantiation.

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

Install Server

Other Tools

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/spranab/saga-mcp'

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