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"
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It implies a read-only operation by using 'Get' and lists return fields, but does not disclose behavioral traits like authentication requirements, rate limits, error handling, or whether it's idempotent. The example response adds some context but lacks operational details.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with a clear purpose statement, bulleted details, use cases, and an example, all in a compact format. Every sentence adds value, but it could be slightly more concise by integrating the example into the bullet points or reducing redundancy in the use cases.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (0 parameters, no annotations, no output schema), the description is quite complete. It explains what the tool does, what it returns, and when to use it. However, it lacks some behavioral context (e.g., authentication needs, error cases), which prevents a perfect score despite the low complexity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description appropriately focuses on output semantics by listing return fields and providing an example, adding value beyond the schema. A baseline of 4 is given since no parameters exist, and the description compensates well for the lack of output schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with a specific verb ('Get') and resource ('currently authenticated user's profile'), distinguishing it from sibling tools like 'gitlab_get_user' or 'gitlab_get_my_profile' by specifying it returns the authenticated user's own data. The detailed bullet points reinforce what information is retrieved.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit use cases (e.g., 'Verify authentication is working', 'Get user context for automation scripts'), which offer clear guidance on when to use this tool. However, it does not explicitly state when not to use it or name specific alternatives among siblings, such as 'gitlab_get_user' for other users' data.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

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