get_initiative_insights
Analyze an initiative to receive AI-generated insights and actionable recommendations for improving project outcomes.
Instructions
Get AI-powered insights and recommendations for an initiative
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| initiative_id | Yes | The unique identifier of the initiative |
Implementation Reference
- src/tools/initiatives.ts:384-398 (registration)Registration of the 'get_initiative_insights' tool with name, description, and inputSchema requiring a UUID initiative_id.
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'] } } - src/tools/initiatives.ts:22-24 (schema)Input validation schema (GetInitiativeSchema) using Zod, requiring initiative_id as a UUID string.
const GetInitiativeSchema = z.object({ initiative_id: z.string().uuid() }) - src/tools/initiatives.ts:400-408 (handler)Handler function for get_initiative_insights: wrapped with requireAuth, parses args with GetInitiativeSchema, calls supabaseService.getInitiativeInsights(), and returns the 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 } }) - src/lib/api-client.ts:548-551 (helper)API client method getInitiativeInsights that makes a GET request to /api/mcp/initiatives/{initiativeId}/insights and returns the insights data.
async getInitiativeInsights(initiativeId: string): Promise<any> { const response = await this.request<{ insights: any }>(`/api/mcp/initiatives/${initiativeId}/insights`) return response.insights } - src/tools/initiatives.ts:630-637 (registration)Mapping of 'get_initiative_insights' to the getInitiativeInsights handler in the initiativeHandlers export.
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,