delete_custom_cloud_pricing
Remove custom cloud pricing overrides for a specific project, reverting to default pricing settings. Simplify cost management by eliminating manual configurations.
Instructions
Delete custom cloud pricing configuration.
Removes custom pricing overrides and reverts to default pricing.
Args: project_id: Project ID
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_id | Yes |
Implementation Reference
- src/mcp_coroot/server.py:1746-1755 (handler)MCP tool handler for delete_custom_cloud_pricing. Decorated with @mcp.tool(), it calls the implementation function which interacts with the CorootClient.@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]
- src/mcp_coroot/server.py:1734-1743 (helper)Helper implementation function that uses the CorootClient to delete the custom cloud pricing configuration.@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, }
- src/mcp_coroot/client.py:1341-1371 (helper)CorootClient method that sends the DELETE request to the Coroot API endpoint to remove custom cloud pricing for a project.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