Skip to main content
Glama
jakedx6
by jakedx6

bulk_update_projects

Update multiple projects simultaneously by applying common settings like status changes across selected project IDs, streamlining project management workflows.

Instructions

Update multiple projects at once with common settings

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idsYesArray of project IDs to update
updatesYesUpdates to apply to all projects
reasonNoReason for bulk update

Implementation Reference

  • The handler function that implements the bulk_update_projects tool logic: validates input with schema, loops over project_ids to update each via supabaseService.updateProject, collects results with success/failure, returns summary and detailed results.
    export const bulkUpdateProjects = requireAuth(async (args: any) => { const { project_ids, updates, reason } = BulkUpdateProjectsSchema.parse(args) logger.info('Bulk updating projects', { project_count: project_ids.length, updates, reason }) const results = [] const now = new Date().toISOString() for (const project_id of project_ids) { try { const updateData = { ...updates, updated_at: now, // metadata field doesn't exist in the database schema } const result = await supabaseService.updateProject(project_id, updateData) results.push({ project_id, success: true, project: result }) } catch (error) { logger.error(`Failed to update project ${project_id}:`, error) results.push({ project_id, success: false, error: error instanceof Error ? error.message : 'Unknown error' }) } } const successCount = results.filter(r => r.success).length const failureCount = results.filter(r => !r.success).length return { summary: { total_projects: project_ids.length, successful_updates: successCount, failed_updates: failureCount, success_rate: (successCount / project_ids.length) * 100 }, results, applied_updates: updates } })
  • MCPTool registration object for 'bulk_update_projects' defining name, description, and input schema.
    export const bulkUpdateProjectsTool: MCPTool = { name: 'bulk_update_projects', description: 'Update multiple projects at once with common settings', inputSchema: { type: 'object', properties: { project_ids: { type: 'array', items: { type: 'string' }, description: 'Array of project IDs to update' }, updates: { type: 'object', properties: { status: { type: 'string', enum: ['active', 'completed', 'archived'] } // Removed priority, visibility, owner_id as they don't exist in the database schema }, description: 'Updates to apply to all projects' }, reason: { type: 'string', description: 'Reason for bulk update' } }, required: ['project_ids', 'updates'] } }
  • Zod schema used for input validation in the bulkUpdateProjects handler.
    const BulkUpdateProjectsSchema = z.object({ project_ids: z.array(z.string().min(1)).min(1), updates: z.object({ status: z.enum(['active', 'completed', 'archived']).optional() // Removed priority, visibility, owner_id as they don't exist in the database schema }), reason: z.string().optional() })
  • Registration of project handlers map, including bulk_update_projects mapped to its handler function.
    export const projectHandlers = { list_projects: listProjects, get_project: getProject, create_project: createProject, update_project: updateProject, get_project_context: getProjectContext, archive_project: archiveProject, duplicate_project: duplicateProject, get_project_timeline: getProjectTimeline, bulk_update_projects: bulkUpdateProjects }
  • Collection/export of all project tools, including bulkUpdateProjectsTool.
    export const projectTools = { listProjectsTool, getProjectTool, createProjectTool, updateProjectTool, getProjectContextTool, archiveProjectTool, duplicateProjectTool, getProjectTimelineTool, bulkUpdateProjectsTool }

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/jakedx6/helios9-MCP-Server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server