Skip to main content
Glama

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
NameRequiredDescriptionDefault
specYesThe specification document to review
focusAreasNoSpecific areas to focus the review on

Implementation Reference

  • 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}`;
      }
    }
  • 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)
    );
  • TypeScript interface defining the input shape for review_spec tool arguments.
    export interface SpecReviewOptions {
      spec: string;
      focusAreas?: string[];
    }
  • 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'),
    },
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 reviewing for 'completeness' and providing 'critical feedback', but lacks details on what the feedback entails (e.g., format, depth), whether it's a read-only operation, or any constraints like rate limits or permissions needed.

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, efficient sentence that is front-loaded with the core action and outcome. It wastes no words and clearly communicates the tool's function without unnecessary elaboration.

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 moderate complexity (2 parameters, no output schema, no annotations), the description is adequate but incomplete. It covers the basic purpose but lacks details on behavioral traits, usage context, and output expectations, leaving gaps for the agent to navigate.

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?

Schema description coverage is 100%, so the schema already documents both parameters ('spec' and 'focusAreas') adequately. The description adds minimal value beyond the schema by implying the 'spec' is reviewed for completeness and feedback, but doesn't provide additional syntax or format details for parameters.

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 with a specific verb ('review') and resource ('specification'), and it indicates the outcome ('provide critical feedback'). However, it doesn't explicitly differentiate from sibling tools like 'review_code' or 'run_linter', which might also involve reviewing documents or code for quality.

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 'review_code' (for code reviews) or 'generate_spec' (for creating specifications), leaving the agent to infer usage context without explicit 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/jaggederest/mcp_reviewer'

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