Skip to main content
Glama

Create project level rule

gitlab_create_project_level_rule

Create a project-level merge request approval rule with a specified number of required approvers. Use it to enforce approval requirements for merge requests in a GitLab project.

Instructions

Create a new project-level merge request approval rule.

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

Returns: Response: A wrapper containing the original response and an ApprovalRule model.

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

B3/5.0
Behavior4/5

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

Annotations already supply readOnly=false, destructive=false, openWorld=true, idempotent=false, so the safety profile is covered. The description adds genuinely new behavior: the response is a wrapper plus an ApprovalRule model, and it raises MissingParameterError when project_id is missing — important because the schema marks zero required parameters, so project_id's de facto requirement is otherwise invisible. It stops short of naming required auth/tier or which other fields are mandatory.

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 and the Returns/Raises block earns its space. However, the 'Args: **kwargs: Additional parameters for the request' line is pure noise — the schema already enumerates the parameters, and the kwargs phrasing obscures rather than clarifies.

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 13-parameter mutation with no output schema and 0% schema description coverage, the definition is thin: it never explains the parameter vocabulary or the interaction between project-scope and group-scope rules. The Raises section and return wrapper help, but the agent still lacks enough to fill the arguments confidently.

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 carries the full burden and largely fails. It names only three (project_id, name, approvals_required) as examples and explains none of the semantics for user_ids, group_ids, rule_type, report_type, protected_branch_ids, applies_to_all_protected_branches, or approval_rule_id, leaving the agent guessing at the mutation's shape.

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 names a specific verb and resource: create a project-level merge request approval rule. 'Project-level' implicitly separates it from the group-level rule siblings (gitlab_edit_group_level_rule, gitlab_get_group_level_rule), though it never states that distinction explicitly. It clearly tells an agent this is a creation operation on an approval-rule object.

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 versus gitlab_update_project_level_rule, gitlab_edit_group_level_rule, or the merge-request-level approval siblings. No prerequisites (maintainer/owner permission, Premium tier) and no note that a group-level rule may already cover the project are given, so the agent must infer the selection criteria.

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