Skip to main content
Glama

gitlab_get_merge_request

Retrieve detailed information about a specific GitLab merge request by providing the project ID and merge request internal ID, enabling streamlined code review and collaboration.

Instructions

Get details of a specific merge request

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
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 for gitlab_get_merge_request tool. It extracts project_id and merge_request_iid from arguments, validates them, makes a GET request to the GitLab API endpoint for the specific merge request, and formats the response.
    export const getMergeRequest: ToolHandler = async (params, context) => { const { project_id, merge_request_iid } = params.arguments || {}; if (!project_id || !merge_request_iid) { throw new McpError(ErrorCode.InvalidParams, 'project_id and merge_request_iid are required'); } const response = await context.axiosInstance.get( `/projects/${encodeURIComponent(String(project_id))}/merge_requests/${merge_request_iid}` ); return formatResponse(response.data); };
  • The input schema definition for the gitlab_get_merge_request tool, specifying required parameters project_id (string) and merge_request_iid (number).
    { name: 'gitlab_get_merge_request', description: 'Get details of a specific merge request', 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' } }, required: ['project_id', 'merge_request_iid'] }
  • Registration of the gitlab_get_merge_request tool in the central tool registry, mapping the tool name to its handler function repoHandlers.getMergeRequest.
    gitlab_get_merge_request: repoHandlers.getMergeRequest,

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