update_current_user
Modify profile details for the authenticated user in the Coroot observability platform.
Instructions
Update current user information.
Updates the profile of the currently authenticated user.
Args: user_data: Updated user information
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| user_data | Yes |
Implementation Reference
- src/mcp_coroot/server.py:1603-1612 (handler)Primary MCP tool handler for 'update_current_user'. Registered via @mcp.tool() decorator. Defines input schema via type hints (user_data: dict[str, Any]) and docstring. Delegates execution to the internal _impl function.@mcp.tool() async def update_current_user(user_data: dict[str, Any]) -> dict[str, Any]: """Update current user information. Updates the profile of the currently authenticated user. Args: user_data: Updated user information """ return await update_current_user_impl(user_data) # type: ignore[no-any-return]
- src/mcp_coroot/server.py:1593-1600 (helper)Internal helper function that handles error wrapping and calls CorootClient.update_current_user, formatting the success response.async def update_current_user_impl(user_data: dict[str, Any]) -> dict[str, Any]: """Update current user.""" result = await get_client().update_current_user(user_data) return { "success": True, "message": "User updated successfully", "user": result, }
- src/mcp_coroot/client.py:1255-1271 (helper)CorootClient method implementing the core logic: HTTP POST to /api/user with user_data JSON body, returns the API response.async def update_current_user(self, user_data: dict[str, Any]) -> dict[str, Any]: """Update current user information. Args: user_data: User data to update. For password change: {"old_password": "current", "new_password": "new"} Returns: Updated user information. """ response = await self._request( "POST", "/api/user", json=user_data, ) data: dict[str, Any] = response.json() return data