project_update
Modify project details in Saga MCP's structured database by specifying fields to update, including status changes to archive projects.
Instructions
Update a project. Pass only the fields you want to change. Set status to "archived" to soft-delete.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Project ID | |
| name | No | ||
| description | No | ||
| status | No | ||
| tags | No |
Implementation Reference
- src/tools/projects.ts:114-128 (handler)The handler function that executes the 'project_update' logic, performing the database update and logging the activity.
function handleProjectUpdate(args: Record<string, unknown>) { const db = getDb(); const id = args.id as number; const oldRow = db.prepare('SELECT * FROM projects WHERE id = ?').get(id) as Record<string, unknown> | undefined; if (!oldRow) throw new Error(`Project ${id} not found`); const update = buildUpdate('projects', id, args, ['name', 'description', 'status', '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, 'project', id, newRow.name as string, oldRow, newRow, ['name', 'status']); return newRow; } - src/tools/projects.ts:49-64 (schema)The schema definition for the 'project_update' tool.
name: 'project_update', description: 'Update a project. Pass only the fields you want to change. Set status to "archived" to soft-delete.', annotations: { title: 'Update Project', readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false }, inputSchema: { type: 'object', properties: { id: { type: 'integer', description: 'Project ID' }, name: { type: 'string' }, description: { type: 'string' }, status: { type: 'string', enum: ['active', 'on_hold', 'completed', 'archived'] }, tags: { type: 'array', items: { type: 'string' } }, }, required: ['id'], }, }, - src/tools/projects.ts:130-133 (registration)Registration of the 'project_update' handler in the tools export.
export const handlers: Record<string, ToolHandler> = { project_create: handleProjectCreate, project_list: handleProjectList, project_update: handleProjectUpdate,