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
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Epic ID | |
| name | No | ||
| description | No | ||
| status | No | ||
| priority | No | ||
| sort_order | No | ||
| tags | No |
Implementation Reference
- src/tools/epics.ts:126-140 (handler)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; } - src/tools/epics.ts:48-66 (schema)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'], }, }, - src/tools/epics.ts:142-146 (registration)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, };