Skip to main content
Glama
jamesbrink

MCP Server for Coroot

delete_custom_cloud_pricing

Remove custom cloud pricing overrides for a project to revert to default pricing configurations in the Coroot observability platform.

Instructions

Delete custom cloud pricing configuration.

Removes custom pricing overrides and reverts to default pricing.

Args: project_id: Project ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idYes

Implementation Reference

  • MCP tool registration using @mcp.tool() decorator. This defines the tool entrypoint with input schema in docstring.
    @mcp.tool()
    async def delete_custom_cloud_pricing(project_id: str) -> dict[str, Any]:
        """Delete custom cloud pricing configuration.
    
        Removes custom pricing overrides and reverts to default pricing.
    
        Args:
            project_id: Project ID
        """
        return await delete_custom_cloud_pricing_impl(project_id)  # type: ignore[no-any-return]
  • Server-side tool handler implementation that calls the CorootClient and wraps the response with success status.
    @handle_errors
    async def delete_custom_cloud_pricing_impl(project_id: str) -> dict[str, Any]:
        """Delete custom cloud pricing."""
        client = get_client()
        result = await client.delete_custom_cloud_pricing(project_id)
        return {
            "success": True,
            "message": "Custom cloud pricing deleted successfully",
            "result": result,
        }
  • Core client implementation that sends DELETE request to Coroot API endpoint /api/project/{project_id}/custom_cloud_pricing and handles various response cases.
    async def delete_custom_cloud_pricing(self, project_id: str) -> dict[str, Any]:
        """Delete custom cloud pricing configuration.
    
        Args:
            project_id: Project ID.
    
        Returns:
            Deletion status.
        """
        response = await self._request(
            "DELETE", f"/api/project/{project_id}/custom_cloud_pricing"
        )
    
        # Handle empty response (204 or empty body)
        if response.status_code == 204:
            return {"status": "deleted"}
    
        # Try to parse JSON response
        try:
            content = response.text.strip()
            if not content:
                # Empty response body with 200 status
                return {"status": "deleted"}
            data: dict[str, Any] = response.json()
            return data
        except Exception:
            # If parsing fails, assume success if status code is 2xx
            if 200 <= response.status_code < 300:
                return {"status": "deleted"}
            raise

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