Skip to main content
Glama

get_merge_request_approval_state

Read-only

Inspect merge request approval rules and approvers to determine merge readiness. Read-only check before merging.

Instructions

Get merge request approval details including approvers. Use this to inspect approval rules and approvers before deciding whether a merge request can be merged; use approve_merge_request to change approval state. It is read-only and returns the approval-state response, while missing requests, unsupported GitLab versions, and permission failures are reported as errors.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
jmespathNoOptional JMESPath expression filtering the JSON result before return.
project_idYesProject ID or complete URL-encoded path to project
merge_request_iidYesThe IID of the merge request

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2.1.66
    • addedInput schema / properties / jmespath
      Added value: +{
      +  "description": "Optional JMESPath expression filtering the JSON result before return.",
      +  "type": "string"
      +}
  2. Addedv2.1.45
  3. Removedv2.1.43
  4. Addedv2.1.18
  5. Removedv2.1.14
  6. Addedv2.1.11
  7. Removedv2.1.10
  8. Addedv2.1.9

TDQS

A4.4/5.0
Behavior4/5

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

Annotations provide readOnlyHint=true, and the description reinforces this by saying 'It is read-only.' It adds useful behavioral detail by listing error conditions: missing requests, unsupported GitLab versions, and permission failures are reported as errors. It does not describe the full shape of the approval-state response, but the error disclosure is meaningful beyond the annotations.

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 two sentences with no filler. It front-loads the core purpose, then provides usage guidance, safety confirmation, and error behavior in a compact, well-ordered way. Every clause earns its place.

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 retrieval tool with rich annotations and complete schema coverage, the description covers purpose, usage, safety, and error conditions. The only minor gap is that it does not describe the specific fields contained in the 'approval-state response,' which would be more important if no output schema existed. Still, the essential context for correct selection and invocation is present.

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?

Schema description coverage is 100%, so the schema already documents all three parameters. The description adds no additional parameter-specific meaning, such as how project_id is resolved or how jmespath interacts with the result. Baseline 3 is appropriate because the schema carries the parameter documentation burden.

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 verb-resource relationship: 'Get merge request approval details including approvers.' It also names the inspection purpose ('inspect approval rules and approvers before deciding whether a merge request can be merged'), which distinguishes it from sibling tools like approve_merge_request and unapprove_merge_request.

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?

Explicitly tells the agent when to use this tool ('before deciding whether a merge request can be merged') and points to the alternative for changing state ('use `approve_merge_request` to change approval state'). This is direct, actionable guidance with no ambiguity.

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