Skip to main content
Glama
kunwarVivek

mcp-github-project-manager

analyze_task_complexity

Analyze task complexity to estimate effort, assess risks, and generate actionable recommendations for GitHub project management.

Instructions

Perform detailed AI-powered analysis of task complexity, effort estimation, risk assessment, and provide actionable recommendations

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
taskTitleYes
taskDescriptionYes
currentEstimateNo
teamExperienceYes
projectContextNo
includeBreakdownYes
includeRisksYes
includeRecommendationsYes

Implementation Reference

  • Main handler function that executes the analyze_task_complexity tool logic, including task analysis, breakdown, risks, recommendations, and formatting the response.
    async function executeAnalyzeTaskComplexity(args: AnalyzeTaskComplexityArgs): Promise<MCPResponse> {
      const taskService = new TaskGenerationService();
    
      try {
        // Create a mock task for analysis
        const mockTask = {
          id: 'analysis-task',
          title: args.taskTitle,
          description: args.taskDescription,
          complexity: 5 as TaskComplexity, // Will be updated by analysis
          estimatedHours: args.currentEstimate || 0,
          priority: TaskPriority.MEDIUM,
          status: TaskStatus.PENDING,
          dependencies: [],
          acceptanceCriteria: [],
          tags: [],
          aiGenerated: false,
          subtasks: [],
          createdAt: new Date().toISOString(),
          updatedAt: new Date().toISOString()
        };
    
        // Perform complexity analysis
        const analysis = await taskService.analyzeTaskComplexity(mockTask);
    
        // Generate detailed breakdown
        const breakdown = generateEffortBreakdown(analysis.estimatedHours, args.teamExperience);
    
        // Assess risks
        const risks = args.includeRisks ? assessTaskRisks(args, analysis) : [];
    
        // Generate recommendations
        const recommendations = args.includeRecommendations ?
          generateTaskRecommendations(args, analysis, risks) : [];
    
        // Calculate confidence level
        const confidence = calculateConfidenceLevel(args, analysis);
    
        // Format response
        const summary = formatComplexityAnalysis(args, analysis, breakdown, risks, recommendations, confidence);
    
        return ToolResultFormatter.formatSuccess('analyze_task_complexity', {
          summary,
          analysis: {
            originalComplexity: mockTask.complexity,
            newComplexity: analysis.newComplexity,
            estimatedHours: analysis.estimatedHours,
            confidence,
            breakdown,
            risks,
            recommendations
          }
        });
    
      } catch (error) {
        process.stderr.write(`Error in analyze_task_complexity tool: ${error}\n`);
        return ToolResultFormatter.formatSuccess('analyze_task_complexity', {
          error: `Failed to analyze task complexity: ${error instanceof Error ? error.message : 'Unknown error'}`,
          success: false
        });
      }
    }
  • Zod input schema validation for the analyze_task_complexity tool parameters.
    // Schema for analyze_task_complexity tool
    const analyzeTaskComplexitySchema = z.object({
      taskTitle: z.string().min(3).describe('Title of the task to analyze'),
      taskDescription: z.string().min(10).describe('Detailed description of the task'),
      currentEstimate: z.number().optional().describe('Current effort estimate in hours (if any)'),
      teamExperience: z.enum(['junior', 'mid', 'senior', 'mixed']).default('mixed')
        .describe('Team experience level'),
      projectContext: z.string().optional().describe('Additional project context'),
      includeBreakdown: z.boolean().default(true).describe('Whether to include effort breakdown'),
      includeRisks: z.boolean().default(true).describe('Whether to include risk analysis'),
      includeRecommendations: z.boolean().default(true).describe('Whether to include recommendations')
    });
    
    export type AnalyzeTaskComplexityArgs = z.infer<typeof analyzeTaskComplexitySchema>;
  • Registration of the analyzeTaskComplexityTool in the central ToolRegistry.
    this.registerTool(analyzeTaskComplexityTool);
  • src/index.ts:453-454 (registration)
    Dispatch handler in main server that calls the executeAnalyzeTaskComplexity function for the tool.
    case "analyze_task_complexity":
      return await executeAnalyzeTaskComplexity(args);
  • Tool definition object including name, description, schema reference, and example usage.
    export const analyzeTaskComplexityTool: ToolDefinition<AnalyzeTaskComplexityArgs> = {
      name: "analyze_task_complexity",
      description: "Perform detailed AI-powered analysis of task complexity, effort estimation, risk assessment, and provide actionable recommendations",
      schema: analyzeTaskComplexitySchema as unknown as ToolSchema<AnalyzeTaskComplexityArgs>,
      examples: [
        {
          name: "Analyze complex feature task",
          description: "Analyze the complexity of implementing a new feature",
          args: {
            taskTitle: "Implement real-time chat system",
            taskDescription: "Build a WebSocket-based real-time chat system with message history, file sharing, user presence indicators, and message encryption",
            currentEstimate: 20,
            teamExperience: "mixed",
            projectContext: "Adding to existing React/Node.js application",
            includeBreakdown: true,
            includeRisks: true,
            includeRecommendations: true
          }
        }
      ]
    };
Install Server

Other Tools

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/kunwarVivek/mcp-github-project-manager'

If you have feedback or need assistance with the MCP directory API, please join our Discord server