Skip to main content
Glama

Get project level merge request rules

gitlab_get_project_level_merge_request_rules
Read-onlyIdempotent

Retrieve project-level merge request approval rules for a GitLab project to inspect required approvals and rule configurations.

Instructions

Get project-level merge request approval rules.

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

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

Raises: MissingParameterError: If the project_id 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

C2.8/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false, and openWorldHint, so the safety profile is covered. The description adds genuine value beyond that: the error behavior (MissingParameterError without project_id, ParameterError on invalid params) and the return shape (wrapper plus a list of ApprovalRule models). It does not explain the oddly broad parameter set or any filtering behavior.

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 purpose sentence is front-loaded, but the body is auto-generated docstring boilerplate where the 'Args: **kwargs' section is essentially noise while the Returns and Raises sections carry real information. Reasonably sized but not optimally structured for an agent.

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?

A 13-parameter tool with a fully nullable schema and no output schema needs the description to explain parameter intent and scope, and this one does not. The mismatch between a 'project level' tool and its group_id/merge_request_iid parameters is never reconciled, leaving the agent guessing how to invoke it correctly.

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, so the description must compensate and largely fails. It mentions only project_id (as a 'kwargs' example) and never explains what group_id, merge_request_iid, approval_rule_id, rule_type, report_type, or the branch-related flags do on a tool named 'project level'.

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?

States a specific verb and resource: 'Get project-level merge request approval rules,' which is clearly distinguishable from most siblings. However, it does not distinguish itself from the near-identical sibling gitlab_get_project_level_merge_request_rule (singular) or gitlab_get_merge_request_level_rules, leaving some ambiguity about which level's rules are returned.

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 guidance on when to use this tool versus the singular variant, the merge-request-level variant, or the group-level rule tools. The only contextual hint is that project_id is required, mentioned only in the Raises section rather than as a usage statement.

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