Skip to main content
Glama
AlanNiew

code-review-mcp

by AlanNiew

check_project

Scan a project directory to summarize code quality across supported files, showing language stats, issue counts, top problem files, and an overall grade for quick repository assessment.

Instructions

扫描项目目录的代码质量概况。

遍历项目下所有支持的源代码文件(Python/JS/TS/Java/Go/Rust 等), 对每个文件运行完整规则集,最后汇总:

  • 总文件数和总行数

  • 语言分布统计

  • 错误/警告/提示计数

  • 问题最多的前 10 个文件

  • 整体质量评分(A-F 等级)

适合在不熟悉的仓库里摸底,不要把它当审查结论。

Args: directory: 要扫描的项目目录路径,默认为当前目录

Input Schema

NameRequiredDescriptionDefault
directoryNo.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.1/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 well: it discloses that all supported source files are traversed, that the complete rule set runs per file, and exactly what the aggregation contains (counts, top-10 files, letter grade). It stops short of stating read-only safety, runtime cost on large repositories, or pagination/truncation behavior.

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 purpose is front-loaded in the first line, followed by a tightly scoped bullet list of what the aggregate contains, then the usage caveat, then the argument. Every element earns its place and nothing is repeated from structured fields.

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 one-parameter, read-only scan with no output schema and no annotations, the description is nearly self-sufficient: it explains both behavior and the shape of the return value in lieu of an output schema. It lacks only operational caveats such as expected runtime on large repos or handling of unreadable/unsupported files.

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: it explains the single 'directory' parameter as the project directory to scan and states the default is the current directory. Only one parameter is required, and its meaning is fully covered, though path format/relative-vs-absolute semantics are not addressed.

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 gives a concrete verb+resource: it scans a project directory and returns an aggregate code-quality overview (file/line counts, language distribution, severity counts, top-10 problem files, A-F grade). Its project-wide aggregate scope implicitly separates it from the per-file/per-change siblings (analyze_file, review_diff, review_changes), though no sibling is named explicitly.

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?

It states a clear use case ('适合在不熟悉的仓库里摸底') and an explicit caution/kill-criterion ('不要把它当审查结论'), which steers the agent away from treating output as a review verdict. It does not name the alternative tools for when narrow, file-level, or diff-level analysis is needed.

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