Skip to main content
Glama

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
NameRequiredDescriptionDefault
mrUrlYesThe 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'],
      },
    },
  • 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),
          },
        ],
      };
    }
  • 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);
    }
  • 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`,
      );
    }

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