Skip to main content
Glama

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
NameRequiredDescriptionDefault
idYesProject ID
nameNo
descriptionNo
statusNo
tagsNo

Implementation Reference

  • 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;
    }
  • 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'],
      },
    },
  • 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,

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