获取变更文件的路径列表。支持两种模式: 模式一:分支对比模式(需要 target_branch) 对比开发分支与目标分支之间的代码差异。 模式二:Commit Hash 模式(需要 from_commit,不需要 target_branch) 指定一个起始 commit hash,获取该 commit 之后到开发分支的所有变更。适用于不想指定目标分支的场景。 使用流程: 1. 调用此工具获取变更文件路径列表 2. 根据每个文件的完整路径名称,生成简短的中文功能描述(10-20字) 3. 将描述通过 file_descriptions 参数传给 generate_code_review 工...
AI agents call get_changed_files to retrieve information from MCP Code Review Server without modifying anything — typically the context-gathering step in research, monitoring, and reporting workflows, before the agent takes action elsewhere.
This is a pure read operation that queries and returns metadata about code changes. It has no side effects, does not execute code, does not modify repository state, and does not delete anything. The tool is used as an input gathering step for downstream tools like 'generate_code_review'.
From the tool's definition Tool name is 'get_changed_files' and description states it retrieves/returns '获取变更文件的路径列表' (retrieves a list of paths of changed files).
Attacks that exploit this kind of access
获取变更文件的路径列表。支持两种模式: 模式一:分支对比模式(需要 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 ->. It is categorised as a Read tool in the MCP Code Review Server MCP Server, which means it retrieves data without modifying state.
Register the MCP Code Review Server MCP server in PolicyLayer and add a rule for get_changed_files: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches MCP Code Review Server. Nothing to install.
get_changed_files is a Read tool with low risk. Read-only tools are generally safe to allow by default.
Yes. Add a rate_limit block to the get_changed_files rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for get_changed_files. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
get_changed_files is provided by the MCP Code Review Server MCP server (xlian-fe/mcp-xl-code-review). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
Every MCP server has a record like this.
Type a name, get the same breakdown: verified identity, auth posture, risk grade, capabilities, recommended policy.
Teams ship this data inside their own products. See what a licence covers →