Skip to main content
Glama
ArthDh

code-reviewer-mcp

by ArthDh

Code Reviewer MCP Server

License: MIT Python 3.10+ MCP

An MCP (Model Context Protocol) server that performs automated code reviews based on customizable reviewer personas. Integrates seamlessly with Cursor IDE and other MCP-compatible tools.

Overview

This server provides automated code review capabilities by analyzing git diffs against configurable review standards. It supports custom reviewer personas, making it easy to enforce team-specific code quality standards.

Related MCP server: pr-mcp-server

Features

The server exposes 7 tools:

Tool

Description

get_branch_diff

Get git diff between current branch and base branch

get_changed_files

List files changed on current branch with stats

review_diff

Get diff with review context and persona standards

review_file

Review a specific file against standards

get_persona

View the active reviewer persona

get_review_checklist

Get the full review checklist

generate_review_report

Generate a markdown review report file

Custom Persona Support

All review tools accept a persona_file parameter to use a custom reviewer persona:

persona_file: "personas/example_persona.md"

Default locations (checked in order):

  1. personas/example_persona.md in the MCP server directory

  2. notebooks/code_reviewer_persona.md in your project root (for backward compatibility)

  3. Embedded default persona (if no file found)

Example persona: See personas/example_persona.md for a complete example of a reviewer persona.

Installation

Prerequisites

  • Python 3.10+

  • uv (recommended) or pip

Setup

  1. Install dependencies:

    cd code-reviewer-mcp
    uv sync  # or: pip install -r requirements.txt
  2. Set up the Cursor rule (optional but recommended):

    Copy the template rule to your project's .cursor/rules/ directory:

    mkdir -p .cursor/rules
    cp tools/code-reviewer-mcp/.cursor/rules/code-review.mdc.template .cursor/rules/code-review.mdc

    Then customize it for your project's review standards.

  3. Configure in Cursor by adding to ~/.cursor/mcp.json:

    {
      "mcpServers": {
        "code-reviewer": {
          "command": "uv",
          "args": [
            "--directory",
            "/path/to/code-reviewer-mcp",
            "run",
            "server.py"
          ]
        }
      }
    }

    Or if using pip:

    {
      "mcpServers": {
        "code-reviewer": {
          "command": "python",
          "args": [
            "/path/to/code-reviewer-mcp/server.py"
          ]
        }
      }
    }

Architecture

The code reviewer consists of two components:

  1. MCP Server (server.py): Provides the tools (get_branch_diff, review_diff, etc.)

  2. Cursor Rule (.cursor/rules/code-review.mdc): Provides workflow instructions and review standards

The MCP server is reusable across projects - it provides generic code review tools.
The Cursor rule is project-specific - it defines your team's review standards and workflow.

When you ask for a code review, the Cursor rule instructs the AI on:

  • Which MCP tools to call and in what order

  • What standards to check against

  • How to format the output

Usage in Cursor

Quick Start

  1. Restart Cursor after installation to load the new MCP server

  2. Ask Claude to review your code:

    • "Review my current branch"

    • "Review this PR against development"

    • "Check this file for issues"

Example Commands

Basic usage (uses default persona):

"Review the changes on my branch"
"Get the diff against development"
"Review src/my_module/file.py"
"Generate a code review report"

With custom persona (using @ reference):

"Review my code using @personas/example_persona.md"
"Review this file using the persona at @path/to/strict_reviewer.md"
"Generate a review report with @personas/example_persona.md"

The @file syntax in Cursor expands the file reference, making it easy to select different reviewer personas for different review styles.

Using the Cursor Rule

A Cursor rule at .cursor/rules/code-review.mdc automatically triggers the reviewer when you say "review", "code review", or "PR review".

What the rule does:

  • Provides step-by-step workflow instructions for using the MCP tools

  • Defines the review standards and checklist (type safety, documentation, etc.)

  • Specifies the output format for reviews

  • Handles persona file selection via @ syntax

For this project: The rule is located at .cursor/rules/code-review.mdc in the repo root.

For other projects: A template rule file is included at tools/code-reviewer-mcp/.cursor/rules/code-review.mdc.template. Copy it to your project's .cursor/rules/ directory and customize it for your team's standards.

The rule provides:

  • Workflow instructions: Step-by-step guide on how to use the MCP tools

  • Review standards: Checklist of what to check (can be customized per project)

  • Output format: Structure for review comments

  • Integration guidance: How to combine with Bitbucket MCP for PR comments

Persona Files

How Persona Selection Works

  1. Explicit selection: Pass persona_file parameter with the path

  2. Default locations (checked in order):

    • personas/example_persona.md in the MCP server directory

    • notebooks/code_reviewer_persona.md in your project root (for backward compatibility)

  3. Embedded fallback: Uses built-in persona if no file found

Example persona: See personas/example_persona.md for a complete example based on real code review patterns.

Creating a Custom Persona

Create a markdown file with your review standards. Example structure:

# Code Reviewer Persona: [Name]

## Review Philosophy
[Your approach to code review]

## Key Standards
### Type Safety
- [Your type checking rules]

### Documentation
- [Your documentation requirements]

### Code Style
- [Your style preferences]

## Common Callouts
- "Missing type hint" → Add type annotations
- "No tests" → Add test coverage

Switching Personas

You can have multiple persona files for different contexts. Store them in the personas/ directory:

  • personas/example_persona.md - Example persona (included with this repo)

  • personas/strict_reviewer.md - For production code (create your own)

  • personas/junior_friendly.md - Educational, more explanatory (create your own)

  • personas/security_focused.md - Emphasis on security patterns (create your own)

Start with personas/example_persona.md and customize it for your team's needs.

Default Review Standards

The embedded default persona checks for:

Type Safety

  • Complete type hints on all functions

  • Modern syntax (str | None over Optional)

  • No Any types without justification

Documentation

  • File headers with copyright

  • Complete docstrings with Args/Returns

Code Organization

  • Absolute imports only

  • Magic numbers as constants

  • Unused code removed

Error Handling

  • Specific exceptions only

  • Edge cases handled

Architecture

  • Layer separation maintained

  • Common logic in templates

Utilities

Export PR Comments

The utils/export_comments.py script helps export your Bitbucket PR comments to CSV for analysis or building training data for code review personas.

Usage:

# Set environment variables (recommended)
export ATLASSIAN_EMAIL="your-email@example.com"
export BITBUCKET_API_TOKEN="your-api-token"
export BITBUCKET_WORKSPACE="your-workspace"
export BITBUCKET_REPO_SLUG="your-repo"
export BITBUCKET_ACCOUNT_ID="your-account-id"  # Optional: filter to your comments only

# Export comments (from the code-reviewer-mcp directory)
python utils/export_comments.py

# Export only your comments (with account ID filter)
python utils/export_comments.py --account-id your-account-id

# Export all comments (no filter)
python utils/export_comments.py --account-id ""

# Or pass everything as arguments
python utils/export_comments.py \
  --email your-email@example.com \
  --token your-token \
  --workspace your-workspace \
  --repo your-repo \
  --output my_comments.csv \
  --account-id your-account-id

Note: This utility requires the requests library. Install with:

pip install requests
# or
uv add requests

Output: The script generates a CSV file with columns:

  • pr_id, pr_title, pr_url

  • comment_id, content

  • file_path, line (for inline comments)

  • created_on, updated_on

Development

Testing the Server

cd code-reviewer-mcp
uv run server.py

The server communicates via stdio, so you'll see it waiting for JSON-RPC messages.

Modifying the Persona

The reviewer persona is embedded in server.py in the REVIEWER_PERSONA constant. Update this to change review standards.

Limitations

  • No inline comments: Cursor doesn't have an API to programmatically add inline comments to files. The server outputs reviews with file:line references that you can navigate to.

  • Python-focused: Currently filters for *.py files by default. The file_filter parameter can be changed to include other file types.

Troubleshooting

Server not appearing in Cursor

  1. Check ~/.cursor/mcp.json has the correct path

  2. Restart Cursor completely (Cmd+Q on macOS)

  3. Check the MCP logs: ~/Library/Logs/Claude/mcp*.log

Git errors

Ensure you're in a git repository when using the diff-related tools. The server needs access to git commands.

Optional: Bitbucket Integration

For teams using Bitbucket, you can optionally configure the @lexmata/bitbucket-mcp server to enable programmatic PR comment creation. This allows you to post review comments directly to Bitbucket pull requests.

Setting up Bitbucket MCP

  1. Install the Bitbucket MCP server (if not already installed):

    npm install -g @lexmata/bitbucket-mcp
  2. Configure in ~/.cursor/mcp.json:

    {
      "mcpServers": {
        "code-reviewer": {
          "command": "uv",
          "args": ["--directory", "/path/to/code-reviewer-mcp", "run", "server.py"]
        },
        "bitbucket": {
          "command": "npx",
          "args": ["-y", "@lexmata/bitbucket-mcp"],
          "env": {
            "BITBUCKET_WORKSPACE": "your-workspace",
            "BITBUCKET_REPO_SLUG": "your-repo",
            "BITBUCKET_APP_PASSWORD": "your-app-password"
          }
        }
      }
    }
  3. Usage: Once configured, you can use Bitbucket MCP tools alongside the code reviewer:

    • Create PR comments programmatically

    • Fetch PR details

    • Post review feedback directly to Bitbucket

    Example workflow:

    1. Use code-reviewer tools to generate review feedback
    2. Use bitbucket-mcp tools to post comments to the PR

    Note: This integration is optional. The code reviewer works perfectly fine without it, generating review reports that you can manually copy to PR comments.

Available Tools

7 tools
generate_review_reportB

Generate a comprehensive code review report as a markdown file.

Args: base_branch: The base branch to compare against (default: development). output_file: Path to write the report (default: .code_review.md in repo root). working_directory: Working directory (defaults to current directory). persona_file: Path to a custom reviewer persona markdown file. Example: "notebooks/code_reviewer_persona.md" If not provided, uses the default persona.

Returns: Path to the generated report file and a summary.

ParametersJSON Schema
NameRequiredDescriptionDefault
base_branchNodevelopment
output_fileNo
persona_fileNo
working_directoryNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does disclose some behavior: defaults for every parameter, the persona fallback, and the return shape (path + summary). It does not state whether an existing output file is overwritten, what permissions or repo state are required, or that this performs file-system writes — meaningful gaps for a side-effecting tool.

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?

Front-loads the one-line purpose, then uses Args/Returns blocks, which matches how the schema is organized. Slightly verbose in the persona_file entry but every line carries information; no filler.

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

Completeness4/5

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

Covers all parameters and the return value, and an output schema exists so return detail is not strictly required. The remaining gap is workflow placement — when to run this relative to the review_* siblings — for an agent orchestrating a multi-step review.

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

Parameters4/5

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

Schema coverage is 0%, so the description must compensate, and it largely does: all four parameters are explained with defaults (base_branch=development, output_file=.code_review.md) plus a concrete persona_file example path. Minor gaps remain, e.g., accepted formats for output_file and relative-vs-absolute path handling.

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?

States a specific verb and artifact: 'Generate a comprehensive code review report as a markdown file.' That distinguishes it from siblings like review_diff and review_file, which analyze rather than produce a report artifact. However, it never explicitly names those siblings or contrasts the workflows, so difference must be inferred.

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?

There is no when-to-use framing: nothing says whether this is the final aggregation step after review_diff/review_file, or what prerequisites (e.g., changed files needing review) exist. The Args section describes inputs but gives no selection guidance against get_review_checklist or review_diff.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_branch_diffC

Get the git diff between the current branch and a base branch.

Args: base_branch: The base branch to compare against (default: development). file_filter: File pattern to filter (default: *.py for Python files). working_directory: Working directory (defaults to current directory).

Returns: The git diff output showing changes on the current branch.

ParametersJSON Schema
NameRequiredDescriptionDefault
base_branchNodevelopment
file_filterNo*.py
working_directoryNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

C2.8/5.0
Behavior2/5

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

With no annotations, the description carries the full behavioral burden. It does not state whether the operation is read-only (though 'Get' implies it), nor does it mention permissions, rate limits, or side effects. The 'Returns' section adds some value by describing the output as the git diff output, but overall behavioral disclosure is thin.

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 uses an Args and Returns structure that is clear but somewhat verbose for a simple diff tool. It front-loads the purpose, which is good, but the parameter details could be more compact. Overall, it is acceptable but not highly polished.

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 that the tool has an output schema (which likely explains return values), the description need not detail them extensively. It covers parameters adequately but lacks behavioral context (e.g., read-only nature) and usage differentiation from siblings. For a tool with no annotations and 0% schema coverage, it is minimally complete but leaves gaps.

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

Parameters4/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 undocumented parameters. It does so by explaining each of the three parameters: base_branch (default development), file_filter (default *.py for Python files), and working_directory (defaults to current directory). This adds meaningful semantics beyond the raw schema, though it could clarify the format of file_filter patterns or the effect of null.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a verb and resource ('Get the git diff between the current branch and a base branch'), which is clear enough. However, it does not distinguish itself from siblings like get_changed_files or review_diff, which likely operate on similar diff data. The purpose is understandable but not differentiated from alternatives.

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?

There is no explicit guidance on when to use this tool versus siblings such as get_changed_files or review_diff. The description implies usage through context (comparing branches) but provides no when/when-not conditions or alternative routing.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_changed_filesA

Get a list of changed files on the current branch.

Args: base_branch: The base branch to compare against (default: development). file_filter: File pattern to filter (default: *.py for Python files). working_directory: Working directory (defaults to current directory).

Returns: List of changed file paths with change statistics.

ParametersJSON Schema
NameRequiredDescriptionDefault
base_branchNodevelopment
file_filterNo*.py
working_directoryNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.6/5.0
Behavior3/5

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

No annotations are provided, so the description carries the burden; it partially discharges it by disclosing defaults. The default file_filter of *.py is a meaningful behavioral trait (non-Python changes are silently excluded) and the default base branch of development is useful. It does not state read-only status, permissions, or limits, so it remains incomplete for a no-annotation tool.

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 Args/Returns structure is front-loaded with the core purpose and economical. The Returns line is redundant given an output schema exists, but overall there is little waste.

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

Completeness4/5

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

With only three optional parameters and an output schema present, the description covers the essentials: what it returns and what each argument means. The main gap is that the *.py default silently narrowing results is not flagged as a caveat the agent should override.

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

Parameters4/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, and it does: all three parameters are named with their defaults and purpose. It stops short of giving format examples (e.g., glob syntax for file_filter or branch naming conventions) that would fully remove ambiguity.

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?

States a specific verb (get) and resource (changed files) with a clear scope: the current branch. However, it never distinguishes itself from siblings like get_branch_diff or review_diff, which sound like they cover overlapping ground, so an agent must guess which to pick.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is only implied by the name and the 'compare against base_branch' framing. There is no when-to-use guidance and no mention of alternatives such as get_branch_diff, which appears to overlap heavily. An agent is left to infer the selection criteria.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_personaA

Get the code reviewer persona that will be used for reviews.

Use this to view or verify the persona before running a review.

Args: persona_file: Path to a custom reviewer persona markdown file. Example: "notebooks/code_reviewer_persona.md" If not provided, uses the default persona. working_directory: Working directory (defaults to current directory).

Returns: The full persona content that will be used for code reviews.

ParametersJSON Schema
NameRequiredDescriptionDefault
persona_fileNo
working_directoryNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It does disclose the key behavioral fact that omitting persona_file falls back to a default persona, and that it returns full content, but says nothing about error behavior (e.g., missing file), whether the path is resolved against working_directory, or that the call has no side effects.

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?

Front-loads the purpose and usage in the first two lines, then uses conventional Args/Returns sections. Slightly padded by docstring formatting, but every line carries information.

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

Completeness4/5

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

For a simple two-optional-parameter read tool with an output schema already covering the return shape, the description covers purpose, usage, parameter meaning, and defaults. Only edge-case behavior (missing file, path resolution) is left implicit.

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

Parameters4/5

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

Schema coverage is 0%, so the description must compensate and largely does: it explains persona_file's purpose, format, an example path, and its default fallback, plus working_directory's role and default. It omits only finer details like path resolution rules and relative-vs-absolute handling.

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?

States a specific verb+resource ('Get the code reviewer persona') and clarifies the scope ('that will be used for reviews'). It distinguishes itself from action-oriented siblings like review_diff by framing itself as a pre-review inspection step, though it never names a sibling directly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

'Use this to view or verify the persona before running a review' gives clear context for when to invoke it relative to the review workflow. It stops short of naming alternatives or exclusions, but the usage window is unambiguous.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_review_checklistB

Get the full code review checklist based on the persona.

Returns: A comprehensive checklist for manual code review.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3.1/5.0
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 behavioral burden. It hints at a persona dependency and a return value, but says nothing about where the persona comes from, permissions, or whether the checklist varies per invocation.

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?

Two short sentences with the Returns section clearly appended. Front-loaded and with no waste, though the Returns line is somewhat redundant given an output schema exists.

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?

With an output schema present, return explanation is unnecessary, and there are no parameters to cover. However, the implicit dependency on a persona (presumably from get_persona) is left unexplained, which is the key missing context.

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

Parameters4/5

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

The tool takes zero parameters, so the baseline is 4. The description's mention of a persona-driven result adds a small amount of meaning about what determines the output, but there are no parameters to document.

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?

States a specific verb+resource: retrieving the code review checklist. The phrase 'based on the persona' distinguishes it from a static list, but it does not explicitly differentiate from siblings like review_file or generate_review_report.

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?

No when-to-use guidance, no prerequisites, and no mention of alternatives. An agent must infer that this precedes manual review and depends on a persona.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

review_diffA

Review the git diff against the code review persona standards.

This tool analyzes the diff between your current branch and the base branch, then provides structured feedback based on the team's code review standards.

Args: base_branch: The base branch to compare against (default: development). working_directory: Working directory (defaults to current directory). focus_areas: Comma-separated focus areas: 'types', 'docs', 'style', 'errors', 'performance', 'architecture', or 'all'. persona_file: Path to a custom reviewer persona markdown file. Example: "notebooks/code_reviewer_persona.md" If not provided, uses the default persona.

Returns: A structured code review with comments organized by file and category.

ParametersJSON Schema
NameRequiredDescriptionDefault
base_branchNodevelopment
focus_areasNoall
persona_fileNo
working_directoryNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.8/5.0
Behavior3/5

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

No annotations exist, so the description carries the full burden; it does convey that this is an analysis/read operation producing feedback rather than a mutation, which is useful. However, it omits any statement about prerequisites (must be inside a git repo), side effects, whether it writes anything to disk, or latency/cost characteristics.

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?

Front-loaded with the core purpose in the first line, then an Args/Returns breakdown that earns its space given the 0% schema coverage. Slightly padded by the two-sentence preamble, but nothing is genuinely wasted.

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

Completeness4/5

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

With an output schema present, the description need not detail return values, though it still does briefly ('comments organized by file and category'). Combined with full parameter documentation, an agent has enough to invoke it correctly, with only cross-tool routing left unresolved.

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

Parameters5/5

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

Schema description coverage is 0%, so the schema alone leaves all four parameters undocumented. The description compensates fully: it explains base_branch's meaning and default, working_directory's default, enumerates the valid focus_areas values ('types', 'docs', 'style', 'errors', 'performance', 'architecture', 'all'), and gives a concrete example path for persona_file plus its fallback behavior.

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?

States a specific verb plus resource: reviews the git diff of the current branch against a base branch and returns structured feedback. It is clearly a diff-level reviewer, but it never distinguishes itself from siblings like review_file or generate_review_report, so an agent must infer the split.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied by 'analyzes the diff between your current branch and the base branch,' which tells the agent when the tool is applicable. There is no explicit when-not guidance and no mention of review_file as the alternative for single-file review, so routing between siblings is left to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

review_fileB

Review a specific file against the code review persona standards.

Args: file_path: Path to the file to review (relative or absolute). working_directory: Working directory (defaults to current directory). persona_file: Path to a custom reviewer persona markdown file. Example: "notebooks/code_reviewer_persona.md" If not provided, uses the default persona.

Returns: Code review feedback for the specified file.

ParametersJSON Schema
NameRequiredDescriptionDefault
file_pathYes
persona_fileNo
working_directoryNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3.4/5.0
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 behavioral burden. It says nothing about whether this is read-only, whether it invokes an LLM, latency/cost, permission needs, or what happens if persona_file is missing or invalid; the 'Returns' line is largely redundant given an output schema exists.

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?

Purpose is front-loaded in one sentence, followed by a compact Args/Returns block. The persona_file example is the only mildly verbose element and it earns its place by clarifying the expected path format.

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?

The output schema covers return values, so the 'Returns' line is unnecessary, and parameters are well documented. However, with no annotations at all, the definition omits key operational context (side effects, persona resolution behavior, failure modes), leaving it adequate but incomplete.

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

Parameters4/5

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

With 0% schema description coverage, the description must compensate, and it does: it explains file_path accepts relative or absolute paths, working_directory defaults to the current directory, and persona_file points to a custom persona markdown with a concrete example and a default fallback. Only minor gaps remain (e.g. no stated constraints on file_path).

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?

States a specific verb (review) and resource (a specific file), which implicitly separates it from the sibling review_diff that operates on a diff. It does not explicitly name a sibling tool, so it falls short of the top score, but the scope is unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is only implied: the presence of a required file_path suggests reviewing one file at a time, and persona_file suggests customization. There is no explicit guidance on when to prefer this over review_diff or generate_review_report, nor any prerequisite (e.g. persona file must exist).

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 7 tool updatesv1.0.0
    • First observedgenerate_review_report
    • First observedget_branch_diff
    • First observedget_changed_files
    • First observedget_persona
    • First observedget_review_checklist
    • First observedreview_diff
    • First observedreview_file

TDQS

A3.6/5.0

Scored across 7 tools

Disambiguation4/5

Each tool targets a distinct artifact (diff, file list, checklist, persona, diff review, file review, report), and descriptions clarify boundaries. The only mild overlap is between review_diff and review_file, but they differ on scope (whole diff vs single file) so agents can still select correctly.

Naming Consistency5/5

All names are snake_case and follow a predictable verb_noun pattern (get_*, review_*, generate_*). The convention is applied uniformly across all seven tools with no deviations.

Tool Count5/5

Seven tools is well-scoped for a code review server, and each earns its place by covering a distinct step in the review workflow (gather, inspect, review, report). No redundancy or filler.

Completeness4/5

The surface covers the full local review lifecycle: diff retrieval, changed files, checklist, persona inspection, diff/file review, and report generation. Minor gaps exist around acting on results (e.g. posting comments to a PR or reviewing a commit range), but core workflows are complete.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers