get_enhanced_project_context
Retrieve comprehensive project context and all associated initiatives by providing a project ID, enabling AI agents to access structured project management data through the Helios-9 MCP Server.
Instructions
Get project context including all initiatives
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_id | Yes | The unique identifier of the project |
Implementation Reference
- src/tools/initiatives.ts:495-503 (handler)The handler function that executes the tool logic: validates project_id input, logs the action, fetches enhanced project context via supabaseService, and returns it.export const getEnhancedProjectContext = requireAuth(async (args: any) => { const { project_id } = z.object({ project_id: z.string().uuid() }).parse(args) logger.info('Getting enhanced project context', { project_id }) const context = await supabaseService.getEnhancedProjectContext(project_id) return { context } })
- src/tools/initiatives.ts:479-493 (schema)MCPTool schema definition specifying the tool name, description, and input schema requiring a project_id UUID.export const getEnhancedProjectContextTool: MCPTool = { name: 'get_enhanced_project_context', description: 'Get project context including all initiatives', inputSchema: { type: 'object', properties: { project_id: { type: 'string', format: 'uuid', description: 'The unique identifier of the project' } }, required: ['project_id'] } }
- src/tools/initiatives.ts:630-642 (registration)Registration of the tool handler in the initiativeHandlers export object, mapping 'get_enhanced_project_context' to its handler function.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/tools/initiatives.ts:616-628 (registration)Inclusion of the tool definition in the initiativeTools export object for likely use in tool registration elsewhere.export const initiativeTools = { listInitiativesTool, getInitiativeTool, createInitiativeTool, updateInitiativeTool, getInitiativeContextTool, getInitiativeInsightsTool, searchWorkspaceTool, getEnhancedProjectContextTool, getWorkspaceContextTool, associateDocumentWithInitiativeTool, disassociateDocumentFromInitiativeTool }
- src/lib/api-client.ts:593-596 (helper)Supporting service method in supabaseService (api-client) that the tool handler calls to fetch the enhanced project context from the backend API.async getEnhancedProjectContext(projectId: string): Promise<any> { const response = await this.request<{ context: any }>(`/api/mcp/projects/${projectId}/context-enhanced`) return response.context }