Skip to main content
Glama
chntif
by chntif

workflow_review_mr_post_comment

Post an AI-generated review comment on a GitLab merge request. After preparing review context, use this tool to submit the final comment and optionally approve the MR.

Instructions

Two-step MR review workflow. Step 1: call with prepare_review_context=true to fetch review_prompt + diffs for LLM review. Step 2: let the LLM inspect that context, then call again with review_comment_body to post the final review comment (optional approval).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
code_project_idNoCode project ID. Omit this field unless the user explicitly provided a value. When omitted, the current runtime config value is used (WORKFLOW_CODE_PROJECT_ID overrides the built-in default when configured). If the runtime config is still unset, the tool returns a missing-parameter error. Do not infer or auto-generate this value.
mr_iidYesMerge request IID.
review_comment_bodyNoStep 2 of 2. Final review comment markdown body, generated after the LLM inspects prepared_review.review_prompt + prepared_review.diffs from the prepare step.
prepare_review_contextNoStep 1 of 2. When true, do not post a comment. Return concise review prompt text plus MR diff context for an external LLM. After the LLM generates review_comment_body, call this tool again without prepare_review_context to post the comment.
review_summaryNoShort review summary used when review_comment_body is missing.
include_changesNoWhether to include changed files list in generated review comment.
include_existing_notesNoWhether to load existing MR notes and include count in generated comment.
approveNoWhether to approve MR after posting review comment.
shaNoOptional expected MR HEAD SHA when approve=true.
max_changed_filesNoMaximum number of changed files included in prepared review context. Default 20.
max_diff_chars_per_fileNoMaximum diff characters returned per file in prepared review context. Default 12000.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYesWhether the tool call succeeded.
toolYesTool name.
dataNoReview merge request and create comment workflow result.
error_typeNoError type when ok=false.
messageNoError message when ok=false.
Behavior3/5

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

No annotations are provided, so the description carries full burden. It discloses the two-step behavior, returns of step 1 (review_prompt + diffs), and the posting of comments with optional approval. It lacks details on idempotency, error handling (e.g., both step parameters provided), auth requirements, or rate limits, leaving some behavioral gaps.

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 well-structured sentences that front-load the critical two-step workflow information. No redundant or verbose content. Every sentence serves a purpose.

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?

Given the complexity (11 parameters, two-step workflow), the description covers the core workflow and key behaviors. An output schema exists (not shown) but the description explains step 1's return. Lacks details on error conditions (e.g., invalid parameter combinations) and edge cases, but overall sufficient for an AI agent to use the tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3. The description adds value by explaining the workflow roles of key parameters (prepare_review_context and review_comment_body as steps) and the approval parameter, which goes beyond the schema's individual field descriptions. This clarifies how parameters interact in the two-step process.

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 defines the tool as a two-step MR review workflow, with specific verbs ('fetch review_prompt + diffs' and 'post the final review comment') and distinct resources. It differentiates from siblings like gitlab_approve_mr and gitlab_create_mr_note by combining review generation and comment posting in a workflow.

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?

The description explicitly outlines the two-step process (Step 1 with prepare_review_context, Step 2 with review_comment_body) and mentions optional approval. However, it does not explicitly state when to avoid this tool (e.g., for simple approval, use gitlab_approve_mr), though this is implied by sibling tools.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/chntif/mcp-gitlab-workflow'

If you have feedback or need assistance with the MCP directory API, please join our Discord server