Skip to main content
Glama

gitlab_get_current_user

Retrieve detailed profile information of the currently authenticated user on the MCP GitLab Server, including ID, permissions, and account status, to verify authentication, check capabilities, or use in automation scripts.

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 main handler function for the gitlab_get_current_user tool. It takes a GitLabClient instance and optional arguments (unused), and returns the result of client.get_current_user() which fetches the authenticated user's profile from the GitLab API.
    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()
  • Pydantic/MCP schema definition for the gitlab_get_current_user tool. Defines it as taking no input parameters and provides a description.
    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 used by the MCP server for tool dispatching.
    TOOL_GET_CURRENT_USER: handle_get_current_user,
  • Tool schema registration in the @server.list_tools() handler which provides the tool schema to MCP clients.
    name=TOOL_GET_CURRENT_USER, description=desc.DESC_GET_CURRENT_USER, inputSchema={ "type": "object", "properties": {} }
  • Constant definition for the tool name used consistently across the codebase.
    TOOL_GET_CURRENT_USER = "gitlab_get_current_user"

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/Vijay-Duke/mcp-gitlab'

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