Skip to main content
Glama

epic_update

Modify epic details in Saga MCP's project tracker by specifying only the fields to change, including status updates to manage workflow or soft-delete items.

Instructions

Update an epic. Pass only the fields you want to change. Set status to "cancelled" to soft-delete.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesEpic ID
nameNo
descriptionNo
statusNo
priorityNo
sort_orderNo
tagsNo

Implementation Reference

  • The handler function that executes the logic for updating an epic.
    function handleEpicUpdate(args: Record<string, unknown>) {
      const db = getDb();
      const id = args.id as number;
    
      const oldRow = db.prepare('SELECT * FROM epics WHERE id = ?').get(id) as Record<string, unknown> | undefined;
      if (!oldRow) throw new Error(`Epic ${id} not found`);
    
      const update = buildUpdate('epics', id, args, ['name', 'description', 'status', 'priority', 'sort_order', 'tags']);
      if (!update) throw new Error('No fields to update');
    
      const newRow = db.prepare(update.sql).get(...update.params) as Record<string, unknown>;
      logEntityUpdate(db, 'epic', id, newRow.name as string, oldRow, newRow, ['name', 'status', 'priority']);
    
      return newRow;
    }
  • The MCP tool definition and input schema for the epic_update tool.
    {
      name: 'epic_update',
      description:
        'Update an epic. Pass only the fields you want to change. Set status to "cancelled" to soft-delete.',
      annotations: { title: 'Update Epic', readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false },
      inputSchema: {
        type: 'object',
        properties: {
          id: { type: 'integer', description: 'Epic ID' },
          name: { type: 'string' },
          description: { type: 'string' },
          status: { type: 'string', enum: ['planned', 'in_progress', 'completed', 'cancelled'] },
          priority: { type: 'string', enum: ['low', 'medium', 'high', 'critical'] },
          sort_order: { type: 'integer' },
          tags: { type: 'array', items: { type: 'string' } },
        },
        required: ['id'],
      },
    },
  • Registration of the epic_update tool handler within the exported handlers object.
    export const handlers: Record<string, ToolHandler> = {
      epic_create: handleEpicCreate,
      epic_list: handleEpicList,
      epic_update: handleEpicUpdate,
    };

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