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)

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