Skip to main content
Glama

get_merge_request_notes

Read-only

Fetch flat merge request notes from GitLab by project ID and merge request IID. Get read-only note records with pagination, sorting, and JMESPath filtering options.

Instructions

List notes for a merge request. Use this to list flat notes on a merge request; use mr_discussions when thread structure and resolution state are required. It is read-only and returns note records, while invalid identifiers, missing resources, and pagination or permission errors are reported by GitLab.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNoPage number for pagination
sortNoThe sort order of the notes
jmespathNoOptional JMESPath expression filtering the JSON result before return.
order_byNoThe field to sort the notes by
per_pageNoNumber of items per page
project_idYesProject ID or complete URL-encoded path to project
merge_request_iidYesThe IID of a 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.18
  3. Removedv2.1.14
  4. Addedv2.1.11
  5. Removedv2.1.10
  6. Changed4 schema fields changedv2.1.9
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / page
      Added value: +{
      +  "description": "Page number for pagination",
      +  "type": "number"
      +}
    • addedInput schema / properties / per_page
      Added value: +{
      +  "description": "Number of items per page",
      +  "type": "number"
      +}
    • addedInput schema / required
      Added value: +[
      +  "project_id",
      +  "merge_request_iid"
      +]
  7. First observedv1.0.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, and the description reinforces this with 'It is read-only.' It adds useful behavioral context beyond annotations by specifying that the tool returns note records and that GitLab reports invalid identifiers, missing resources, pagination, and permission errors. This helps set error-handling expectations, though it does not detail response shapes or pagination behavior.

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?

Three sentences with no filler. The core action is front-loaded, the sibling distinction follows immediately, and the behavioral/error note is concise. Every sentence 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?

The description is complete for tool selection and invocation: it states behavior, scope, the key sibling alternative, and error reporting. With no output schema, saying it 'returns note records' is a minimal but sufficient return-value hint. It could mention that results are flat and how pagination manifests, but this is a minor gap.

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 parameters are already documented in the schema. The description adds no parameter-specific meaning (e.g., how `sort` or `order_by` interact, or what `jmespath` filters). Baseline 3 is appropriate because the schema carries the full parameter-semantics 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 states a specific verb and resource ('List notes for a merge request') and immediately differentiates from the sibling tool `mr_discussions` by characterizing itself as returning flat notes. This makes the tool's scope unmistakable and distinct from discussion-thread operations.

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 states when to use this tool vs. an alternative: 'use mr_discussions when thread structure and resolution state are required.' This gives the agent a clear decision rule and excludes the overlapping sibling, leaving no ambiguity about selection.

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