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"
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It does well by specifying what the tool returns ('Users with access levels'), what it shows ('Direct and inherited members'), and providing the access level mapping. However, it doesn't mention pagination behavior (implied by the parameters but not explicitly stated), rate limits, authentication requirements, or whether it's a read-only operation (though implied by 'List').

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured and appropriately sized. It uses clear sections with headings ('Returns:', 'Use when:', 'Shows:', 'Access levels:', 'Related tools:'), making it easy to scan. Every sentence earns its place by providing specific, useful information without redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given that this is a read operation with no annotations, 100% schema coverage, but no output schema, the description does a good job of providing context. It explains what the tool returns, when to use it, what it shows, access level mappings, and related tools. The main gap is the lack of output format details, but for a list tool with good parameter documentation, this is reasonably complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 100%, so the schema already fully documents all four parameters. The description doesn't add any parameter-specific information beyond what's in the schema. According to the scoring rules, when schema coverage is high (>80%), the baseline is 3 even with no param info in the description, which applies here.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'List project members' with specific details about what it returns ('Users with access levels') and what it shows ('Direct and inherited members'). It distinguishes itself from sibling tools like gitlab_add_project_member and gitlab_update_member_role by being a read operation, though it doesn't explicitly differentiate from other list tools like gitlab_list_projects or gitlab_list_issues.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit usage guidance: 'Use when: Finding team members, permissions' and lists related tools for adding or updating members. This gives clear context for when to use this tool versus alternatives like gitlab_add_project_member or gitlab_update_member_role. However, it doesn't specify when NOT to use it or mention other potential alternatives among the many sibling list tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

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