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
          }
        }
      ]
    };
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions 'AI-powered analysis' but doesn't detail what that entails—such as whether it's a read-only operation, if it modifies data, requires specific permissions, has rate limits, or what the output format might be. For a tool with 8 parameters and no output schema, this lack of behavioral context is a significant gap, though it doesn't contradict any annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core action ('Perform detailed AI-powered analysis') and lists key outputs. There's no wasted verbiage, and it's appropriately sized for a high-level overview. However, it could be more structured by explicitly separating inputs from outputs or adding brief usage notes.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (8 parameters, no annotations, no output schema), the description is incomplete. It doesn't explain the tool's behavior, parameter roles, or expected outputs, leaving the agent with inadequate information to use it effectively. While it states the purpose clearly, the lack of guidance, transparency, and parameter details makes it insufficient for a tool of this nature.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the schema provides no parameter details. The description lists analysis aspects ('task complexity, effort estimation, risk assessment, actionable recommendations'), which loosely map to some parameters like 'includeBreakdown' or 'includeRisks', but it doesn't explain what each parameter means, their expected formats, or how they influence the analysis. With 8 parameters (6 required), this minimal compensation is insufficient.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with specific verbs ('perform detailed AI-powered analysis') and resources ('task complexity, effort estimation, risk assessment'), and it mentions providing 'actionable recommendations'. It distinguishes itself from most sibling tools, which focus on CRUD operations or specific project management tasks, by offering analytical capabilities. However, it doesn't explicitly differentiate from potential analytical siblings like 'enhance_prd' or 'generate_prd', which might also involve analysis.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites, such as needing task details or team context, or specify scenarios where this analysis is beneficial (e.g., during sprint planning or risk assessment phases). With many sibling tools for task and project management, the lack of usage context leaves the agent guessing about appropriate application.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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