Skip to main content
Glama

gitlab_create_merge_request_note_internal

Add a comment to a GitLab merge request with the option to mark it as an internal note, visible only to project members, for secure and targeted communication.

Instructions

Add a comment to a merge request with option to make it an internal note

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bodyYesThe content of the note/comment
internalNoIf true, the note will be marked as an internal note visible only to project members
merge_request_iidYesThe internal ID of the merge request
project_idYesThe ID or URL-encoded path of the project

Implementation Reference

  • The main handler function implementing the gitlab_create_merge_request_note_internal tool. It validates parameters, makes a POST request to the GitLab API to create a merge request note (optionally internal), and formats the response.
    export const createMergeRequestNoteInternal: ToolHandler = async (params, context) => {
      const { project_id, merge_request_iid, body, internal } = params.arguments || {};
      if (!project_id || !merge_request_iid || !body) {
        throw new McpError(ErrorCode.InvalidParams, 'project_id, merge_request_iid, and body are required');
      }
      
      const response = await context.axiosInstance.post(
        `/projects/${encodeURIComponent(String(project_id))}/merge_requests/${merge_request_iid}/notes`,
        { body, internal: internal === true }
      );
      return formatResponse(response.data);
    }; 
  • Input schema definition for the gitlab_create_merge_request_note_internal tool, specifying parameters and validation rules.
      name: 'gitlab_create_merge_request_note_internal',
      description: 'Add a comment to a merge request with option to make it an internal note',
      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'
          },
          body: {
            type: 'string',
            description: 'The content of the note/comment'
          },
          internal: {
            type: 'boolean',
            description: 'If true, the note will be marked as an internal note visible only to project members'
          }
        },
        required: ['project_id', 'merge_request_iid', 'body']
      }
    },
  • Registration of the tool handler in the central tool registry, mapping the tool name to the repoHandlers.createMergeRequestNoteInternal function.
    gitlab_create_merge_request_note_internal: repoHandlers.createMergeRequestNoteInternal,
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool adds a comment with an internal option but fails to mention critical behaviors like authentication requirements, rate limits, error conditions, or whether the action is idempotent. For a mutation tool (creating notes), this lack of transparency is a significant gap.

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?

The description is a single, efficient sentence that front-loads the core purpose and key feature (internal note option). There is no wasted wording, making it highly concise and well-structured for quick comprehension.

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 the complexity of a mutation tool (creating notes) with no annotations and no output schema, the description is incomplete. It lacks details on authentication, error handling, response format, or side effects, which are crucial for safe and effective use. The high schema coverage doesn't compensate for these behavioral gaps.

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 the schema fully documents all four parameters (body, internal, merge_request_iid, project_id). The description adds no additional semantic context beyond what's in the schema, such as examples or constraints. This meets the baseline score of 3 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.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Add a comment') and resource ('to a merge request'), and distinguishes itself from the sibling tool 'gitlab_create_merge_request_note' by specifying the 'internal note' option. This explicit differentiation makes the purpose unambiguous and distinct 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 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 the sibling 'gitlab_create_merge_request_note' (which lacks the internal option) or other commenting tools. It mentions the internal note feature but doesn't explain scenarios where internal notes are preferred over regular comments, leaving usage context implied rather than explicit.

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