Skip to main content
Glama
xlian-fe

MCP Code Review Server

by xlian-fe

get_changed_files

Identify changed files in a Git repository by comparing branches or from a commit hash, providing paths for code review.

Instructions

获取变更文件的路径列表。支持两种模式:

模式一:分支对比模式(需要 target_branch) 对比开发分支与目标分支之间的代码差异。

模式二:Commit Hash 模式(需要 from_commit,不需要 target_branch) 指定一个起始 commit hash,获取该 commit 之后到开发分支的所有变更。适用于不想指定目标分支的场景。

使用流程:

  1. 调用此工具获取变更文件路径列表

  2. 根据每个文件的完整路径名称,生成简短的中文功能描述(10-20字)

  3. 将描述通过 file_descriptions 参数传给 generate_code_review 工具

描述示例:

  • src/api/settlement.ts -> "结算管理API接口"

  • src/views/Settlement/Corporate.vue -> "结算列表页面"

  • src/utils/date.ts -> "日期格式化工具函数"

  • src/store/user.ts -> "用户状态管理"

  • src/components/UploadFile.vue -> "文件上传组件"

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
authorNoGit提交作者名称或邮箱(用于筛选特定作者的提交,可选)
repo_pathYesGit仓库的本地路径
dev_branchYes开发分支名称
from_commitNo起始 commit hash。指定后,将获取该 commit 之后到 dev_branch 的所有变更,无需指定 target_branch。
target_branchNo目标对比分支(如main、master、develop)。使用 from_commit 模式时可不传。
Behavior4/5

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

With no annotations provided, the description carries the full burden. It discloses the two operational modes and the output as a list of file paths. However, it stops short of detailing the exact return format, edge cases (e.g., deleted files, untracked files), or ordering, which would be valuable for full transparency.

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 well-structured with clear headings for two modes and a numbered usage workflow. It includes practical examples of generated descriptions, all of which are relevant to downstream usage. The length is justified given the complexity of the two modes and the integration guidance.

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

Completeness5/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 and the absence of an output schema, the description is remarkably complete. It explains both input modes, the return value (list of paths), and the intended integration with generate_code_review, including example filename-to-description mappings. This is more than sufficient for an agent to select and invoke the tool correctly.

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 schema covers all parameters (100% coverage), so the baseline is 3. The description adds value by explaining the roles of target_branch and from_commit within the two modes, going beyond the schema's individual descriptions. It also implies the relationship between dev_branch and the modes, enriching parameter understanding.

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 clearly states it '获取变更文件的路径列表' (gets the list of changed file paths) with a specific verb and resource. It distinguishes two modes (branch comparison and commit hash) that further clarify the tool's scope, and the workflow differentiates it from sibling tools like generate_code_review and list_branch_authors.

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?

The description explicitly explains when to use each mode: branch comparison mode requires target_branch, while commit hash mode is for when you don't want to specify a target branch. It also provides a step-by-step usage flow, connecting this tool to generate_code_review, making it clear how it fits into the overall review process.

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/xlian-fe/mcp-xl-code-review'

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