review_spec
Analyze specification documents for completeness and provide critical feedback to identify gaps and improve quality.
Instructions
Review a specification for completeness and provide critical feedback
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| spec | Yes | The specification document to review | |
| focusAreas | No | Specific areas to focus the review on |
Implementation Reference
- src/tools/reviewSpec.ts:5-29 (handler)ReviewSpecTool class implementing the core AI-based specification review logic, including specialized system and user prompts.class ReviewSpecTool extends BaseAITool<SpecReviewOptions> { protected getActionName(): string { return 'reviewing specification'; } protected getSystemPrompt(args: SpecReviewOptions): string { const { focusAreas = [] } = args; return `You are a critical technical reviewer specializing in specification analysis. Review the provided specification and provide constructive, critical feedback. Focus on: - Completeness and clarity of requirements - Technical feasibility and architectural soundness - Missing edge cases or error scenarios - Ambiguities that could lead to implementation issues - Security and performance considerations - Testability and success criteria clarity ${focusAreas.length > 0 ? `\nPay special attention to these areas: ${focusAreas.join(', ')}` : ''} Be direct and specific in your feedback. Point out both strengths and weaknesses.`; } protected getUserPrompt(args: SpecReviewOptions): string { const { spec } = args; return `Review this specification:\n\n${spec}`; } }
- src/tools/reviewSpec.ts:31-35 (handler)Exported reviewSpec function that creates ReviewSpecTool instance and executes the tool.const tool = new ReviewSpecTool(); export async function reviewSpec(args: SpecReviewOptions): Promise<CallToolResult> { return tool.execute(args); }
- src/index.ts:43-54 (registration)Registration of the 'review_spec' MCP tool, specifying name, description, Zod input schema, and handler function.// Register review_spec tool server.registerTool( 'review_spec', { description: 'Review a specification for completeness and provide critical feedback', inputSchema: { spec: z.string().describe('The specification document to review'), focusAreas: z.array(z.string()).optional().describe('Specific areas to focus the review on'), }, }, async (args) => reviewSpec(args) );
- src/types/index.ts:39-42 (schema)TypeScript interface defining the input shape for review_spec tool arguments.export interface SpecReviewOptions { spec: string; focusAreas?: string[]; }
- src/index.ts:48-51 (schema)Zod schema for runtime validation of review_spec tool inputs.inputSchema: { spec: z.string().describe('The specification document to review'), focusAreas: z.array(z.string()).optional().describe('Specific areas to focus the review on'), },