Skip to main content
Glama
Project Scope MCP Server

Project Scope MCP Server

git_compare_branches

Compare two Git branches to identify unique commits, their common ancestor, and differing files; optionally include the full diff for detailed review.

Instructions

Compare two Git branches showing unique commits in each branch, common ancestor, and files that differ. Optionally show full diff.

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": {
      "path": "<path>",
      "branch1": "<branch1>",
      "branch2": "<branch2>"
    },
    "name": "git_compare_branches"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesRoot path of the git repository
branch1YesFirst branch name to compare
branch2YesSecond branch name to compare
showDiffNoInclude full diff between branches (default: false)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations, the description carries the burden and does partly meet it by disclosing the return content (commit lists, merge base, changed files) and that diffs are opt-in. It does not state that the operation is read-only/non-mutating, nor does it warn about cost on large repositories or how output is scoped or truncated.

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?

Two compact sentences with the resource and the returned information front-loaded and no filler. The trailing "Optionally show full diff" largely restates the showDiff field already documented in the schema, which is the only mild redundancy.

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?

With no output schema, the description sensibly enumerates what comes back: unique commits, common ancestor, and differing files, plus the optional full diff. What remains unsaid — read-only nature, behavior with unknown branch names, or remote-ref support — is minor for a straightforward comparison tool.

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 coverage is 100%, so all four parameters are already documented at the field level; baseline is 3. The description confirms that showDiff is optional, but adds no syntax, format, or edge-case meaning (e.g., whether branch1/branch2 accept remote refs, tags, or SHAs) beyond the schema.

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?

States a specific verb and resource ("Compare two Git branches") and enumerates the concrete outputs: unique commits per branch, common ancestor, and differing files. It is clear what the tool does, but it never distinguishes itself from nearby siblings like git_show_changes or git_commit_history, so sibling differentiation is absent.

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 by the verb — the agent must infer that this is the right tool when it needs branch-to-branch divergence rather than a single-file or working-tree diff. There is no explicit when-to-use statement, no exclusions, and no named alternative.

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