Skip to main content
Glama

template_list

Read-onlyIdempotent

Retrieve all available task templates to standardize and streamline task creation across projects.

Instructions

List all available task templates.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler function for template_list tool. Queries all templates from the database, parses template_data JSON, and returns each template with its task_count.
    function handleTemplateList() {
      const db = getDb();
      const templates = db.prepare('SELECT * FROM templates ORDER BY created_at DESC').all() as Array<Record<string, unknown>>;
    
      return templates.map((t) => ({
        ...t,
        task_count: (JSON.parse(t.template_data as string) as unknown[]).length,
      }));
    }
  • Tool definition/schema for template_list. Declares name 'template_list', description 'List all available task templates.', and an empty inputSchema (no parameters required).
    {
      name: 'template_list',
      description: 'List all available task templates.',
      annotations: { title: 'List Templates', readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
      inputSchema: {
        type: 'object',
        properties: {},
      },
  • Exported handlers mapping. Maps 'template_list' to handleTemplateList function.
    export const handlers: Record<string, ToolHandler> = {
      template_create: handleTemplateCreate,
      template_list: handleTemplateList,
      template_apply: handleTemplateApply,
      template_delete: handleTemplateDelete,
    };
  • src/index.ts:37-49 (registration)
    Top-level handlers aggregation. The templateHandlers (including template_list) are spread into ALL_HANDLERS, which is used by the CallTool request handler.
    const ALL_HANDLERS: Record<string, (args: Record<string, unknown>) => unknown> = {
      ...projectHandlers,
      ...epicHandlers,
      ...taskHandlers,
      ...subtaskHandlers,
      ...noteHandlers,
      ...commentHandlers,
      ...templateHandlers,
      ...dashboardHandlers,
      ...searchHandlers,
      ...activityHandlers,
      ...exportImportHandlers,
    };
Behavior3/5

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

The description adds no behavioral details beyond what annotations already provide (readOnlyHint, etc.). It does not mention scope or return format.

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?

Single, clear sentence with no extraneous 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?

For a simple list tool with no parameters and full annotations, the description is entirely sufficient.

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?

No parameters exist; schema coverage is 100%. Description adds no parameter info, but none needed.

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 action ('list') and resource ('task templates'), distinguishing it from sibling tools like template_create or template_delete.

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

Usage Guidelines3/5

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

No guidance on when to use this tool vs alternatives like epc_list or project_list. However, the tool's simplicity makes it obvious.

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