update_custom_cloud_pricing
Apply custom cloud pricing configurations to override default costs for specific projects within the MCP Server for Coroot, ensuring tailored resource expense management.
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
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pricing | Yes | ||
| project_id | Yes |
Implementation Reference
- src/mcp_coroot/server.py:1719-1732 (handler)MCP tool handler function registered with @mcp.tool(). This is the entry point for the 'update_custom_cloud_pricing' tool in the FastMCP server, which delegates to the implementation helper.@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-1717 (helper)Helper implementation function that calls the CorootClient's update_custom_cloud_pricing 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)CorootClient method that makes the actual HTTP POST request to the Coroot API endpoint /api/project/{project_id}/custom_cloud_pricing to update the custom cloud pricing configuration.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)