cloudsealed_analyze_billing_waste
Detect cost anomalies in cloud billing exports and identify wasted spend with robust statistical analysis. Get actionable savings recommendations from AWS, GCP, or Azure CSV data.
Instructions
Detect cost anomalies in a cloud billing export (AWS/GCP/Azure/generic).
Models the expected daily spend for each day as a rolling-median baseline times a day-of-week factor, then flags days whose actual spend deviates from that baseline by a robust (median-absolute-deviation-based) modified z-score. This is resistant to the "masking effect" that causes textbook mean+standard-deviation detectors to miss anomalies once a few large spikes have inflated the standard deviation. It does NOT call any cloud provider API — the caller must already have exported the billing data to a CSV/text string and pass its contents directly.
Args: params (AnalyzeBillingWasteInput): Validated input containing: - csv_content (str): Raw billing export text (see field description for supported provider formats). - analysis_type (AnalysisType): 'waste-audit' (default), 'cost-forecast', or 'efficiency'. - response_format (ResponseFormat): 'markdown' (default) or 'json'.
Returns: str: Markdown report, or a JSON object with this schema: { "anomalies": [ {"date": str, "expectedCost": float, "actualCost": float, "deviation": float, "zScore": float, "severity": "LOW"|"MEDIUM"|"HIGH"|"CRITICAL", "description": str} ], "metrics": {"averageDailyCost": float, "stdDeviation": float, "sharpeRatio": float, "wastePercentage": float}, "recommendations": [ {"title": str, "description": str, "potentialSavings": float, "effort": "LOW"|"MEDIUM"|"HIGH"} ], "summary": str }
Error response: "Error: <message>" when the CSV cannot be parsed
(e.g. no recognizable date/cost columns).Examples: - Use when: "Why did our AWS bill spike last month?" -> paste the CUR export contents as csv_content. - Use when: "What will we spend next month at this rate?" -> analysis_type="cost-forecast". - Don't use when: you need architecture/reliability risk instead of cost — use cloudsealed_score_architecture_risk.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |