Skip to main content
Glama

gitlab_add_project_member

Assign a user to a GitLab project with specified access level. Use this tool to manage project permissions by providing project ID, user ID, and access level (Guest, Reporter, Developer, Maintainer, Owner).

Instructions

Add a user to a project

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
access_levelYesAccess level (10=Guest, 20=Reporter, 30=Developer, 40=Maintainer, 50=Owner)
project_idYesThe ID or URL-encoded path of the project
user_idYesThe ID of the user

Implementation Reference

  • The handler function that implements the core logic for the 'gitlab_add_project_member' tool. It validates required parameters (project_id, user_id, access_level) and calls the underlying usersGroupsManager to add the member.
    export const addProjectMember: ToolHandler = async (params, context) => {
      const { project_id, user_id, access_level, expires_at } = params.arguments || {};
      if (!project_id || !user_id || !access_level) {
        throw new McpError(ErrorCode.InvalidParams, 'project_id, user_id, and access_level are required');
      }
      
      const data = await context.usersGroupsManager.addProjectMember(
        project_id as string | number,
        user_id as number,
        access_level as number,
        expires_at as string | undefined
      );
      return formatResponse(data);
    }; 
  • The input schema definition for the 'gitlab_add_project_member' tool, specifying parameters like project_id, user_id, and access_level with types, descriptions, and required fields.
    {
      name: 'gitlab_add_project_member',
      description: 'Add a user to a project',
      inputSchema: {
        type: 'object',
        properties: {
          project_id: {
            type: 'string',
            description: 'The ID or URL-encoded path of the project'
          },
          user_id: {
            type: 'number',
            description: 'The ID of the user'
          },
          access_level: {
            type: 'number',
            description: 'Access level (10=Guest, 20=Reporter, 30=Developer, 40=Maintainer, 50=Owner)',
            enum: [10, 20, 30, 40, 50]
          }
        },
        required: ['project_id', 'user_id', 'access_level']
      }
    }
  • Registration of the 'gitlab_add_project_member' tool in the central tool registry, mapping the tool name to its handler function usersGroupsHandlers.addProjectMember.
    gitlab_add_project_member: usersGroupsHandlers.addProjectMember
Behavior2/5

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

With no annotations provided, the description carries full burden but only states the basic action. It doesn't disclose behavioral traits like required permissions, whether this is idempotent, what happens if the user is already a member, error conditions, or rate limits. For a mutation tool with zero annotation coverage, this is insufficient.

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 a single, efficient sentence that gets straight to the point with zero wasted words. It's appropriately sized for this tool's complexity and front-loads the essential information.

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

Completeness2/5

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

For a mutation tool with no annotations and no output schema, the description is incomplete. It doesn't explain what the tool returns, error conditions, permissions needed, or how it differs from similar tools. Given the complexity of adding members with specific access levels, more context would be helpful.

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?

Schema description coverage is 100%, with all three parameters well-documented in the schema itself. The description adds no additional parameter information beyond what's already in the structured schema, so it meets the baseline expectation but doesn't provide extra value.

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 'Add a user to a project' clearly states the action (add) and resource (user to project), making the purpose immediately understandable. However, it doesn't differentiate from sibling 'gitlab_add_group_member' which has a similar structure but different scope, missing explicit distinction.

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

Usage Guidelines2/5

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

No guidance is provided about when to use this tool versus alternatives like 'gitlab_add_group_member' or 'gitlab_list_project_members'. The description states what it does but offers no context about appropriate scenarios, prerequisites, or exclusions.

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

Related 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/rifqi96/mcp-gitlab'

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