Skip to main content
Glama

gitlab_rebase_merge_request

Rebase a merge request onto its target branch to resolve out-of-date status when the MR is behind. Requires fast-forward merge method, no conflicts, and developer access.

Instructions

Rebase MR onto target branch Returns: Rebase status Use when: MR is behind target branch Fixes: Out-of-date MR status

Requirements:

  • Fast-forward merge method

  • No conflicts

  • Developer access

Related tools:

  • gitlab_get_merge_request: Check if rebase needed

  • gitlab_merge_merge_request: Merge after rebase

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idNoProject identifier (auto-detected if not provided) Type: integer OR string Format: numeric ID or 'namespace/project' Optional: Yes - auto-detects from current git repository Examples: - 12345 (numeric ID) - 'gitlab-org/gitlab' (namespace/project path) - 'my-group/my-subgroup/my-project' (nested groups) Note: If in a git repo with GitLab remote, this can be omitted
mr_iidYesMerge request number (IID - Internal ID) Type: integer Format: Project-specific MR number (without !) Required: Yes Examples: - 456 (for MR !456) - 7890 (for MR !7890) How to find: Look at MR URL or title - URL: https://gitlab.com/group/project/-/merge_requests/456 → use 456 - Title: "Add new feature (!456)" → use 456 Note: This is NOT the global MR ID
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes the operation's purpose, prerequisites (fast-forward method, no conflicts, developer access), and what it fixes ('Out-of-date MR status'). It doesn't mention rate limits, error conditions, or detailed response format, but covers the essential behavioral context for this mutation 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 uses a structured format with clear sections (Returns, Use when, Fixes, Requirements, Related tools) that makes information easy to parse. Every sentence earns its place with no wasted words, and the most critical information (the action) is front-loaded.

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 mutation tool with no annotations and no output schema, the description provides good contextual completeness. It covers purpose, usage context, prerequisites, and related tools. The main gap is the lack of output format details (only mentions 'Rebase status' without elaboration), but given the structured guidance provided, it's mostly complete for agent usage.

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 100%, providing comprehensive documentation for both parameters. The description doesn't add any parameter-specific information beyond what's in the schema, so it meets the baseline of 3 where the schema does the heavy lifting. No additional semantic context is provided for the parameters.

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 starts with a clear verb+resource statement 'Rebase MR onto target branch' that specifies the exact action and target. It distinguishes from siblings like 'gitlab_merge_merge_request' by focusing on rebasing rather than merging, and from 'gitlab_get_merge_request' by being an action rather than a query.

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

Usage Guidelines5/5

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

The description provides explicit 'Use when' guidance ('MR is behind target branch'), lists prerequisites ('Requirements: Fast-forward merge method, No conflicts, Developer access'), and names related tools for checking if rebase is needed and for subsequent merging. This gives clear context for when to use this tool versus alternatives.

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

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