update_custom_cloud_pricing
Set custom pricing for cloud resources to override default costs. Provide project ID and pricing configuration.
Instructions
Update custom cloud pricing configuration.
Sets custom pricing for cloud resources to override default pricing.
Args: project_id: Project ID pricing: Custom pricing configuration
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_id | Yes | ||
| pricing | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/mcp_coroot/server.py:1719-1731 (handler)MCP tool registration (decorated with @mcp.tool()) - the public entry point that delegates to the implementation function.
@mcp.tool() async def update_custom_cloud_pricing( project_id: str, pricing: dict[str, Any] ) -> dict[str, Any]: """Update custom cloud pricing configuration. Sets custom pricing for cloud resources to override default pricing. Args: project_id: Project ID pricing: Custom pricing configuration """ return await update_custom_cloud_pricing_impl(project_id, pricing) # type: ignore[no-any-return] - src/mcp_coroot/server.py:1705-1716 (handler)Implementation function (update_custom_cloud_pricing_impl) with error handling via @handle_errors decorator. Calls the client method and formats the response.
@handle_errors async def update_custom_cloud_pricing_impl( project_id: str, pricing: dict[str, Any] ) -> dict[str, Any]: """Update custom cloud pricing.""" client = get_client() result = await client.update_custom_cloud_pricing(project_id, pricing) return { "success": True, "message": "Custom cloud pricing updated successfully", "pricing": result, } - src/mcp_coroot/client.py:1324-1339 (helper)Client method on CorootClient that performs the actual HTTP request (POST /api/project/{project_id}/custom_cloud_pricing) with the pricing payload.
async def update_custom_cloud_pricing( self, project_id: str, pricing: dict[str, Any] ) -> dict[str, Any]: """Update custom cloud pricing configuration. Args: project_id: Project ID. pricing: Custom pricing configuration. Returns: Updated pricing configuration. """ response = await self._request( "POST", f"/api/project/{project_id}/custom_cloud_pricing", json=pricing ) return self._parse_json_response(response)