Skip to main content
Glama

compare_commits

Lists changed files between base and head revisions (branches, tags, or hashes) with paginated file statistics. Use it to see which files differ before fetching line-level diffs.

Instructions

List changed files from base to head (git diff base head semantics).

Revisions can be branches, tags or hashes. Returns a complete page of file
statistics. Follow next_cursor for remaining files; cursor keeps its issued
filters and page size. Use get_commit_diff for actual changed lines.

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": {
      "repo_slug": "<repo_slug>",
      "base": "<base>",
      "head": "<head>"
    },
    "name": "compare_commits"
  }
}

Input Schema

NameRequiredDescriptionDefault
baseYes
headYes
pathNo
limitNo
cursorNo
repo_slugYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / cursor
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Cursor"
      +}
    • addedInput schema / properties / limit
      Added value: +{
      +  "default": 50,
      +  "title": "Limit",
      +  "type": "integer"
      +}
    • addedInput schema / properties / path
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Path"
      +}
  2. First observedv1.0.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations present, the description carries the behavioral disclosure burden and does a solid job: it states the return is a complete page of file statistics and explains that next_cursor paginates remaining files while preserving issued filters and page size. It does not mention permissions, rate limits, or other operational constraints, but the core read/list behavior and pagination semantics are clear.

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 four short sentences, front-loads the core operation, and then adds revision semantics, pagination behavior, and the sibling alternative. Every sentence adds useful information without repetition.

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 read-only list operation with no output schema, the description supplies the essential comparison semantics, return-shape hint, pagination instruction, and line-diff alternative. The main gap is that path and limit are not explained, so an agent must infer their behavior from the schema alone.

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 0%, so the description must compensate for undocumented parameters. It explains base/head as branches, tags, or hashes and clarifies cursor pagination behavior, but it leaves path, limit, and repo_slug without semantic detail. This is adequate but incomplete for a six-parameter tool.

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 states a specific verb and resource: list changed files from base to head, with explicit git diff base/head semantics. It also distinguishes the tool from get_commit_diff by saying that sibling returns actual changed lines, while this returns file statistics.

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 names an alternative, get_commit_diff, and clarifies that this tool is for file-level comparisons rather than line-level diffs. It also explains that revisions may be branches, tags, or hashes. However, it does not contrast with list_commits or get_commit, so it stops short of full when-to-use guidance.

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