Skip to main content
Glama

Get merge request level rules

gitlab_get_merge_request_level_rules
Read-onlyIdempotent

Retrieve merge request-level approval rules for a specific project and merge request, requiring the project ID and merge request IID.

Instructions

Get merge request-level approval rules for a specific project and merge request.

Args: **kwargs: Additional parameters for the request (e.g., project_id, merge_request_iid).

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

Raises: MissingParameterError: If the project_id or merge_request_iid is missing. ParameterError: If invalid parameters are provided.

Input Schema

NameRequiredDescriptionDefault
dataNo
nameNo
group_idNo
user_idsNo
group_idsNo
rule_typeNo
project_idNo
report_typeNo
approval_rule_idNo
merge_request_iidNo
approvals_requiredNo
protected_branch_idsNo
applies_to_all_protected_branchesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv27.3.13

TDQS

B3/5.0
Behavior3/5

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

The annotations already establish readOnlyHint, idempotentHint, openWorldHint, and non-destructive behavior. The description adds some value by naming MissingParameterError and ParameterError conditions and describing the return wrapper with ApprovalRule models, but it does not cover permissions, pagination, or other behavioral constraints.

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 first sentence is front-loaded and efficient, but the docstring-style Args/Returns/Raises structure contains boilerplate. Presenting the schema properties as generic **kwargs is vague and not maximally useful.

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 tool with 13 parameters at 0% schema coverage and no output schema, the description does far too little to explain filter semantics, optionality, or how the parameters affect the result. It describes the response wrapper, but the parameter story is substantially incomplete.

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 13 parameters, yet the description only names project_id and merge_request_iid as examples inside **kwargs. It leaves the other parameters (name, group_id, user_ids, group_ids, rule_type, report_type, approval_rule_id, approvals_required, protected_branch_ids, applies_to_all_protected_branches, data) completely unexplained. It also claims MissingParameterError for project_id/merge_request_iid while the schema marks every parameter as optional with a null default, creating a mismatch.

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 first sentence states a specific verb and resource: get merge request-level approval rules, scoped to a project and merge request. It does not differentiate itself from closely related siblings such as gitlab_merge_request_level_approvals or gitlab_get_project_level_merge_request_rules, but the core purpose is clear.

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

Usage Guidelines3/5

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

Usage is implied by the stated scope (a specific project and merge request), but the description never says when to prefer this over the project-level or generic merge request approval siblings. There are no explicit exclusions or alternative-routing 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