Skip to main content
Glama
archish9

GitHub MCP Server

by archish9

compare_commits

Compare two Git commits to analyze code changes, identify when bugs were introduced, and generate changelogs by examining file modifications and diff content.

Instructions

Compare two commits and return the diff.

This tool generates a detailed comparison between two points in the history (from_commit -> to_commit). It's useful for:

  • Reviewing changes between versions.

  • Debugging when a bug was introduced.

  • Generating a changelog.

The output includes a summary of file changes (added, modified, deleted, renamed) and the actual diff content for each file.

Args: repo_path: The absolute path to the repository. from_commit: The source (older) commit SHA. to_commit: The target (newer) commit SHA.

Returns: A JSON-formatted string containing the list of changed files, additions/deletions counts, and diff patches.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
repo_pathYes
from_commitYes
to_commitYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

With no annotations provided, the description carries the full burden. It discloses that the tool 'generates a detailed comparison' and describes the output format, but lacks information about potential errors (e.g., invalid commit SHAs), performance considerations, or side effects. It adequately covers the basic behavior but misses deeper operational context.

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?

The description is well-structured with a clear opening sentence, bulleted use cases, and separate sections for arguments and returns. It is appropriately sized, though the bulleted list could be slightly condensed. Every sentence adds value without 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?

Given the tool's moderate complexity (3 parameters, no annotations, but with an output schema), the description is mostly complete. It explains the purpose, usage, parameters, and output format. The output schema existence means the description doesn't need to detail return values, but it could benefit from mentioning error cases or prerequisites.

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

Parameters4/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. It adds meaningful semantics for all three parameters: 'repo_path' as 'absolute path', 'from_commit' as 'source (older) commit SHA', and 'to_commit' as 'target (newer) commit SHA'. This clarifies the order and nature of inputs beyond the bare schema.

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 clearly states the tool's purpose with a specific verb ('compare') and resource ('two commits'), distinguishing it from siblings like 'list_commits' or 'rollback_to_commit'. It explicitly mentions returning a diff, which is the core function.

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?

The description provides clear context for when to use the tool ('reviewing changes between versions', 'debugging when a bug was introduced', 'generating a changelog'), but does not explicitly state when not to use it or name specific alternatives among the sibling tools.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/archish9/VersionControlHelperMCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server