Skip to main content
Glama

get_current_user

Retrieve authenticated user details including email, roles, and accessible projects from the Coroot observability platform.

Instructions

Get current authenticated user information.

Returns information about the currently authenticated user including their email, name, roles, and accessible projects.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • MCP tool handler function for 'get_current_user'. This is the entry point registered with FastMCP that executes the tool logic by calling the implementation wrapper.
    @mcp.tool() async def get_current_user() -> dict[str, Any]: """Get current authenticated user information. Returns information about the currently authenticated user including their email, name, roles, and accessible projects. """ return await get_current_user_impl() # type: ignore[no-any-return]
  • Low-level CorootClient method that implements the core logic: makes authenticated GET request to /api/user endpoint and returns the parsed user data.
    async def get_current_user(self) -> dict[str, Any]: """Get current authenticated user information. Returns: User information dictionary. """ response = await self._request("GET", "/api/user") data: dict[str, Any] = response.json() return data
  • Registration of the 'get_current_user' tool using FastMCP @mcp.tool() decorator, which handles schema inference from signature and docstring.
    @mcp.tool() async def get_current_user() -> dict[str, Any]: """Get current authenticated user information. Returns information about the currently authenticated user including their email, name, roles, and accessible projects. """ return await get_current_user_impl() # type: ignore[no-any-return]
  • Implementation wrapper that calls the client method, adds success wrapper, and is decorated with error handler.
    async def get_current_user_impl() -> dict[str, Any]: """Get current authenticated user information.""" user = await get_client().get_current_user() return { "success": True, "user": user, }

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/jamesbrink/mcp-coroot'

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