Skip to main content
Glama
mungowang
by mungowang

gitlab_mr_comment

Post a comment on a GitLab merge request. Use the line-comment tool instead when commenting on a specific diff line.

Instructions

Post a comment on the merge request itself. For a comment on a specific line of the diff, use gitlab_mr_comment_on_line so it appears in the changed line's thread.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
iidYesproject-scoped internal id - the number in !123 for a merge request or #123 for an issue, not the global id
bodyYescomment text (GitLab Flavored Markdown)
projectYesproject id ('42') or full path ('group/subgroup/app'); a path is URL-encoded for you

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNo
bodyNo
typeNo
authorNouser reference
systemNotrue for GitLab-generated notes (labels, pushes, state changes)
positionNopresent on diff notes; carries new_path/new_line/old_line
resolvedNo
created_atNo
resolvableNotrue when this note can be resolved - only diff notes usually are
updated_atNo
noteable_typeNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4/5.0
Behavior3/5

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

Annotations declare readOnlyHint=false, so the agent knows this is a write. The description adds that the comment attaches to the MR itself rather than a diff thread, which is meaningful behavioral context. However, it says nothing about permissions, editability, or side effects beyond the schema and annotations, so it is adequate rather than rich.

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 sentences with zero filler. The primary action is front-loaded and the disambiguation follows immediately, so 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?

With a full output schema present, the description need not explain return values, and all three parameters are schema-documented. The only minor gap is that it does not mention adjacent comment tools like gitlab_mr_reply, but for a three-parameter comment tool the description is complete enough to invoke correctly.

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 iid, body, and project are already documented in the schema (including the project-scoped iid clarification). The description adds no additional parameter meaning beyond what the schema provides, so the baseline of 3 applies.

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 ('Post a comment on the merge request itself') and immediately contrasts with the sibling that handles the other case (line-level comments). An agent can distinguish it from gitlab_mr_comment_on_line without opening either schema.

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

Usage Guidelines4/5

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

Explicitly names the alternative (gitlab_mr_comment_on_line) and the condition that selects it (commenting on a specific line of the diff). It does not address the other comment-adjacent siblings (gitlab_mr_reply, gitlab_mr_discussions), but the routing guidance given is clear and actionable.

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