Skip to main content
Glama

gitlab_create_merge_request

Create a new merge request to integrate code changes from a source branch into a target branch in GitLab projects.

Instructions

Create a merge request from source_branch into target_branch.

Not idempotent: creates a new MR each call. Check existing MRs first via gitlab_list_merge_requests if you want to avoid duplicates.

Examples: - "Open an MR from feature/login to master" → source_branch='feature/login' - "Open a WIP MR with a label" → title='Draft: ...', labels=['wip'] - Don't use to merge an already-open MR — use gitlab_merge_mr.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
source_branchYesSource branch.
target_branchNoTarget branch (default 'master').master
titleNoMR title. Auto-generated if omitted.
descriptionNoMR description (markdown supported).
labelsNoLabels to apply.
remove_source_branchNoDelete source branch after merge.
project_pathNoGitLab project path (e.g. 'my-org/my-repo'). When omitted, the default from GITLAB_PROJECT_PATH env var is used.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
iidNo
titleNo
stateNo
source_branchNo
target_branchNo
merge_statusNo
has_conflictsNo
web_urlNo
statusNo
hintNo
Behavior4/5

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

The description adds valuable behavioral context beyond what annotations provide. While annotations already declare idempotentHint=false and destructiveHint=false, the description explicitly states 'Not idempotent: creates a new MR each call' and provides guidance about checking existing MRs to avoid duplicates. This gives the agent practical operational knowledge that complements the structured annotations. No contradictions with annotations exist.

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 perfectly structured and economical. It opens with the core purpose, follows with critical behavioral notes, provides concrete examples, and ends with explicit exclusion guidance. Every sentence serves a distinct purpose with zero redundancy. The use of bold formatting for 'Not idempotent' effectively highlights the most important behavioral constraint.

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

Completeness5/5

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

Given the tool's complexity (7 parameters, non-idempotent write operation), the description provides excellent contextual completeness. It covers purpose, behavioral constraints, usage guidelines, and sibling tool relationships. With annotations covering safety aspects (destructiveHint=false) and an output schema presumably handling return values, the description focuses appropriately on the operational knowledge an agent needs to use this tool correctly.

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?

With 100% schema description coverage, the schema already documents all 7 parameters thoroughly. The description adds minimal parameter semantics beyond what's in the schema - it mentions source_branch and target_branch in the opening sentence and provides example usage patterns, but doesn't explain parameter interactions or edge cases. This meets the baseline expectation when schema coverage is complete.

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 specific action ('Create a merge request') with the key resources involved ('from source_branch into target_branch'). It explicitly distinguishes this tool from its sibling gitlab_merge_mr by stating 'Don't use to merge an already-open MR — use gitlab_merge_mr.' This provides clear differentiation from related tools in the server.

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 excellent usage guidance with explicit when-not-to-use instructions ('Don't use to merge an already-open MR'), alternative tool recommendations ('Check existing MRs first via gitlab_list_merge_requests'), and clear prerequisites ('creates a new MR each call'). It also includes practical examples that illustrate appropriate use cases, making it easy for an agent to determine when this tool is the right choice.

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

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