gitlab_get_user_details
Retrieve detailed GitLab user activity, contributions, and profile information for performance reviews, team insights, or contributor analysis. Supports user ID or username as input.
Instructions
Get comprehensive activity summary and contributions for a specific user.
Returns detailed information about a user's GitLab activity including recent contributions, project involvement, and activity statistics. Use this tool when you need detailed insights into a user's GitLab activity and contributions.
Examples:
Performance reviews: get_user_details(user_id=123)
Team member activity overview
Contributor analysis for projects
For basic user profile info, use 'gitlab_get_user' instead. For finding users by search, use 'gitlab_search_user' instead.
Returns extended user information:
Profile: name, bio, location, company
Statistics: public projects, contribution stats
Activity: last sign-in, creation date
Settings: timezone, preferred language
Social: website, LinkedIn, Twitter links
Use cases:
Review team member profiles
Gather user context for collaboration
Audit user activity and contributions
Display rich user information in tools
Parameters:
user_id: Numeric user ID
username: Username string (use either user_id or username)
Example: Get user details by username
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| user_id | No | Numeric user ID | |
| username | No | Username string |
Implementation Reference
- src/mcp_gitlab/tool_handlers.py:669-675 (handler)The core handler function that processes arguments and delegates to GitLabClient.get_user_details() to fetch comprehensive user profile information.def handle_get_user_details(client: GitLabClient, arguments: Optional[Dict[str, Any]]) -> Dict[str, Any]: """Handle getting comprehensive user profile""" user_id = get_argument(arguments, "user_id") username = get_argument(arguments, "username") return client.get_user_details(user_id=user_id, username=username)
- Pydantic/MCP schema definition specifying input parameters (username required, optional project/group inclusion) for the tool.types.Tool( name=TOOL_GET_USER_DETAILS, description=desc.DESC_GET_USER_DETAILS, inputSchema={ "type": "object", "properties": { "username": {"type": "string", "description": "Username string"}, "include_projects": {"type": "boolean", "description": "Include user's projects", "default": False}, "include_groups": {"type": "boolean", "description": "Include user's groups", "default": False} }, "required": ["username"] } ),
- src/mcp_gitlab/tool_handlers.py:1074-1075 (registration)Registration of the handler function in the central TOOL_HANDLERS dictionary, mapping tool name to its execution handler. Used by server.py to dispatch calls.TOOL_GET_USER_DETAILS: handle_get_user_details, TOOL_GET_MY_PROFILE: handle_get_my_profile,
- src/mcp_gitlab/server.py:981-991 (registration)Tool schema and metadata registration exposed via MCP @server.list_tools() endpoint for tool discovery.types.Tool( name=TOOL_GET_USER_DETAILS, description=desc.DESC_GET_USER_DETAILS, inputSchema={ "type": "object", "properties": { "user_id": {"type": "string", "description": "Numeric user ID"}, "username": {"type": "string", "description": "Username string"} } } ),
- src/mcp_gitlab/constants.py:252-252 (helper)Constant definition of the canonical tool name string used across modules for consistency.TOOL_GET_USER_DETAILS = "gitlab_get_user_details"