Skip to main content
Glama
jakedx6
by jakedx6

get_initiative_insights

Analyze initiatives using AI to generate actionable insights and recommendations for project management decisions.

Instructions

Get AI-powered insights and recommendations for an initiative

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
initiative_idYesThe unique identifier of the initiative

Implementation Reference

  • Primary handler function for the 'get_initiative_insights' MCP tool. Validates input with Zod schema, logs the action, calls the supabaseService API, and returns insights.
    export const getInitiativeInsights = requireAuth(async (args: any) => { const { initiative_id } = GetInitiativeSchema.parse(args) logger.info('Getting initiative insights', { initiative_id }) const insights = await supabaseService.getInitiativeInsights(initiative_id) return { insights } })
  • MCPTool registration definition, including the tool name, description, and JSON schema for input validation (initiative_id as UUID).
    export const getInitiativeInsightsTool: MCPTool = { name: 'get_initiative_insights', description: 'Get AI-powered insights and recommendations for an initiative', inputSchema: { type: 'object', properties: { initiative_id: { type: 'string', format: 'uuid', description: 'The unique identifier of the initiative' } }, required: ['initiative_id'] } }
  • Zod runtime validation schema for tool input, ensuring initiative_id is a valid UUID. Used in the handler for parsing args.
    const GetInitiativeSchema = z.object({ initiative_id: z.string().uuid() })
  • API client service method (supabaseService.getInitiativeInsights) called by the tool handler. Performs HTTP request to backend /insights endpoint.
    async getInitiativeInsights(initiativeId: string): Promise<any> { const response = await this.request<{ insights: any }>(`/api/mcp/initiatives/${initiativeId}/insights`) return response.insights }
  • Registration of the handler function in the initiativeHandlers object, mapping tool name to its executor for central tool dispatching.
    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 }

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