Skip to main content
Glama

template_delete

Remove task templates from the Saga MCP project tracker to maintain a clean, organized database structure for AI agents managing projects and tasks.

Instructions

Delete a task template.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesTemplate ID

Implementation Reference

  • The handler function that executes the deletion of a template from the database.
    function handleTemplateDelete(args: Record<string, unknown>) {
      const db = getDb();
      const id = args.id as number;
    
      const template = db.prepare('SELECT * FROM templates WHERE id = ?').get(id) as Record<string, unknown> | undefined;
      if (!template) throw new Error(`Template ${id} not found`);
    
      db.prepare('DELETE FROM templates WHERE id = ?').run(id);
      logActivity(db, 'template', id, 'deleted', null, null, null,
        `Template '${template.name}' deleted`);
    
      return { message: `Template '${template.name}' deleted` };
    }
  • The schema definition for the template_delete tool.
      name: 'template_delete',
      description: 'Delete a task template.',
      annotations: { title: 'Delete Template', readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false },
      inputSchema: {
        type: 'object',
        properties: {
          id: { type: 'integer', description: 'Template ID' },
        },
        required: ['id'],
      },
    },
  • Registration of the template_delete handler in the exports map.
    template_delete: handleTemplateDelete,

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