Skip to main content
Glama

gitlab_update_merge_request

Modify the title and description of a GitLab merge request using the internal ID and project identifier. Simplifies updating merge request details within GitLab MCP Server.

Instructions

Update a merge request title and description

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
descriptionNoThe description of the merge request
merge_request_iidYesThe internal ID of the merge request
project_idYesThe ID or URL-encoded path of the project
titleNoThe title of the merge request

Implementation Reference

  • The main handler function that implements the logic for updating a GitLab merge request's title and/or description by making a PUT request to the GitLab API.
    export const updateMergeRequest: ToolHandler = async (params, context) => {
      const { project_id, merge_request_iid, title, description } = params.arguments || {};
      if (!project_id || !merge_request_iid) {
        throw new McpError(ErrorCode.InvalidParams, 'project_id and merge_request_iid are required');
      }
      
      if (!title && !description) {
        throw new McpError(ErrorCode.InvalidParams, 'At least one of title or description is required');
      }
      
      const response = await context.axiosInstance.put(
        `/projects/${encodeURIComponent(String(project_id))}/merge_requests/${merge_request_iid}`,
        { title, description }
      );
      return formatResponse(response.data);
    };
  • The tool schema definition specifying the input parameters, descriptions, and requirements for the gitlab_update_merge_request tool.
    {
      name: 'gitlab_update_merge_request',
      description: 'Update a merge request title and description',
      inputSchema: {
        type: 'object',
        properties: {
          project_id: {
            type: 'string',
            description: 'The ID or URL-encoded path of the project'
          },
          merge_request_iid: {
            type: 'number',
            description: 'The internal ID of the merge request'
          },
          title: {
            type: 'string',
            description: 'The title of the merge request'
          },
          description: {
            type: 'string',
            description: 'The description of the merge request'
          }
        },
        required: ['project_id', 'merge_request_iid']
      }
    },
  • The registration entry in the tool registry that maps the tool name 'gitlab_update_merge_request' to its handler function repoHandlers.updateMergeRequest.
    gitlab_update_merge_request: repoHandlers.updateMergeRequest,
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states 'Update' which implies mutation, but fails to describe permissions required, whether changes are reversible, rate limits, or what happens to unspecified fields. For a mutation tool with zero annotation coverage, this is a significant gap in transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose without unnecessary words. It's appropriately sized and front-loaded, though it could be slightly more informative without sacrificing brevity.

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

Completeness2/5

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

Given this is a mutation tool with no annotations and no output schema, the description is incomplete. It lacks behavioral details (e.g., permissions, side effects), usage context, and output expectations, leaving significant gaps for an AI agent to understand how to invoke it 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?

The schema description coverage is 100%, so the schema already documents all 4 parameters (project_id, merge_request_iid, title, description) with clear descriptions. The description adds no additional meaning beyond implying that title and description are updatable, which is already evident from the schema. Baseline 3 is appropriate when the schema does the heavy lifting.

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?

The description clearly states the action ('Update') and the resource ('a merge request title and description'), making the purpose understandable. However, it doesn't differentiate from sibling tools like gitlab_update_cicd_variable or gitlab_update_webhook beyond the resource type, missing explicit sibling distinction.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing an existing merge request), exclusions, or comparisons to siblings like gitlab_get_merge_request or gitlab_create_merge_request_note, leaving usage context unclear.

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

Related 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/rifqi96/mcp-gitlab'

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