Skip to main content
Glama

analyze_mr_changes

Analyze file changes and diffs in a GitLab merge request to provide structured data for code review.

Instructions

分析合并请求的文件变更和差异信息,为代码审查提供基础数据

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "projectPath": "<projectPath>",
      "mergeRequestIid": "<mergeRequestIid>"
    },
    "name": "analyze_mr_changes"
  }
}

Input Schema

NameRequiredDescriptionDefault
focusFilesNo重点关注的文件列表
projectPathYes项目路径,格式: owner/repo
mergeRequestIidYes合并请求的内部ID

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

B3.2/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full behavioral burden. It does not state that the operation is read-only, how large diffs are handled (truncation, pagination), whether binary or renamed files are included, or what happens when the merge request or a focus file does not exist — all of which matter for an analysis tool an agent will call before commenting.

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?

A single, front-loaded sentence with no filler and no repetition of the title. It is efficient, though the brevity comes at the cost of the behavioral and usage detail noted elsewhere.

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

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no annotations and no output schema, the description is the only place an agent can learn what this tool returns, yet it says only that the result is '基础数据' (foundational data) for review. For a diff-analysis tool whose return shape (per-file patches, stats, truncation behavior) drives downstream decisions, that leaves a meaningful gap, though the core purpose is still conveyed.

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%, with projectPath, mergeRequestIid, and focusFiles all documented in the schema, so the baseline is 3. The description adds no meaning beyond that — it never explains the effect of focusFiles (filtering vs. prioritization) or the expected projectPath format, leaving the schema to do all the work.

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 states a specific verb and resource combination: analyzing a merge request's file changes and diff information, and it frames the output as input for code review. It is clear what the tool does, but it never distinguishes itself from the sibling get_merge_request_changes, which by name covers very similar ground, so an agent has no textual basis for choosing between them.

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?

Usage is only implied through the phrase '为代码审查提供基础数据' (provides foundational data for code review), which suggests this is a first step before review-comment tools like push_code_review_comments. There is no explicit when-to-use, no when-not-to-use, and no named alternative such as get_merge_request_changes or get_file_content.

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