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,

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