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
| Name | Required | Description | Default |
|---|---|---|---|
| projectPath | Yes | The path of the GitLab project. | |
| issueIid | Yes | The internal ID of the issue. |
Implementation Reference
- src/gitlab.service.ts:717-722 (handler)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), }, ], }; }
- src/index.ts:966-982 (schema)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'], },