Skip to main content
Glama

变更审查

review

Analyze git diffs against spec.json to classify each change unit as in-spec, implicit, or out-of-spec and warn about scope violations; writes changes.json for later test stages.

Instructions

读取 git diff、扫描引用图并对照 spec.json 判定,输出按变更单元的三分类标注(in-spec / implicit / out-of-spec)与越界的事前警告,同时原子写入 changes.json 供 test 阶段读取。未找到 spec.json 时降级为「无基准」分析(全部 implicit、不告警),并在 notices 中说明。

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "review"
  }
}

Input Schema

NameRequiredDescriptionDefault
baseNo比较基线(如 HEAD~1、main),默认 HEAD
scopeNo审查范围,git pathspec(目录或 glob),缺省为整个工作区
stagedNo只审查已暂存改动(git diff --cached)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior3/5

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

It discloses real behavioral traits: it is a read-and-analyze operation that also writes changes.json atomically, and it has a documented degraded mode when spec.json is absent. It does not say whether the tool changes the working tree, what permissions it needs, what notices contains, or how large the diffs can be. The description adds value beyond the schema, but key side-effect details are missing.

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 description is two dense sentences with no filler, and the primary behavior comes before the fallback path. The Chinese is packed but readable, and every clause adds information. It might have been split for easier scanning, but it is not bloated.

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?

This is a complex multi-step analysis tool with no output schema, so the description must carry the return-value burden. It does define the three output categories, the warning behavior, the changes.json artifact, and the degraded mode, which is nearly complete. Only the contents of notices and details about how the reference-graph scan behaves are left unstated.

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 base, scope, and staged. The description restates only the scope behavior ('缺省为整个工作区') and adds no format details that the schema lacks. Baseline 3 is therefore correct.

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?

The description names a specific action and its inputs (git diff, reference graph, spec.json) and precisely describes its output: three-category labels per change unit (in-spec/implicit/out-of-spec), advance warnings for out-of-spec changes, and an atomically written changes.json. This is clearly distinct from the database or record siblings, and the note that changes.json is '供 test 阶段读取' rules out confusion with the test tool.

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?

The only guidance it gives concerns the conditional path when spec.json is missing, where it degrades to a 'no baseline' analysis that marks everything implicit and issues no warnings. It never says when an agent should call review instead of clarify or health, nor when it should not call it. The usage context is implied by the description but never made explicit.

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

Deploy Server

Other Tools