Skip to main content
Glama

Rebase Merge Request

gitlab_rebase_merge_request

Rebase a merge request’s source branch onto its target branch, optionally waiting for completion and returning the updated SHA, head-change status, and merge errors.

Instructions

Rebase a merge request's source branch onto its target (GitLab force-pushes the source branch). With wait=true (default) it polls up to timeout_seconds (default 60, max 300) and reports previous_sha, sha, head_changed, and merge_error. Use gitlab_get_merge_request_conflicts for conflicts.

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": {
      "merge_request_iid": "<merge_request_iid>"
    },
    "name": "gitlab_rebase_merge_request"
  }
}

Input Schema

NameRequiredDescriptionDefault
waitNo
skip_ciNo
project_idNo
timeout_secondsNo
merge_request_iidYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.7.0

TDQS

A4.3/5.0
Behavior5/5

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

Discloses the key side effect the agent cannot infer from annotations: GitLab force-pushes the source branch, i.e. remote history is rewritten. It also explains the polling behavior with wait=true, the timeout default and maximum, and which fields are reported back. Annotations (destructiveHint=false, idempotentHint=false) do not convey any of this, so the description is carrying real weight rather than repeating structured data.

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?

Tight, front-loaded sentences: the operation and its side effect come first, then the wait/timeout behavior, then the sibling pointer. Every sentence earns its place, though the returns list is dense enough to be slightly hard to parse inline.

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 non-idempotent mutation with no output schema, the description covers the side effect, polling semantics, timeout bounds, and return fields, which is close to sufficient. It stops short of stating permission requirements or what skip_ci does, leaving modest gaps for a 5-parameter write tool.

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, and it does so only partially: wait, timeout_seconds, and merge_request_iid are explained, but skip_ci and project_id are never mentioned in the description or the schema. Half the parameters remain semantically opaque to the agent.

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?

Specific verb + resource ("Rebase a merge request's source branch onto its target") with the exact mechanics spelled out in parentheses. It is unambiguously distinguishable from sibling gitlab_merge_merge_request, which merges rather than rebases, without opening either schema.

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?

Explicitly routes conflict situations to gitlab_get_merge_request_conflicts, which is real when-to-use guidance. It lacks any statement about prerequisites (e.g. permissions, that the MR must be open) or an explicit "not for merging" exclusion, so it stops short of a 5.

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