Skip to main content
Glama
AlanNiew

code-review-mcp

by AlanNiew

review_diff

Review uncommitted git changes (staged and unstaged) to detect hardcoded secrets, debug prints, TODO/FIXME/HACK markers, and overly long added lines. Deprecated; use review_changes.

Instructions

[已弃用] 审查当前 git 仓库中未提交的变更(staged + unstaged)。

保留仅为兼容 v0.2.x 调用方;新代码请使用 review_changes,它提供变更级信号、 只报新增行、复杂度回归与风险焦点,且覆盖 working/staged/base 三种范围。

本工具对 diff 新增行做以下检测(DIFF001-DIFF004):

  • 硬编码的密钥或密码(严重)

  • 遗留的 print/console.log 调试语句

  • 新增的 TODO/FIXME/HACK 标记

  • 过长的新增行

Input Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does disclose scope (staged + unstaged) and the exact detection set DIFF001-DIFF004 with severity for secrets. It does not describe the return format or how findings are reported, which is a gap for a no-output-schema tool, but the behavioral profile is otherwise well covered.

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 deprecation notice and migration path before the detection list, so the most decision-relevant fact is first. The bulleted detection rules are scannable, though the deprecation paragraph and rules list make it longer than strictly necessary.

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 zero-param, no-annotation, no-output-schema tool, the description covers purpose, deprecation status, migration target, and detection scope. The only notable omission is what the response looks like, which the agent must infer.

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 and the description does not need to explain any input. It correctly implies operation against the current repository context.

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

Purpose5/5

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

States a specific verb (审查/review) and resource (当前 git 仓库中未提交的变更, staged + unstaged), and explicitly contrasts itself with the sibling review_changes. An agent can distinguish it from review_changes and analyze_file without opening any schema.

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

Usage Guidelines5/5

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

Explicitly marks itself deprecated for v0.2.x callers only and names review_changes as the replacement, with the concrete reasons (变更级信号, 只报新增行, 复杂度回归, working/staged/base 三种范围). When-to-use and when-not-to-use are both stated.

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