Skip to main content
Glama

gitlab_get_current_user

Retrieve the authenticated user's profile from GitLab to verify authentication, access user context for automation, and check permissions and account details.

Instructions

Get the currently authenticated user's profile Returns comprehensive information about the authenticated user including:

  • Basic info: ID, username, name, email

  • Profile details: bio, organization, job title

  • Account status: state, creation date, admin status

  • Permissions: can_create_group, can_create_project

  • Security: two_factor_enabled, external status

Use cases:

  • Verify authentication is working

  • Get user context for automation scripts

  • Check user permissions and capabilities

  • Display user info in applications

Example response: {'id': 123, 'username': 'johndoe', 'name': 'John Doe', ...}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The core handler function that implements the tool logic by delegating to the GitLabClient's get_current_user() method.
    def handle_get_current_user(client: GitLabClient, arguments: Optional[Dict[str, Any]]) -> Dict[str, Any]: """Handle getting the current authenticated user""" return client.get_current_user()
  • The tool schema definition, specifying no input parameters as this tool requires none.
    name=TOOL_GET_CURRENT_USER, description=desc.DESC_GET_CURRENT_USER, inputSchema={ "type": "object", "properties": {} } ),
  • Registration of the handler function in the TOOL_HANDLERS dictionary mapping tool name to handler.
    TOOL_GET_CURRENT_USER: handle_get_current_user, TOOL_GET_USER: handle_get_user,
  • Constant definition for the tool name used across the codebase.
    TOOL_GET_CURRENT_USER = "gitlab_get_current_user"

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