Skip to main content
Glama

template_list

Read-onlyIdempotent

Retrieve available task templates to standardize project tracking and maintain consistency across work items in the Saga MCP server.

Instructions

List all available task templates.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function that executes the template_list tool logic by querying the database for all templates and calculating task counts.
    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,
      }));
    }
  • The tool definition for template_list including name, description, and input schema.
    {
      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: {},
      },
    },
  • The registration object mapping the tool name 'template_list' to its handler function 'handleTemplateList'.
    export const handlers: Record<string, ToolHandler> = {
      template_create: handleTemplateCreate,
      template_list: handleTemplateList,
      template_apply: handleTemplateApply,
      template_delete: handleTemplateDelete,
    };
Behavior4/5

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

Annotations already provide strong behavioral hints (readOnly, non-destructive, idempotent, closed-world). The description adds minimal value beyond confirming this is a listing operation, but doesn't contradict annotations. It doesn't mention pagination, sorting, or return format details that would be helpful.

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?

The description is a single, clear sentence with zero wasted words. It's front-loaded with the core purpose and doesn't include unnecessary elaboration. Every word earns its place in this minimal but complete statement.

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?

For a simple list operation with strong annotations and no parameters, the description is adequate but minimal. Without an output schema, it doesn't describe what 'list' returns (array of templates? fields included?). The annotations cover safety aspects, but the description could better explain the scope of 'all available'.

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?

With 0 parameters and 100% schema coverage, there are no parameters to document. The description appropriately doesn't discuss parameters, which is correct for this tool. A baseline of 4 is appropriate since the schema handles the empty parameter set completely.

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?

The description clearly states the action ('List') and resource ('all available task templates'), making the purpose immediately understandable. It doesn't differentiate from sibling tools like 'template_create' or 'template_delete', but the verb+resource combination is specific enough for basic understanding.

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?

The description provides no guidance on when to use this tool versus alternatives like 'template_apply' or 'task_list'. There's no mention of prerequisites, context, or comparison with sibling tools, leaving the agent to infer usage patterns independently.

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