Skip to main content
Glama

gitlab_list_project_members

List project members and their access levels to manage team permissions and identify users with direct or inherited access.

Instructions

List project members Returns: Users with access levels Use when: Finding team members, permissions Shows: Direct and inherited members

Access levels:

  • 10: Guest

  • 20: Reporter

  • 30: Developer

  • 40: Maintainer

  • 50: Owner

Related tools:

  • gitlab_add_project_member: Add member

  • gitlab_update_member_role: Change access

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idNoProject identifier (auto-detected if not provided) Type: integer OR string Format: numeric ID or 'namespace/project' Optional: Yes - auto-detects from current git repository Examples: - 12345 (numeric ID) - 'gitlab-org/gitlab' (namespace/project path) - 'my-group/my-subgroup/my-project' (nested groups) Note: If in a git repo with GitLab remote, this can be omitted
queryNoSearch query Type: string Format: Free text search Searches in: Usernames, names, emails Matching: Partial, case-insensitive Examples: - 'john' (finds 'john', 'johnny', 'Johnson') - 'admin' (finds users with admin in name) - 'example.com' (finds users with that email domain)
per_pageNoNumber of results per page Type: integer Range: 1-100 Default: 20 Example: 50 (for faster browsing) Tip: Use smaller values (10-20) for detailed operations, larger (50-100) for listing
pageNoPage number for pagination Type: integer Range: ≥1 Default: 1 Example: 3 (to get the third page of results) Note: Use with per_page to navigate large result sets

Implementation Reference

  • The core handler function for the 'gitlab_list_project_members' tool. It resolves the project ID (auto-detecting from git if not provided), extracts optional query, per_page, and page parameters, then calls the GitLabClient's get_project_members method to fetch and return the list of project members.
    def handle_get_project_members(client: GitLabClient, arguments: Optional[Dict[str, Any]]) -> Dict[str, Any]: """Handle getting project members""" project_id = require_project_id(client, arguments) query = get_argument(arguments, "query") per_page = get_argument(arguments, "per_page", DEFAULT_PAGE_SIZE) page = get_argument(arguments, "page", 1) return client.get_project_members(project_id, query, per_page, page)
  • The input schema and description for the tool, defining parameters: project_id (string), query (string for searching members), per_page (int, default 50), page (int, default 1). Returned by @server.list_tools().
    name=TOOL_LIST_PROJECT_MEMBERS, description=desc.DESC_LIST_PROJECT_MEMBERS, inputSchema={ "type": "object", "properties": { "project_id": {"type": "string", "description": desc.DESC_PROJECT_ID}, "query": {"type": "string", "description": desc.DESC_QUERY}, "per_page": {"type": "integer", "description": desc.DESC_PER_PAGE, "default": DEFAULT_PAGE_SIZE, "minimum": 1, "maximum": MAX_PAGE_SIZE}, "page": {"type": "integer", "description": desc.DESC_PAGE_NUMBER, "default": 1, "minimum": 1} } }
  • Registration of the handler function in the TOOL_HANDLERS dictionary, which maps tool names to their handler functions. Used by server.call_tool() to dispatch calls.
    TOOL_LIST_PROJECT_MEMBERS: handle_get_project_members,
  • Tool dispatch logic in @server.call_tool(). Looks up handler by name from TOOL_HANDLERS, executes it with GitLabClient and arguments, handles the result.
    handler = TOOL_HANDLERS.get(name) if not handler: raise ValueError(f"Unknown tool: {name}") # Execute the handler result = handler(client, arguments)
  • Constant definition for the tool name string, used consistently across handler mapping, schema registration, and tests.
    TOOL_LIST_PROJECT_MEMBERS = "gitlab_list_project_members"

Other Tools

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/Vijay-Duke/mcp-gitlab'

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