Summarize metric changes
summarize_metric_changesUse this when the user wants a quick period-over-period (week over week, month over month) change table for their metrics without a PDF: "what changed vs last month", "month over month change", "calculate % change for these KPIs". Takes the same inputs as generate_client_report (typed pairs, a pasted table or a CSV/Excel export with dates) and returns absolute and % changes, rates recomputed from totals, computed highlights, and Excel and CSV files. Use generate_client_report when the user wants a client-ready PDF report. Does not connect to analytics accounts and does not explain why numbers changed.
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": "summarize_metric_changes"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | Optional: a pasted CSV/TSV table instead of metrics. Either a daily or weekly export with a Date column and metric columns (e.g. "Date,Sessions,Clicks,Impressions\n2026-10-01,410,22,1900"), or a Metric | This month | Last month table. | |
| file | No | Optional: an uploaded CSV or Excel (.xlsx) export, e.g. ga4-sessions.csv, search-console-dates.csv, meta-ads.xlsx or shopify-sales.csv. A Date column plus metric columns, or a Metric | This period | Previous period table. | |
| period | No | Optional for exports with dates: week, month, quarter or auto (default). auto compares calendar months when the data covers whole months, otherwise the latest half of the dates against the half before. Example: month. | |
| metrics | No | The metrics, this period and the previous period. Any of: a list like [{"name":"Sessions","current":12400,"previous":10900},{"name":"Revenue","current":"$8,450","previous":"$7,900"}]; an object like {"Sessions":[12400,10900]}; or text like "Sessions: 12,400 vs 10,900; Clicks 1,180 vs 1,010". Values may be strings with $, %, k or commas. Optional fields per metric: format (number, money, percent, ratio, duration), higher_is_better (false for cost per click, bounce rate). | |
| currency | No | Optional: currency for money metrics without a symbol, e.g. USD, EUR, GBP. Default USD. | |
| date_order | No | Optional: MDY (US, default) or DMY for dates such as 03/10/2026. | |
| pair_order | No | Optional: current_first (default: "Sessions 1200 1000" means 1,200 now, 1,000 before) or previous_first. Words such as vs, from ... to, or column headers like This month / Last month always win. | |
| current_period | No | Optional: dates of this period, e.g. "2026-10-01 to 2026-10-31" or "Oct 2026". Used to split a dated export and as the label in the report. | |
| lower_is_better | No | Optional: metric names where a decrease is good, beyond the built-in ones (cost per click, CPA, CPM, bounce rate, position, churn), e.g. ["Refund requests"]. | |
| previous_period | No | Optional: dates or label of the previous period, e.g. "Sep 2026". Default: the same length right before current_period. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | Yes | ||
| client | Yes | ||
| counts | Yes | ||
| period | Yes | ||
| metrics | Yes | ||
| headline | Yes | ||
| warnings | Yes | ||
| downloads | Yes | ||
| highlights | Yes | ||
| assumptions | Yes |