Skip to main content
Glama
jakedx6

Helios-9 MCP Server

by jakedx6

get_project_context

Retrieve project context including statistics, activity, and team details to provide AI systems with comprehensive project understanding for informed decision-making.

Instructions

Get comprehensive project context including statistics, recent activity, and team information for AI understanding

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idYesThe unique identifier of the project

Implementation Reference

  • The main handler function for the 'get_project_context' MCP tool. Validates input using GetProjectSchema, fetches comprehensive project context from supabaseService, generates an AI-friendly summary with recommendations, and returns the enhanced context.
    export const getProjectContext = requireAuth(async (args: any) => {
      const { project_id } = GetProjectSchema.parse(args)
      
      logger.info('Getting project context for AI', { project_id })
      
      const context = await supabaseService.getProjectContext(project_id)
      
      // Add AI-friendly summary
      const aiSummary = {
        project_overview: `${context.project.name}: ${context.project.description || 'No description provided'}`,
        current_status: context.project.status,
        activity_level: context.statistics.total_documents + context.statistics.total_tasks > 10 ? 'high' : 'moderate',
        documentation_maturity: context.statistics.total_documents > 5 ? 'mature' : 'developing',
        task_distribution: context.statistics.task_status,
        recent_changes: context.recent_documents.length + context.recent_tasks.length,
        ai_recommendations: generateAIRecommendations(context)
      }
      
      return {
        ...context,
        ai_summary: aiSummary
      }
    })
  • The MCPTool object defining the 'get_project_context' tool, including its name, description, and input schema requiring a project_id (UUID).
    export const getProjectContextTool: MCPTool = {
      name: 'get_project_context',
      description: 'Get comprehensive project context including statistics, recent activity, and team information for AI understanding',
      inputSchema: {
        type: 'object',
        properties: {
          project_id: {
            type: 'string',
            format: 'uuid',
            description: 'The unique identifier of the project'
          }
        },
        required: ['project_id']
      }
    }
  • Registration of all project-related handlers, mapping 'get_project_context' to the getProjectContext handler function for use in the MCP system.
    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 tool definitions (MCPTool objects), including getProjectContextTool for registration in the tool system.
    export const projectTools = {
      listProjectsTool,
      getProjectTool,
      createProjectTool,
      updateProjectTool,
      getProjectContextTool,
      archiveProjectTool,
      duplicateProjectTool,
      getProjectTimelineTool,
      bulkUpdateProjectsTool
  • Helper function used by the handler to generate AI recommendations based on project statistics, task distribution, and recent activity.
    function generateAIRecommendations(context: any): string[] {
      const recommendations: string[] = []
      
      if (context.statistics.total_documents === 0) {
        recommendations.push('Consider creating project documentation to help team members understand the project goals and requirements')
      }
      
      if (context.statistics.total_tasks === 0) {
        recommendations.push('Break down the project into specific tasks to track progress and assign work')
      }
      
      const todoTasks = context.statistics.task_status.todo || 0
      const inProgressTasks = context.statistics.task_status.in_progress || 0
      
      if (inProgressTasks > todoTasks * 2) {
        recommendations.push('Consider focusing on completing in-progress tasks before starting new ones')
      }
      
      if (!context.statistics.document_types.other) {
        recommendations.push('Add a README document to provide project overview and setup instructions')
      }
      
      if (context.recent_documents.length === 0 && context.recent_tasks.length === 0) {
        recommendations.push('Project appears inactive - consider reviewing and updating project status')
      }
      
      return recommendations
    }

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