get_current_user
Retrieve details of the currently authenticated user, including email, name, roles, and accessible projects, for streamlined access management within 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
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/mcp_coroot/server.py:128-135 (registration)MCP tool registration using @mcp.tool() decorator on the get_current_user function, which delegates to the implementation.@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]
- src/mcp_coroot/server.py:118-125 (handler)Primary handler logic that invokes the Coroot client to get user info and formats the response.@handle_errors 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, }
- src/mcp_coroot/client.py:278-286 (helper)Underlying CorootClient method that performs the HTTP GET request to /api/user endpoint.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