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

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