Skip to main content
Glama
kunwarVivek

mcp-github-project-manager

generate_prd

Create comprehensive Product Requirements Documents (PRDs) from project ideas using AI analysis and industry best practices to define requirements clearly.

Instructions

Generate a comprehensive Product Requirements Document (PRD) from a project idea using AI analysis and industry best practices

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectIdeaYes
projectNameYes
targetUsersNo
timelineNo
complexityYes
authorYes
stakeholdersNo
includeResearchYes
industryContextNo

Implementation Reference

  • Main handler function that executes the generate_prd tool logic, calling PRDGenerationService and formatting the response.
    async function executeGeneratePRD(args: GeneratePRDArgs): Promise<MCPResponse> {
      const prdService = new PRDGenerationService();
    
      try {
        // Generate comprehensive PRD from project idea
        const prd = await prdService.generatePRDFromIdea({
          projectIdea: args.projectIdea,
          projectName: args.projectName,
          targetUsers: args.targetUsers,
          timeline: args.timeline,
          complexity: args.complexity,
          author: args.author,
          stakeholders: args.stakeholders
        });
    
        // Validate PRD completeness
        const validation = await prdService.validatePRDCompleteness(prd);
    
        // Format response
        const summary = formatPRDGenerationSummary(prd, validation);
    
        return ToolResultFormatter.formatSuccess('generate_prd', {
          summary,
          prd,
          validation,
          completenessScore: validation.score,
          isComplete: validation.isComplete
        });
    
      } catch (error) {
        process.stderr.write(`Error in generate_prd tool: ${error}\n`);
    
        // Check if this is an AI availability error
        const errorMessage = error instanceof Error ? error.message : 'Unknown error';
        const isAIUnavailable = errorMessage.includes('AI service is not available') ||
                               errorMessage.includes('API key') ||
                               errorMessage.includes('provider');
    
        if (isAIUnavailable) {
          const aiErrorSummary = formatAIUnavailableMessage('generate_prd', errorMessage);
          return ToolResultFormatter.formatSuccess('generate_prd', {
            content: [{ type: 'text', text: aiErrorSummary }],
            success: false,
            aiAvailable: false
          });
        }
    
        return ToolResultFormatter.formatSuccess('generate_prd', {
          content: [{
            type: 'text',
            text: `# Failed to generate PRD\n\n**Error:** ${errorMessage}\n\nPlease check your input parameters and try again.`
          }],
          success: false
        });
      }
    }
  • Zod schema defining input parameters for the generate_prd tool.
    const generatePRDSchema = z.object({
      projectIdea: z.string().min(20).describe('The project idea or concept to create a PRD for'),
      projectName: z.string().min(3).describe('Name of the project'),
      targetUsers: z.array(z.string()).optional().describe('Target user groups'),
      timeline: z.string().optional().describe('Expected project timeline (e.g., "3 months", "Q1 2024")'),
      complexity: z.enum(['low', 'medium', 'high']).default('medium').describe('Expected project complexity'),
      author: z.string().describe('Author of the PRD'),
      stakeholders: z.array(z.string()).optional().describe('Project stakeholders'),
      includeResearch: z.boolean().default(false).describe('Whether to include market research and competitive analysis'),
      industryContext: z.string().optional().describe('Industry or domain context for the project')
    });
  • Registration of the generatePRDTool in the central ToolRegistry during built-in tools initialization.
    this.registerTool(generatePRDTool);
  • MCP server dispatcher that routes 'generate_prd' tool calls to the executeGeneratePRD handler.
    case "generate_prd":
      return await executeGeneratePRD(args);
  • ToolDefinition export used for registration, including name, description, schema, and examples.
    export const generatePRDTool: ToolDefinition<GeneratePRDArgs> = {
      name: "generate_prd",
      description: "Generate a comprehensive Product Requirements Document (PRD) from a project idea using AI analysis and industry best practices",
      schema: generatePRDSchema as unknown as ToolSchema<GeneratePRDArgs>,
      examples: [
        {
          name: "Generate PRD for task management app",
          description: "Create a comprehensive PRD for a new task management application",
          args: {
            projectIdea: "A modern task management application with AI-powered prioritization, team collaboration features, and integration with popular development tools like GitHub and Slack",
            projectName: "TaskFlow AI",
            targetUsers: ["software developers", "project managers", "small teams"],
            timeline: "6 months",
            complexity: "medium",
            author: "product-team",
            stakeholders: ["engineering", "design", "marketing"],
            includeResearch: true,
            industryContext: "productivity software"
          }
        }
      ]
    };
    
    // Export the execution function for the tool registry
    export { executeGeneratePRD };
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 'using AI analysis and industry best practices,' which hints at generative behavior and external data usage, but doesn't specify details like output format, potential rate limits, authentication needs, or whether the generation is deterministic. For a tool with 9 parameters and no annotations, this leaves significant gaps in understanding how it behaves.

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

Conciseness5/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 purpose without unnecessary words. It's front-loaded with the main action and includes key details like 'comprehensive,' 'AI analysis,' and 'industry best practices,' making it easy to parse. Every part of the sentence earns its place.

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 (9 parameters, 5 required, no output schema, and no annotations), the description is incomplete. It doesn't explain parameters, output format, or behavioral traits, leaving the agent with insufficient information to use the tool effectively. The lack of annotations and output schema increases the burden on the description, which it doesn't meet.

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 9 parameters have descriptions in the schema. The tool description does not mention any parameters, failing to add meaning beyond the schema. Parameters like 'projectIdea', 'targetUsers', and 'includeResearch' are left unexplained, making it hard for an agent to understand what inputs are expected. This is inadequate given the low schema coverage.

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: 'Generate a comprehensive Product Requirements Document (PRD) from a project idea using AI analysis and industry best practices.' It specifies the verb ('Generate'), resource ('Product Requirements Document'), and method ('using AI analysis and industry best practices'), which is specific and actionable. However, it doesn't explicitly distinguish from sibling tools like 'enhance_prd' or 'parse_prd', which might handle similar PRD-related tasks, so it's not a perfect 5.

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 sibling tools like 'enhance_prd' (which might modify an existing PRD) or 'parse_prd' (which might analyze a PRD), nor does it specify prerequisites or contexts for usage. The agent must infer usage from the purpose alone, which is insufficient for 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