Skip to main content
Glama
kunwarVivek

mcp-github-project-manager

add_feature

Add new features to GitHub projects by analyzing impact, expanding them into actionable tasks, and managing their complete lifecycle within PRDs.

Instructions

Add a new feature to an existing PRD or project, analyze its impact, and expand it into actionable tasks with complete lifecycle management

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
featureIdeaYes
descriptionYes
targetPRDNo
targetProjectNo
businessJustificationNo
targetUsersNo
requestedByYes
autoApproveYes
expandToTasksYes
createLifecycleYes

Implementation Reference

  • Main handler function that executes the add_feature tool logic. Creates feature lifecycle using FeatureManagementService and formats the response.
    async function executeAddFeature(args: AddFeatureArgs): Promise<MCPResponse> {
      const featureService = new FeatureManagementService();
    
      try {
        // For now, we'll create a simplified implementation
        // In a full implementation, you'd integrate with ResourceManager
    
        // Create complete feature lifecycle
        const result = await featureService.createCompleteFeatureLifecycle({
          featureIdea: args.featureIdea,
          description: args.description,
          targetPRD: undefined, // Would get from ResourceManager
          targetProject: args.targetProject,
          requestedBy: args.requestedBy,
          businessJustification: args.businessJustification,
          autoApprove: args.autoApprove
        });
    
        // Format response
        const summary = formatFeatureAdditionSummary(result);
    
        return ToolResultFormatter.formatSuccess('add_feature', {
          summary,
          featureRequest: result.featureRequest,
          tasksCreated: result.expansionResult?.tasks.length || 0,
          estimatedEffort: result.expansionResult?.estimatedEffort || 0
        });
    
      } catch (error) {
        process.stderr.write(`Error in add_feature tool: ${error}\n`);
        return ToolResultFormatter.formatSuccess('add_feature', {
          error: `Failed to add feature: ${error instanceof Error ? error.message : 'Unknown error'}`,
          success: false
        });
      }
    }
  • Zod schema defining input parameters for the add_feature tool.
    // Schema for add_feature tool
    const addFeatureSchema = z.object({
      featureIdea: z.string().min(10).describe('The feature idea or title'),
      description: z.string().min(20).describe('Detailed description of the feature'),
      targetPRD: z.string().optional().describe('ID of the PRD to add the feature to'),
      targetProject: z.string().optional().describe('GitHub project ID to add tasks to'),
      businessJustification: z.string().optional().describe('Business justification for the feature'),
      targetUsers: z.array(z.string()).optional().describe('Target user groups for this feature'),
      requestedBy: z.string().describe('Person requesting the feature'),
      autoApprove: z.boolean().default(false).describe('Whether to auto-approve the feature without manual review'),
      expandToTasks: z.boolean().default(true).describe('Whether to immediately expand the feature into tasks'),
      createLifecycle: z.boolean().default(true).describe('Whether to create complete task lifecycle management')
    });
  • src/index.ts:441-442 (registration)
    Dispatch/execution mapping in the main MCP server handler for the add_feature tool.
    case "add_feature":
      return await executeAddFeature(args);
  • Registration of the add_feature tool in the central ToolRegistry.
    this.registerTool(addFeatureTool);
  • Helper function that formats a comprehensive summary of the feature addition result, including analysis, tasks, and next steps.
    function formatFeatureAdditionSummary(result: any): string {
        const sections = [
          '# Feature Addition Complete',
          '',
          `## Feature: ${result.featureRequest.featureIdea}`,
          `**Status:** ${result.featureRequest.status}`,
          `**Requested by:** ${result.featureRequest.requestedBy}`,
          `**Created:** ${new Date(result.featureRequest.createdAt).toLocaleString()}`,
          ''
        ];
    
        // Analysis summary
        if (result.analysis) {
          sections.push(
            '## Analysis Summary',
            `**Recommendation:** ${result.analysis.recommendation}`,
            `**Priority:** ${result.analysis.priority}`,
            `**Complexity:** ${result.analysis.complexity}/10`,
            `**Estimated Effort:** ${result.analysis.estimatedEffort} hours`,
            ''
          );
    
          if (result.analysis.risks.length > 0) {
            sections.push(
              '**Key Risks:**',
              ...result.analysis.risks.map((risk: string) => `- ${risk}`),
              ''
            );
          }
        }
    
        // PRD update
        if (result.updatedPRD) {
          sections.push(
            '## PRD Updated',
            `**PRD:** ${result.updatedPRD.title}`,
            `**Version:** ${result.updatedPRD.version}`,
            `**Total Features:** ${result.updatedPRD.features.length}`,
            ''
          );
        }
    
        // Task breakdown
        if (result.expansionResult) {
          sections.push(
            '## Task Breakdown',
            `**Total Tasks:** ${result.expansionResult.tasks.length}`,
            `**Estimated Effort:** ${result.expansionResult.estimatedEffort} hours`,
            `**Risk Level:** ${result.expansionResult.riskAssessment.level}`,
            `**Suggested Milestone:** ${result.expansionResult.suggestedMilestone}`,
            ''
          );
    
          // Task summary by priority
          const tasksByPriority = result.expansionResult.tasks.reduce((acc: any, task: any) => {
            acc[task.priority] = (acc[task.priority] || 0) + 1;
            return acc;
          }, {});
    
          sections.push(
            '**Tasks by Priority:**',
            ...Object.entries(tasksByPriority).map(([priority, count]) =>
              `- ${priority}: ${count} tasks`
            ),
            ''
          );
    
          // High-priority tasks
          const highPriorityTasks = result.expansionResult.tasks
            .filter((task: any) => task.priority === 'critical' || task.priority === 'high')
            .slice(0, 5);
    
          if (highPriorityTasks.length > 0) {
            sections.push(
              '**High-Priority Tasks:**',
              ...highPriorityTasks.map((task: any) =>
                `- ${task.title} (${task.complexity}/10, ${task.estimatedHours}h)`
              ),
              ''
            );
          }
        }
    
        // Lifecycle management
        if (result.lifecycleStates) {
          sections.push(
            '## Lifecycle Management',
            `**Tasks with Lifecycle Tracking:** ${result.lifecycleStates.length}`,
            `**Current Phase:** Planning (all tasks start in planning phase)`,
            ''
          );
        }
    
        // Roadmap update
        if (result.roadmapUpdate) {
          sections.push(
            '## Roadmap Impact',
            `**Project:** ${result.roadmapUpdate.projectId}`,
            `**Planned Features:** ${result.roadmapUpdate.features.planned.length}`,
            ''
          );
        }
    
        // Next steps
        sections.push(
          '## Next Steps',
          '1. Review the generated tasks and adjust priorities if needed',
          '2. Assign tasks to team members',
          '3. Start with planning phase for high-priority tasks',
          '4. Use `get_next_task` to get recommendations for what to work on first',
          '5. Use `update_task_lifecycle` to track progress through phases',
          ''
        );
    
        // Related commands
        sections.push(
          '## Related Commands',
          '- `get_next_task` - Get next recommended task to work on',
          '- `update_task_lifecycle` - Update task progress and phase',
          '- `expand_task` - Further break down complex tasks',
          '- `analyze_task_complexity` - Get detailed complexity analysis',
          '- `list_ai_tasks` - View all tasks for this feature'
        );
    
        return sections.join('\n');
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It implies a complex write operation ('add', 'analyze', 'expand', 'manage lifecycle') but doesn't specify permissions needed, whether changes are reversible, rate limits, or what the output looks like. The description is vague on implementation details, leaving critical behavioral traits unclear.

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

Conciseness3/5

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

The description is a single run-on sentence that packs multiple actions ('add', 'analyze', 'expand', 'manage'), making it somewhat dense but not excessively verbose. It could be more structured by separating distinct phases, but it avoids unnecessary fluff and gets straight to the point.

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 (10 parameters, 6 required, no output schema, no annotations), the description is inadequate. It outlines high-level functionality but lacks details on parameter usage, behavioral constraints, output format, and differentiation from siblings. For a tool with such a broad scope and many inputs, more comprehensive guidance is needed.

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 description must compensate for all 10 parameters. It mentions 'feature', 'PRD or project', 'impact analysis', 'actionable tasks', and 'lifecycle management', which loosely map to some parameters like 'featureIdea' and 'targetPRD', but fails to explain the purpose or format of most parameters (e.g., 'autoApprove', 'expandToTasks', 'createLifecycle'), leaving significant gaps in understanding.

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: 'Add a new feature to an existing PRD or project, analyze its impact, and expand it into actionable tasks with complete lifecycle management.' It specifies the verb ('add'), resource ('feature'), and scope ('PRD or project'), though it doesn't explicitly differentiate from siblings like 'enhance_prd' or 'expand_task'.

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 (e.g., needing an existing PRD/project), exclusions, or comparisons to sibling tools like 'enhance_prd' or 'create_issue', leaving the agent without contextual usage direction.

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