Skip to main content
Glama

Get Branch Diffs

gitlab_get_branch_diffs
Read-onlyIdempotent

Compare two GitLab branches or refs and return their diffs, optionally excluding files by pattern. Use it to inspect changes between branches before merging.

Instructions

Compare two branches/refs and return diffs.

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": {
      "from": "<from>",
      "to": "<to>"
    },
    "name": "gitlab_get_branch_diffs"
  }
}

Input Schema

NameRequiredDescriptionDefault
toYes
fromYes
straightNo
project_idNo
excluded_file_patternsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.7.0
    • removedInput schema / properties / straight / anyOf
      Removed value: -[
      -  {
      -    "type": "boolean"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedInput schema / properties / straight / type
      Added value: +[
      +  "boolean",
      +  "null"
      +]
  2. First observedv1.6.1

TDQS

C2.6/5.0
Behavior2/5

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

Annotations already establish that this is a safe, idempotent, read-only, open-world operation, so the safety profile is covered. The description adds nothing beyond that: no information about output size, truncation, pagination, diff format, or how excluded_file_patterns and straight alter behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The single sentence is front-loaded and free of waste, but its brevity stems from under-specification rather than disciplined editing. Nothing is confusing, yet very little information is delivered.

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?

For a five-parameter tool with zero schema documentation and no output schema, the definition is far too thin. An agent cannot know what the diff response looks like or how the optional parameters modify the comparison, which are material gaps for correct invocation.

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

Parameters2/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, but it only implicitly covers 'from' and 'to' via 'two branches/refs'. It says nothing about project_id, straight, or excluded_file_patterns, leaving three of five parameters with no meaning in either the schema or the description.

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 names a specific verb and resource ('Compare two branches/refs') and states that it returns diffs, so the core operation is unambiguous. It does not distinguish itself from sibling diff tools such as gitlab_get_merge_request_diffs or gitlab_get_commit_diff, which keeps it below a 5.

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

Usage Guidelines2/5

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

There is no guidance on when to use this tool versus the merge-request or commit diff siblings, nor any mention of prerequisites such as the project context or that both refs must exist. The agent must infer usage entirely from the name and schema.

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

Deploy Server

Other Tools