gitlab_list_project_members
Retrieve all contributors for a GitLab project by providing a merge request URL, enabling visibility into team members involved in development.
Instructions
Lists all members (contributors) of a given GitLab project.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mrUrl | Yes | The URL of a GitLab Merge Request within the project. |
Implementation Reference
- src/index.ts:185-197 (registration)Tool registration and input schema definition for gitlab_list_project_members.name: 'gitlab_list_project_members', description: 'Lists all members (contributors) of a given GitLab project.', inputSchema: { type: 'object', properties: { mrUrl: { type: 'string', description: 'The URL of a GitLab Merge Request within the project.', }, }, required: ['mrUrl'], }, },
- src/index.ts:1322-1336 (handler)Handler implementation that extracts mrUrl from arguments, parses it to get projectPath using the service, fetches members, and returns JSON.case 'gitlab_list_project_members': { if (!gitlabService) { throw new Error('GitLab service is not initialized.'); } const { mrUrl } = args as { mrUrl: string }; const result = await gitlabService.listProjectMembersFromMrUrl(mrUrl); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2), }, ], }; }
- src/gitlab.service.ts:417-420 (helper)Convenience helper that parses MR URL to extract project path and delegates to listProjectMembers.async listProjectMembersFromMrUrl(mrUrl: string): Promise<any[]> { const { projectPath } = this.parseMrUrl(mrUrl, this.config.url); return this.listProjectMembers(projectPath); }
- src/gitlab.service.ts:409-414 (helper)Core helper function that calls GitLab API endpoint /projects/{projectPath}/members/all to list all project members.async listProjectMembers(projectPath: string): Promise<any[]> { const encodedProjectPath = encodeURIComponent(projectPath); return this.callGitLabApi<any[]>( `projects/${encodedProjectPath}/members/all`, ); }