Skip to main content
Glama
jakedx6
by jakedx6

update_initiative

Modify initiative details including name, objective, status, priority, dates, and metadata to reflect project changes and maintain accurate tracking.

Instructions

Update initiative details

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
initiative_idYesThe unique identifier of the initiative to update
nameNoNew name for the initiative
objectiveNoNew objective
descriptionNoNew description
statusNoNew status
priorityNoNew priority
owner_idNoNew owner ID
start_dateNoNew start date
target_dateNoNew target date
metadataNoNew metadata
tagsNoNew tags

Implementation Reference

  • The main handler function for the 'update_initiative' tool. It validates input using Zod schema, calls the Supabase service to update the initiative, logs the action, and returns the updated initiative with a success message.
    export const updateInitiative = requireAuth(async (args: any) => { const { initiative_id, ...updates } = UpdateInitiativeSchema.parse(args) logger.info('Updating initiative', { initiative_id, updates }) const initiative = await supabaseService.updateInitiative(initiative_id, updates) logger.info('Initiative updated successfully', { initiative_id: initiative.id }) return { initiative, message: `Initiative "${initiative.name}" updated successfully` } })
  • Zod schema used for runtime validation of input arguments in the update_initiative handler.
    const UpdateInitiativeSchema = z.object({ initiative_id: z.string().uuid(), name: z.string().min(1).max(255).optional(), objective: z.string().min(1).optional(), description: z.string().optional(), status: z.enum(['planning', 'active', 'on_hold', 'completed', 'cancelled']).optional(), priority: z.enum(['critical', 'high', 'medium', 'low']).optional(), owner_id: z.string().uuid().optional(), start_date: z.string().datetime().optional(), target_date: z.string().datetime().optional(), metadata: z.object({}).optional(), tags: z.array(z.string()).optional() })
  • MCPTool registration object defining the 'update_initiative' tool name, description, and JSON input schema for the MCP protocol.
    export const updateInitiativeTool: MCPTool = { name: 'update_initiative', description: 'Update initiative details', inputSchema: { type: 'object', properties: { initiative_id: { type: 'string', format: 'uuid', description: 'The unique identifier of the initiative to update' }, name: { type: 'string', minLength: 1, maxLength: 255, description: 'New name for the initiative' }, objective: { type: 'string', minLength: 1, description: 'New objective' }, description: { type: 'string', description: 'New description' }, status: { type: 'string', enum: ['planning', 'active', 'on_hold', 'completed', 'cancelled'], description: 'New status' }, priority: { type: 'string', enum: ['critical', 'high', 'medium', 'low'], description: 'New priority' }, owner_id: { type: 'string', format: 'uuid', description: 'New owner ID' }, start_date: { type: 'string', format: 'date-time', description: 'New start date' }, target_date: { type: 'string', format: 'date-time', description: 'New target date' }, metadata: { type: 'object', description: 'New metadata' }, tags: { type: 'array', items: { type: 'string' }, description: 'New tags' } }, required: ['initiative_id'] } }
  • Maps the tool name 'update_initiative' to its handler function within the initiativeHandlers object, which is imported and spread into the main MCP server handlers.
    export const initiativeHandlers = { list_initiatives: listInitiatives, get_initiative: getInitiative, create_initiative: createInitiative, update_initiative: updateInitiative, get_initiative_context: getInitiativeContext, get_initiative_insights: getInitiativeInsights, search_workspace: searchWorkspace, get_enhanced_project_context: getEnhancedProjectContext, get_workspace_context: getWorkspaceContext, associate_document_with_initiative: associateDocumentWithInitiative, disassociate_document_from_initiative: disassociateDocumentFromInitiative }
  • src/index.ts:143-155 (registration)
    Top-level MCP server registration where initiativeHandlers (including update_initiative) are spread into the allHandlers object used for tool dispatching.
    this.allHandlers = { ...projectHandlers, ...taskHandlers, ...documentHandlers, ...conversationHandlers, ...contextAggregationHandlers, ...workflowAutomationHandlers, ...intelligentSearchHandlers, ...analyticsInsightsHandlers, ...initiativeHandlers, ...promptToProjectTools.reduce((acc, tool) => ({ ...acc, [tool.name]: tool.handler }), {}), ...debugHandlers, }

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