Get Weekly Cost Slices
get_weekly_cost_slicesReturn weekly per-service cost slices (weeklyByServiceLast12) plus the month-over-month by-service comparison from the cost-dashboard anomalies view, for the trailing ~12+ weeks. The data is scoped per provider: OMIT provider for all cloud providers combined (AWS + Azure + GCP — the backend default), or pass "aws", "azure", "gcp", "snowflake", "anthropic", or "openai" to get one provider's weekly slices instead. Use this to chart spend trends and spot week-over-week or month-over-month swings. Filter with service and/or account_id; cap with limit (newest weeks first). Read-only — never modifies anything. Example: { "provider": "azure", "limit": 100 } returns Azure weekly per-service costs; { "service": "AmazonRDS" } returns the AWS RDS trend and its MoM baseline-vs-current comparison.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_weekly_cost_slices"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Max weekly slice rows to return after filtering (default 500). Newest weeks first. | |
| service | No | Filter the weekly slices to a single service by its provider-native name (e.g. "AmazonRDS", "AmazonEC2" on AWS). Matches the `awsService` field exactly (a legacy field name — under a non-AWS provider scope it carries that provider's service names). | |
| provider | No | Provider scope for the anomaly data: "aws", "azure", "gcp", "snowflake", "anthropic", or "openai". OMIT = every connected provider combined (the backend default for the anomalies view). Pass a provider to analyze only that provider's cost movement. One provider per call. | |
| account_id | No | Filter to a single linked AWS account (by account name as the payload exposes it). Note: by-service weekly rollup rows often carry a null account. | |
| response_format | No | concise = the weekly slices + the MoM-by-service comparison (default). detailed = the full parsed anomalies payload (the weekly slices still honor service/account_id/limit). | concise |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tool | No | Which tool truncated (only on a truncated result). | |
| filters | No | The service / account filters applied. | |
| message | No | How to narrow the request (only on a truncated result). | |
| currency | No | The organization's display currency. | |
| momPeriod | No | The month-over-month comparison window { start, end }. | |
| truncated | No | Present and true when the result exceeded the output-size budget and was WITHHELD. When you see this, no data fields are present — narrow the request as `message` says and call again. | |
| lastUpdated | No | When the underlying cost data was last ingested. | |
| approx_chars | No | Approximate size of the withheld result (only on a truncated result). | |
| momByService | No | Per-service month-over-month rows — `service`, `baselineAvg`, `currentCost`, `pctChange`. | |
| weeklySlices | No | Weekly per-service rows — `week`, `accountName`, `awsService`, `totalCost` — newest first. | |
| providerScope | No | The provider scope, or "all". | |
| returnedSlices | No | How many were returned. | |
| weeklySliceCount | No | How many slices matched before `limit`. | |
| weeklyByServiceLast12 | No | The same filtered + capped slices, on the full payload (detailed only). |