Skip to main content
Glama
jakedx6
by jakedx6

get_project_context

Retrieve project statistics, recent activity, and team details to provide AI systems with comprehensive project context 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 primary execution handler for the 'get_project_context' tool. Validates project_id input, fetches comprehensive project context from the Supabase service, generates an AI-friendly summary and recommendations, and returns enhanced context data.
    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 } })
  • Tool metadata definition including name, description, and input schema (requiring project_id as 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'] } }
  • src/index.ts:143-155 (registration)
    Central MCP server registration where projectHandlers (containing get_project_context) is spread into the allHandlers object used for tool execution.
    this.allHandlers = { ...projectHandlers, ...taskHandlers, ...documentHandlers, ...conversationHandlers, ...contextAggregationHandlers, ...workflowAutomationHandlers, ...intelligentSearchHandlers, ...analyticsInsightsHandlers, ...initiativeHandlers, ...promptToProjectTools.reduce((acc, tool) => ({ ...acc, [tool.name]: tool.handler }), {}), ...debugHandlers, }
  • Local registration/export of project tool handlers, mapping 'get_project_context' to the getProjectContext handler function.
    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 }
  • Helper function that generates AI recommendations based on project statistics and activity, used in the tool handler to enrich the context.
    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