Skip to main content
Glama

gitlab_get_issue_comments

Retrieve comments from a GitLab issue to track discussion and progress. Specify the project path and issue ID to access relevant feedback and updates.

Instructions

Gets comments for a GitLab issue.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectPathYesThe path of the GitLab project.
issueIidYesThe internal ID of the issue.

Implementation Reference

  • The core handler function that fetches GitLab issue comments by calling the GitLab API endpoint for notes on the specified issue.
    async getIssueComments(projectPath: string, issueIid: number): Promise<any[]> { const encodedProjectPath = encodeURIComponent(projectPath); return this.callGitLabApi<any[]>( `projects/${encodedProjectPath}/issues/${issueIid}/notes`, ); }
  • src/index.ts:2066-2080 (registration)
    Registration of the tool handler in the MCP server's CallToolRequest handler switch statement, which invokes the GitLabService method.
    case 'gitlab_get_issue_comments': { if (!gitlabService) { throw new Error('GitLab service is not initialized.'); } const { projectPath, issueIid } = args as { projectPath: string; issueIid: number }; const result = await gitlabService.getIssueComments(projectPath, issueIid); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2), }, ], }; }
  • Tool schema definition in the allTools array, specifying the name, description, and input schema for validation.
    { name: 'gitlab_get_issue_comments', description: 'Gets comments for a GitLab issue.', inputSchema: { type: 'object', properties: { projectPath: { type: 'string', description: 'The path of the GitLab project.', }, issueIid: { type: 'number', description: 'The internal ID of the issue.', }, }, required: ['projectPath', 'issueIid'], },

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/HainanZhao/mcp-gitlab-jira'

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