Skip to main content
Glama

get_merge_request_discussion

Read-only

Retrieve a single merge request discussion thread by ID to inspect comments and replies; use collection or note tools when you need all discussions or a flat note.

Instructions

Get a single discussion item for a merge request. Fetch one discussion by id. Use mr_discussions for a collection and get_merge_request_note for a flat note.

Input Schema

NameRequiredDescriptionDefault
jmespathNoOptional JMESPath expression filtering the JSON result before return.
project_idYesProject ID or complete URL-encoded path to project
discussion_idYesThe ID of a thread
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.63

TDQS

A4.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, so the read-only, external-facing profile is covered. The description adds nothing about return shape (e.g., whether the thread's notes are included) or how jmespath affects output, so it is only marginally additive.

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?

Two short sentences, zero filler, with the core purpose front-loaded before the disambiguation clause. 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?

For a fetch-by-id tool with full schema coverage and annotations covering safety, this is nearly complete. The one minor gap is not stating what the returned discussion contains (notes? resolved state?), which the absence of an output schema leaves implicit.

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 project_id, merge_request_iid, discussion_id, and jmespath are all documented in the schema. The description mentions 'by id' but adds no syntax or semantic detail beyond the schema, making the baseline 3 appropriate.

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?

States a specific verb and resource ('Get a single discussion item for a merge request') and reinforces the singular scope with 'Fetch one discussion by id.' This clearly distinguishes it from the collection sibling mr_discussions and the flat-note sibling get_merge_request_note.

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 names both alternatives and the condition selecting each: 'Use `mr_discussions` for a collection and `get_merge_request_note` for a flat note.' The agent knows exactly when this tool is and is not the right choice.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.