Skip to main content
Glama
CodeHealth MCP Server

CodeHealth MCP Server

analyze_change_set

Compares committed changed files on the current branch with their merge base to check quality-gate impact before opening or merging a pull request.

Instructions

Compare every changed file on the current branch with its merge base.

When to use: before opening or merging a pull request.
Limitations: compares committed HEAD content only; uncommitted edits are
ignored. The merge base's root rules file is used for both sides.
Returns: {quality_gate, merge_base, counts, rules_changed?, files:[{path, verdict, ...}],
cross_file_duplication?, analyzers?}.

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": {
      "repository_path": "<repository_path>"
    },
    "name": "analyze_change_set"
  }
}

Input Schema

NameRequiredDescriptionDefault
base_refNomain
repository_pathYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/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 behavioral burden and delivers real substance: it discloses that only committed HEAD content is compared, uncommitted edits are ignored, and the merge base's root rules file governs both sides. It omits cost, permissions, or failure modes, which keeps it from a 5.

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?

Front-loaded with a one-line summary, then cleanly labeled When to use / Limitations / Returns sections. The Returns line largely restates the existing output schema, which is slightly wasteful, but the overall shape is easy to scan.

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 two-parameter analysis tool with no annotations, the description covers the key correctness caveats (committed-only content, shared rules file) that would otherwise cause misinterpretation. The presence of an output schema excuses further return-value detail; only parameter meaning is left thin.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/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 explain the two parameters, but it does not. It never states that base_ref selects the comparison base or that repository_path points at the repo root; the repeated 'merge base' phrasing only weakly implies the former.

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 opening sentence names a specific verb and resource with scope: 'Compare every changed file on the current branch with its merge base.' That distinguishes it immediately from siblings like code_health_review or code_health_score, which operate on health rather than diffs.

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 gives an explicit trigger: 'When to use: before opening or merging a pull request.' No alternatives or when-not-to-use cases are named, so it stops short of a 5, but the intended workflow context is unambiguous.

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