Skip to main content
Glama

compare_branches_tool

Compare two GitLab branches, tags, or commits to see file changes and commit differences, aiding code review before merging.

Instructions

Compare two branches, tags, or commits.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
to_refYesHead branch/tag/commit
from_refYesBase branch/tag/commit
straightNoUse straight comparison instead of merge-base (default: false)
project_idYesProject ID or path

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior1/5

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

There are no annotations and the description does not mention side effects, read-only nature, or any behavioral details. The tool appears to be a read operation, but this is not explicitly stated.

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 extremely concise and to the point, with no unnecessary words or fluff. It effectively communicates the core purpose in a single sentence.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description lacks important context such as the return format, whether it is a diff or commit list, and any caveats like merge-base behavior. This incomplete information may leave users unsure about the tool's output or side effects.

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?

The input schema provides descriptions for all parameters (project_id, from_ref, to_ref, straight), so the coverage is 100%. The tool description adds no additional semantic information beyond the schema, but the schema itself is clear.

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?

The description clearly states the action (compare) and the objects (branches, tags, commits), distinguishing it from other tools that list or create resources. However, it does not specify the nature of the comparison (e.g., diff, merge-base), which leaves some ambiguity.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines1/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives like list_commits or get_mr_changes. The description lacks any contextual direction for selecting this tool.

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/crunchtools/mcp-gitlab'

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