Skip to main content
Glama

create_diff_discussion

Post inline code review comments on a specific file and line in a GitLab merge request, with merge request SHAs resolved automatically.

Instructions

Post an inline code review comment on a specific line and file in an MR (resolves SHAs automatically)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bodyYesMarkdown review comment or suggestion
lineYesLine number in the file to attach the review comment to
file_pathYesPath to the file being reviewed (e.g. 'src/client.js')
line_typeYesWhether the line is in the new version ('new') or old version ('old') of the diff (default: new)new
project_idYesProject numeric ID (e.g. 31) or namespace path (e.g. 'group/project-name'). URL-encoding is handled automatically.
merge_request_iidYesMerge request IID

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does disclose one genuinely useful behavioral trait: 'resolves SHAs automatically,' which explains the diff-position bookkeeping. It omits other relevant behavior for a mutation tool such as required permissions, what is returned (e.g. a discussion/note ID), and failure modes when the line is not in the diff.

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?

A single, front-loaded sentence that names the action, the anchor point, and a key behavioral aside with zero filler. Nothing is wasted and the most important information comes first.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 6-parameter mutation tool with no annotations and no output schema, the description is minimal but the schema fully documents inputs. It leaves gaps around authorization, the return value (discussion identifier), and error behavior, so it is adequate rather than complete.

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 all six parameters are already documented in the schema, including the line_type enum and the project_id dual-format. The description adds no parameter-level meaning beyond that, so it sits at the baseline 3.

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 ('Post an inline code review comment') with the exact target objects ('a specific line and file in an MR'), which clearly separates it from the general-purpose sibling create_merge_request_note. It stops short of naming that sibling or other discussion tools explicitly, so it is clear but not fully differentiated from alternatives.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The 'inline code review comment' framing implies when this is used (line-anchored review feedback rather than a general MR note), giving implied usage. However, it never states when to prefer it over create_merge_request_note, reply_merge_request_discussion, or resolve tools, and lists no prerequisites.

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