Skip to main content
Glama
jamesbrink

MCP Server for Coroot

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
NameRequiredDescriptionDefault
user_dataYes

Implementation Reference

  • 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]
  • 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,
        }
  • 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

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