gitlab_get_user
Retrieve detailed information about a specific user from a GitLab account by providing the user ID, facilitating user management and access control.
Instructions
Get details of a specific user
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| user_id | Yes | The ID of the user |
Input Schema (JSON Schema)
{
"properties": {
"user_id": {
"description": "The ID of the user",
"type": "number"
}
},
"required": [
"user_id"
],
"type": "object"
}
Implementation Reference
- The main handler function for the 'gitlab_get_user' tool, which retrieves user details by ID using the usersGroupsManager.export const getUser: ToolHandler = async (params, context) => { const { user_id } = params.arguments || {}; if (!user_id) { throw new McpError(ErrorCode.InvalidParams, 'user_id is required'); } const data = await context.usersGroupsManager.getUser(user_id as number); return formatResponse(data); };
- src/utils/tools-data.ts:736-748 (schema)The input schema definition for the 'gitlab_get_user' tool, specifying the required 'user_id' parameter.name: 'gitlab_get_user', description: 'Get details of a specific user', inputSchema: { type: 'object', properties: { user_id: { type: 'number', description: 'The ID of the user' } }, required: ['user_id'] } },
- src/utils/tool-registry.ts:64-64 (registration)Registration of the 'gitlab_get_user' tool mapping to the getUser handler function from usersGroupsHandlers.gitlab_get_user: usersGroupsHandlers.getUser,