Skip to main content
Glama

generate_prd

Read-onlyIdempotent

Create structured product requirements documents by defining product vision, target audience, business goals, functional requirements, and constraints.

Instructions

PRD|요구사항 문서|제품 요구사항|product requirements|requirements document|spec document - Generate Product Requirements Document

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
productNameYesName of the product/feature
productVisionYesHigh-level vision and goals
targetAudienceNoTarget users and stakeholders
businessObjectivesNoBusiness goals and success metrics
functionalRequirementsNoKey features and functionality
constraintsNoTechnical/business constraints

Implementation Reference

  • The main execution function for the 'generate_prd' tool. It takes input arguments, constructs a comprehensive Product Requirements Document (PRD) structure, formats it as Markdown, and returns it as a ToolResult.
    export async function generatePrd(args: {
      productName: string;
      productVision: string;
      targetAudience?: string;
      businessObjectives?: string;
      functionalRequirements?: string;
      constraints?: string;
    }): Promise<ToolResult> {
      const {
        productName,
        productVision,
        targetAudience = 'General users',
        businessObjectives = 'Improve user experience and business value',
        functionalRequirements = 'Core functionality to be defined',
        constraints = 'Standard technical and budget constraints'
      } = args;
    
      const prd = {
        action: 'generate_prd',
        product: productName,
        document: {
          title: `Product Requirements Document: ${productName}`,
          version: '1.0',
          date: new Date().toISOString().split('T')[0],
          sections: {
            executiveSummary: {
              title: 'Executive Summary',
              content: `${productName} is designed to ${productVision}. This document outlines the requirements, scope, and implementation strategy for delivering value to ${targetAudience}.`
            },
            productOverview: {
              title: 'Product Overview',
              vision: productVision,
              objectives: businessObjectives,
              targetUsers: targetAudience,
              successMetrics: [
                'User adoption rate',
                'Feature usage metrics',
                'User satisfaction score',
                'Business impact measurement'
              ]
            },
            functionalRequirements: {
              title: 'Functional Requirements',
              description: functionalRequirements,
              coreFeatures: [
                'User authentication and management',
                'Core functionality implementation',
                'Data processing and storage',
                'User interface and experience',
                'Integration capabilities'
              ],
              userFlows: [
                'User onboarding process',
                'Main feature usage flow',
                'Error handling and recovery',
                'Administrative functions'
              ]
            },
            nonFunctionalRequirements: {
              title: 'Non-Functional Requirements',
              performance: 'Fast response times (<2s), high availability (99.9%)',
              security: 'Data encryption, secure authentication, privacy compliance',
              scalability: 'Support growing user base and data volume',
              usability: 'Intuitive interface, accessibility standards',
              compatibility: 'Cross-platform support, browser compatibility'
            },
            constraints: {
              title: 'Constraints and Assumptions',
              technical: constraints,
              timeline: 'Development timeline to be defined based on scope',
              budget: 'Budget allocation for development and infrastructure',
              resources: 'Team capacity and skill requirements'
            },
            implementationPlan: {
              title: 'Implementation Strategy',
              phases: [
                'Phase 1: Core functionality development',
                'Phase 2: Advanced features and integrations',
                'Phase 3: Performance optimization and scaling',
                'Phase 4: Launch and post-launch improvements'
              ],
              riskMitigation: [
                'Technical risk assessment and mitigation',
                'Resource and timeline risk management',
                'Market and user acceptance risks',
                'Compliance and security considerations'
              ]
            }
          }
        },
        recommendations: [
          'Conduct user research to validate assumptions',
          'Create detailed wireframes and prototypes',
          'Define detailed acceptance criteria for each feature',
          'Set up monitoring and analytics for success metrics',
          'Plan for iterative development and feedback loops'
        ],
        status: 'success'
      };
    
      const formattedPrd = `# ${prd.document.title}
    
    **Version:** ${prd.document.version}  
    **Date:** ${prd.document.date}
    
    ## ${prd.document.sections.executiveSummary.title}
    ${prd.document.sections.executiveSummary.content}
    
    ## ${prd.document.sections.productOverview.title}
    **Vision:** ${prd.document.sections.productOverview.vision}
    **Objectives:** ${prd.document.sections.productOverview.objectives}
    **Target Users:** ${prd.document.sections.productOverview.targetUsers}
    
    **Success Metrics:**
    ${prd.document.sections.productOverview.successMetrics.map(metric => `- ${metric}`).join('\n')}
    
    ## ${prd.document.sections.functionalRequirements.title}
    ${prd.document.sections.functionalRequirements.description}
    
    **Core Features:**
    ${prd.document.sections.functionalRequirements.coreFeatures.map(feature => `- ${feature}`).join('\n')}
    
    **User Flows:**
    ${prd.document.sections.functionalRequirements.userFlows.map(flow => `- ${flow}`).join('\n')}
    
    ## ${prd.document.sections.nonFunctionalRequirements.title}
    - **Performance:** ${prd.document.sections.nonFunctionalRequirements.performance}
    - **Security:** ${prd.document.sections.nonFunctionalRequirements.security}
    - **Scalability:** ${prd.document.sections.nonFunctionalRequirements.scalability}
    - **Usability:** ${prd.document.sections.nonFunctionalRequirements.usability}
    - **Compatibility:** ${prd.document.sections.nonFunctionalRequirements.compatibility}
    
    ## ${prd.document.sections.constraints.title}
    - **Technical:** ${prd.document.sections.constraints.technical}
    - **Timeline:** ${prd.document.sections.constraints.timeline}
    - **Budget:** ${prd.document.sections.constraints.budget}
    - **Resources:** ${prd.document.sections.constraints.resources}
    
    ## ${prd.document.sections.implementationPlan.title}
    **Development Phases:**
    ${prd.document.sections.implementationPlan.phases.map(phase => `- ${phase}`).join('\n')}
    
    **Risk Mitigation:**
    ${prd.document.sections.implementationPlan.riskMitigation.map(risk => `- ${risk}`).join('\n')}
    
    ## Recommendations
    ${prd.recommendations.map(rec => `- ${rec}`).join('\n')}`;
    
      return {
        content: [{ type: 'text', text: formattedPrd }]
      };
    }
  • The ToolDefinition for 'generate_prd', including name, description, input schema with properties and required fields, and annotations.
    export const generatePrdDefinition: ToolDefinition = {
      name: 'generate_prd',
      description: 'PRD|요구사항 문서|제품 요구사항|product requirements|requirements document|spec document - Generate Product Requirements Document',
      inputSchema: {
        type: 'object',
        properties: {
          productName: { type: 'string', description: 'Name of the product/feature' },
          productVision: { type: 'string', description: 'High-level vision and goals' },
          targetAudience: { type: 'string', description: 'Target users and stakeholders' },
          businessObjectives: { type: 'string', description: 'Business goals and success metrics' },
          functionalRequirements: { type: 'string', description: 'Key features and functionality' },
          constraints: { type: 'string', description: 'Technical/business constraints' }
        },
        required: ['productName', 'productVision']
      },
      annotations: {
        title: 'Generate PRD',
        audience: ['user', 'assistant'],
        readOnlyHint: true,
        destructiveHint: false,
        idempotentHint: true,
        openWorldHint: false
      }
    };
  • src/index.ts:197-197 (registration)
    Registration of the generatePrd handler in the toolHandlers object map, associating the tool name 'generate_prd' with its execution function.
    'generate_prd': generatePrd,
  • src/index.ts:130-130 (registration)
    Inclusion of the generatePrdDefinition in the tools array, which is used to list available tools via ListToolsRequest.
    generatePrdDefinition,
  • src/index.ts:67-67 (registration)
    Import statement bringing in the generatePrdDefinition and generatePrd handler from the implementation file.
    import { generatePrdDefinition, generatePrd } from './tools/planning/generatePrd.js';
Behavior3/5

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

Annotations already indicate this is a read-only, non-destructive, idempotent operation with a closed-world scope. The description adds no behavioral context beyond these annotations, such as rate limits, authentication needs, or output format details. No contradiction exists, but minimal value is added.

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 line listing synonyms for PRD generation. It's appropriately sized and front-loaded, though it could be slightly more structured by separating synonyms with commas or clarifying the core action.

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

Completeness3/5

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

Given the tool's complexity (6 parameters, no output schema) and rich annotations, the description is minimally adequate. It states the purpose but lacks details on output format, error handling, or integration with sibling tools, leaving gaps for an agent to infer usage.

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

Parameters3/5

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

With 100% schema description coverage, the input schema fully documents all 6 parameters. The description adds no additional meaning, examples, or constraints beyond what the schema provides, meeting the baseline for high coverage without enhancement.

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 generates a Product Requirements Document with specific synonyms (PRD, 요구사항 문서, 제품 요구사항, etc.), making the purpose evident. However, it doesn't explicitly differentiate from sibling tools like 'analyze_requirements' or 'create_user_stories', which could have overlapping domains.

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 like 'analyze_requirements' or 'create_user_stories'. It lacks context about prerequisites, timing, or exclusions, leaving the agent with minimal 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/su-record/hi-ai'

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