Skip to main content
Glama

compare_commits

Compare two commits or branches to view file changes and diff statistics, showing what was added, modified, or removed between versions.

Instructions

Compare two commits or branches and see files changed.

Args:
    repo_slug: Repository slug
    base: Base commit hash or branch name
    head: Head commit hash or branch name

Returns:
    Diff statistics showing files added, modified, and removed

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
repo_slugYes
baseYes
headYes
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses the tool's behavior by stating it 'see files changed' and returns 'Diff statistics,' indicating a read-only operation with specific output. However, it doesn't mention potential limitations like rate limits, authentication needs, or error conditions, leaving gaps for a mutation-free but potentially complex tool.

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 well-structured and front-loaded with the core purpose, followed by clear 'Args' and 'Returns' sections. Every sentence earns its place by providing essential information without redundancy, making it efficient and easy to parse.

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 no annotations, no output schema, and 3 parameters, the description is largely complete: it explains the purpose, parameters, and return value. However, it lacks details on output format (e.g., structure of diff statistics) and behavioral aspects like error handling, which could be useful for a tool with no structured output documentation.

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

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 0%, so the description must compensate. It provides detailed semantics for all three parameters: 'repo_slug: Repository slug,' 'base: Base commit hash or branch name,' and 'head: Head commit hash or branch name,' adding crucial meaning beyond the schema's basic titles. This fully addresses the coverage gap.

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: 'Compare two commits or branches and see files changed.' It specifies the verb ('compare'), resources ('commits or branches'), and output ('files changed'), distinguishing it from siblings like get_commit (single commit) or get_pr_diff (pull request diff).

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 implies usage context by specifying it compares 'two commits or branches,' but it doesn't explicitly state when to use this tool versus alternatives like get_pr_diff (for pull requests) or list_commits (for listing without comparison). It provides clear input requirements but lacks explicit when/when-not guidance.

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/JaviMaligno/mcp-server-bitbucket'

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