Skip to main content
Glama

Get merge requests

gitlab_get_merge_requests
Read-onlyIdempotent

Retrieve and filter GitLab merge requests by project, state, author, labels, or date to review and manage code changes.

Instructions

Get a list of merge requests.

Args: **kwargs: Additional parameters for the request (e.g., state, scope).

Returns: Response: A wrapper containing the original response and a list of MergeRequest models.

Raises: ParameterError: If invalid parameters are provided.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "gitlab_get_merge_requests"
  }
}

Input Schema

NameRequiredDescriptionDefault
wipNo
dataNo
pageNo
sortNo
viewNo
scopeNo
stateNo
titleNo
labelsNo
searchNo
squashNo
order_byNo
per_pageNo
author_idNo
max_pagesNo
milestoneNo
search_inNo
project_idNo
assignee_idNo
descriptionNo
environmentNo
reviewer_idNo
approver_idsNo
assignee_idsNo
milestone_idNo
reviewer_idsNo
created_afterNo
source_branchNo
target_branchNo
updated_afterNo
created_beforeNo
deployed_afterNo
search_excludeNo
updated_beforeNo
approved_by_idsNo
author_usernameNo
deployed_beforeNo
my_reaction_emojiNo
reviewer_usernameNo
target_project_idNo
allow_collaborationNo
with_labels_detailsNo
remove_source_branchNo
approvals_before_mergeNo
allow_maintainer_to_pushNo
with_merge_status_recheckNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv27.3.20
    • removedInput schema / properties / api_parameters
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "additionalProperties": true,
      -      "type": "object"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ],
      -  "default": null
      -}
    • changedInput schema / properties / max_pages / default
      Previous value: -0New value: +null
    • changedInput schema / properties / page / default
      Previous value: -1New value: +null
    • changedInput schema / properties / per_page / default
      Previous value: -100New value: +null
  2. Changed2 schema fields changedv27.3.18
    • addedInput schema / properties / title / default
      Added value: +null
    • removedInput schema / required
      Removed value: -[
      -  "title"
      -]
  3. First observedv27.3.13

TDQS

B3/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, openWorldHint, and destructiveHint=false, so the safety profile is covered. The description adds two genuinely useful behavioral facts beyond that: the return is a wrapper containing MergeRequest models, and invalid parameters raise ParameterError. It says nothing about pagination behavior across page/per_page/max_pages, default result ordering, or result volume — notable for a 46-parameter listing tool.

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 definition is short and front-loads the purpose, which is good, but it is structured as a generically generated docstring (Args/Returns/Raises) where the Args block conveys essentially nothing. It is concise by omission rather than by discipline.

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 read-only list tool with no output schema, the description does supply the return shape (wrapper plus MergeRequest models) and the error behavior, which covers the main gaps. What remains missing is the filter/pagination semantics of a 46-parameter query tool, which is a meaningful gap for correct invocation but less severe given all parameters are optional.

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% across 46 parameters, so the description carries the full explanatory burden and largely fails to meet it. It only names two examples (state, scope) and frames the rest as opaque "**kwargs: Additional parameters", which does not even match the explicit flat properties in the schema; filters like reviewer_ids, approved_by_ids, search_in, with_labels_details, and the created_after/updated_after date formats are left entirely unexplained.

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 states a specific verb and resource ("Get a list of merge requests"), which is clear enough for an agent to know the operation. However, it never distinguishes this from the many close siblings — gitlab_get_project_merge_requests, gitlab_get_group_merge_requests, and the single-item gitlab_get_project_merge_request — so the critical question of scope (global vs project vs group) is left unanswered.

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 when-to-use guidance, no note on when to prefer the project- or group-scoped variants, and no mention of authentication or visibility prerequisites. The only hint at usage is the parenthetical "(e.g., state, scope)", which is a fragment rather than guidance.

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