Skip to main content
Glama
kunwarVivek

mcp-github-project-manager

expand_task

Break down complex GitHub project tasks into manageable subtasks with AI analysis, dependency detection, and implementation recommendations.

Instructions

Break down a complex task into smaller, manageable subtasks with AI-powered analysis, dependency detection, and implementation recommendations

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
taskTitleYes
taskDescriptionYes
currentComplexityYes
maxSubtasksYes
maxDepthYes
targetComplexityYes
includeEstimatesYes
includeDependenciesYes
includeAcceptanceCriteriaYes
projectTypeNo
teamSkillsNo

Implementation Reference

  • Main handler function that executes the expand_task tool logic: creates mock parent task, generates subtasks via TaskGenerationService, enhances with details/dependencies/metrics/recommendations, and formats comprehensive response.
    async function executeExpandTask(args: ExpandTaskArgs): Promise<MCPResponse> {
      const taskService = new TaskGenerationService();
    
      try {
        // Create a mock parent task
        const parentTask = {
          id: 'parent-task',
          title: args.taskTitle,
          description: args.taskDescription,
          complexity: args.currentComplexity as TaskComplexity,
          estimatedHours: args.currentComplexity * 4, // Simple estimation
          priority: TaskPriority.MEDIUM,
          status: TaskStatus.PENDING,
          dependencies: [],
          acceptanceCriteria: [],
          tags: [],
          aiGenerated: false,
          subtasks: [],
          createdAt: new Date().toISOString(),
          updatedAt: new Date().toISOString()
        };
    
        // Generate subtasks using AI
        const subtasks = await taskService.expandTaskIntoSubtasks({
          task: parentTask,
          maxDepth: args.maxDepth,
          autoEstimate: args.includeEstimates
        });
    
        // Enhance subtasks with additional details
        const enhancedSubtasks = enhanceSubtasks(subtasks, args);
    
        // Detect dependencies if requested
        const dependencies = args.includeDependencies ?
          detectSubtaskDependencies(enhancedSubtasks) : [];
    
        // Calculate metrics
        const metrics = calculateSubtaskMetrics(enhancedSubtasks, parentTask);
    
        // Generate recommendations
        const recommendations = generateSubtaskRecommendations(enhancedSubtasks, args, metrics);
    
        // Format response
        const summary = formatTaskExpansion(
          parentTask,
          enhancedSubtasks,
          dependencies,
          metrics,
          recommendations,
          args
        );
    
        return ToolResultFormatter.formatSuccess('expand_task', {
          summary,
          parentTask,
          subtasks: enhancedSubtasks,
          dependencies,
          metrics,
          recommendations
        });
    
      } catch (error) {
        process.stderr.write(`Error in expand_task tool: ${error}\n`);
        return ToolResultFormatter.formatSuccess('expand_task', {
          error: `Failed to expand task: ${error instanceof Error ? error.message : 'Unknown error'}`,
          success: false
        });
      }
    }
  • Zod schema defining input validation and types for expand_task tool parameters.
    const expandTaskSchema = z.object({
      taskTitle: z.string().min(3).describe('Title of the task to expand'),
      taskDescription: z.string().min(10).describe('Detailed description of the task'),
      currentComplexity: z.number().min(1).max(10).describe('Current complexity score of the task'),
      maxSubtasks: z.number().min(2).max(15).default(8).describe('Maximum number of subtasks to create'),
      maxDepth: z.number().min(1).max(3).default(2).describe('Maximum depth of subtask breakdown'),
      targetComplexity: z.number().min(1).max(5).default(3).describe('Target complexity for each subtask'),
      includeEstimates: z.boolean().default(true).describe('Whether to include effort estimates for subtasks'),
      includeDependencies: z.boolean().default(true).describe('Whether to identify dependencies between subtasks'),
      includeAcceptanceCriteria: z.boolean().default(true).describe('Whether to generate acceptance criteria for subtasks'),
      projectType: z.string().optional().describe('Type of project (web-app, mobile-app, api, etc.)'),
      teamSkills: z.array(z.string()).optional().describe('Team skills to consider for subtask assignment')
    });
  • Registration of the expandTaskTool in the central ToolRegistry singleton, making it available for list_tools and validation.
    this.registerTool(expandTaskTool);
  • Dispatcher switch case in main MCP server that routes expand_task calls to the executeExpandTask handler.
    case "expand_task":
      return await executeExpandTask(args);
  • Complete ToolDefinition export for expand_task, including name, description, schema reference, and usage example.
    export const expandTaskTool: ToolDefinition<ExpandTaskArgs> = {
      name: "expand_task",
      description: "Break down a complex task into smaller, manageable subtasks with AI-powered analysis, dependency detection, and implementation recommendations",
      schema: expandTaskSchema as unknown as ToolSchema<ExpandTaskArgs>,
      examples: [
        {
          name: "Expand complex feature task",
          description: "Break down a complex feature into manageable subtasks",
          args: {
            taskTitle: "Implement user dashboard",
            taskDescription: "Create a comprehensive user dashboard with analytics, settings, notifications, and profile management",
            currentComplexity: 8,
            maxSubtasks: 6,
            maxDepth: 2,
            targetComplexity: 3,
            includeEstimates: true,
            includeDependencies: true,
            includeAcceptanceCriteria: true,
            projectType: "web-app",
            teamSkills: ["react", "typescript", "node.js"]
          }
        }
      ]
    };
    
    // Export the execution function
    export { executeExpandTask };
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' and 'implementation recommendations', which hint at generative behavior, but doesn't detail output format, error handling, rate limits, or side effects. For a tool with 11 parameters and no output schema, this leaves significant gaps in understanding how the tool behaves and what it returns.

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, well-structured sentence that efficiently conveys the core functionality. It's front-loaded with the main purpose and adds key features without unnecessary elaboration. However, given the complexity of the tool (11 parameters, no annotations), it might benefit from slightly more detail to justify its brevity.

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?

For a tool with 11 parameters, 0% schema description coverage, no annotations, and no output schema, the description is insufficient. It doesn't explain parameter semantics, output format, or behavioral constraints. While it clearly states the purpose, it lacks the depth needed for an agent to confidently use this tool in context with its many siblings in project management workflows.

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%, meaning none of the 11 parameters have descriptions in the schema. The tool description doesn't mention any parameters or explain their meanings (e.g., what 'currentComplexity' vs 'targetComplexity' represent, how 'maxSubtasks' works). This forces the agent to guess parameter purposes based solely on property names, which is inadequate for effective tool invocation.

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: 'Break down a complex task into smaller, manageable subtasks with AI-powered analysis, dependency detection, and implementation recommendations.' It specifies the verb ('break down'), resource ('complex task'), and key capabilities (analysis, dependency detection, recommendations). However, it doesn't explicitly differentiate from sibling tools like 'analyze_task_complexity' or 'plan_sprint', which might have overlapping functions.

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 mentions the tool's function but doesn't specify contexts, prerequisites, or exclusions. With many sibling tools in project management contexts (e.g., 'analyze_task_complexity', 'plan_sprint'), the lack of comparative guidance leaves the agent uncertain about optimal tool selection.

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