Skip to main content
Glama

get_user_info

Retrieve details about the currently logged-in user, including permissions and groups, directly from the ArgoCD session for efficient access control and management.

Instructions

Get the current user's info via session/userinfo

This endpoint returns information about the currently logged-in user,
including permissions and groups.

Returns:
    User information from ArgoCD

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The asynchronous handler function for the 'get_user_info' MCP tool. It fetches the current user's information from the ArgoCD 'session/userinfo' API endpoint using the make_api_request helper and returns a dictionary with the user data or an error.
    async def get_user_info() -> Dict[str, Any]:
        """
        Get the current user's info via session/userinfo
    
        This endpoint returns information about the currently logged-in user,
        including permissions and groups.
    
        Returns:
            User information from ArgoCD
        """
        # Use the session userinfo endpoint with global setting from client.py
        success, data = await make_api_request("session/userinfo")
    
        if success:
            # Return the full user info response
            return data
        else:
            # Make sure to return a properly structured error dictionary
            return {"error": data.get("error", "Failed to retrieve user information")}
  • server.py:30-31 (registration)
    Registration of the get_user_info tool on the FastMCP server instance using the mcp.tool() decorator. The session module is imported earlier on line 16.
    # Register session service tool - only provides user info via userinfo endpoint
    mcp.tool()(session.get_user_info)
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It mentions the endpoint returns 'information about the currently logged-in user, including permissions and groups' and specifies 'User information from ArgoCD', which gives some context about the source and data scope. However, it lacks critical details: authentication requirements, rate limits, error conditions, or whether this is a read-only operation (though 'Get' implies it). For a tool with zero annotation coverage, this is insufficient.

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 appropriately concise with three sentences that each add value: stating the action, detailing what's returned, and specifying the data source. It's front-loaded with the core purpose. Minor room for improvement in flow, but overall efficient.

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

Completeness3/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 output schema, no annotations), the description is reasonably complete for a basic read operation. It explains what data is returned and the source. However, without annotations or output schema, it should ideally cover more behavioral aspects like authentication needs or response format, leaving some gaps for the agent.

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 tool has 0 parameters with 100% schema description coverage (empty schema). The description appropriately doesn't discuss parameters since none exist. This meets the baseline for tools with no parameters, as there's nothing to document beyond what the schema already indicates.

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

Purpose4/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: 'Get the current user's info via session/userinfo' - a specific verb ('Get') and resource ('current user's info'). It distinguishes from siblings like get_application_details or get_settings by focusing on user information rather than application or system data. However, it doesn't explicitly contrast with all sibling tools.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. While it's clear this retrieves user information, there's no mention of when this is needed versus other user-related operations (though none exist in the sibling list), nor any prerequisites or context for usage. The agent must infer usage from the purpose alone.

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

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/severity1/argocd-mcp'

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