find_cost_change_factors
Find which dimension values drove a cost change between two periods. Use when the user asks why costs changed between two periods. This is a before/after analysis — compare is required ({} auto-derives the previous window, same as query). When dimension names are unknown, discover them with suggest_groupby / search / get_context, then pass 2–4 columns (max 8). Do not invent columns. filterCel omitted or "" is unfiltered (not AWS-only). nestingEdges: a child's spend sits inside the parent — do not sum a contributor with its ancestors or descendants; independent contributors may be summed. aggregationMethod defaults to SUM; set AVG only when the user asks for an average.
Effects: Read-only retrieval or computation; does not change saved resources or send messages. Scope: Authorized Costory workspace only.
EXAMPLES:
• "Why did last month's EC2 cost change?" → { datePreset: "LAST_MONTH", compare: {}, filterCel: "cos_service_name in ["AmazonEC2"]", columns: ["cos_region", "cos_usage_type"] }
• "What drove the RDS jump in May?" → { from: "2026-05-01", to: "2026-05-31", compare: { from: "2026-04-01", to: "2026-04-30" }, filterCel: "cos_provider in ["AWS"] && cos_service_name in ["AmazonRDS"]", columns: ["cos_sub_account_id", { column: "cos_charge_description", contains: "IOPS" }] }
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"compare": "<compare>",
"columns": "<columns>"
},
"name": "find_cost_change_factors"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | Current period end (YYYY-MM-DD), inclusive. Omit when using datePreset. | |
| from | No | Current period start (YYYY-MM-DD). Omit when using datePreset. | |
| slug | No | Organization slug. Omit to auto-detect from your account (fails if you belong to multiple orgs). | |
| columns | Yes | 2–4 dimensions to investigate (max 8). Use names returned by suggest_groupby / search / get_context (e.g. "cos_service_name"), or { column, contains } for a single-token substring (e.g. { column: "cos_charge_description", contains: "GPU" }). Do not invent columns. | |
| compare | Yes | Previous period. `{}` auto-derives from the current window (same helper as query). `{ from, to }` pins it. | |
| context | No | Optional context used only for analytics; it does not affect tool execution. Omit it by default. Do not include conversation text, personal information, or workspace data. | |
| filterCel | No | Optional CEL scope. Omit or "" for unfiltered (Billy where_clause TRUE). That is not an AWS-only filter even though columns_where_clause falls back to ["cos_provider"]. String methods: field.contains("x"), field.startsWith("x"), field.endsWith("x") (method-call, not infix). Unsupported CEL functions (e.g. lowerAscii) return INVALID_QUERY. | |
| llm_model | No | The model identifier you are running as, for example "claude-opus-4-8" or "gpt-5.2". Pass "unknown" if you are not certain. Recorded for the server developer's analytics. | |
| datePreset | No | ||
| conversation_id | No | The conversation_id this server returned earlier in this conversation, unchanged, including after later user messages. Omit it if you have none. Recorded for the server developer's analytics. | |
| aggregationMethod | No | Default is SUM. Set AVG only when the user asks for an average. |