Generate client report
generate_client_reportUse this when the user wants a weekly or monthly client report, a monthly marketing report, a KPI report or a client report template filled with their numbers: metrics for this period and the previous period, typed ("Sessions 12,400 vs 10,900"), pasted as a table, or an uploaded CSV/Excel export with a date column (Google Analytics, Search Console, Meta Ads, Shopify). Returns the changes (absolute and %), rates recomputed from totals (CTR = clicks / impressions), highlights stated from the computed changes only, and a client-ready PDF (title, client, period, KPI tiles with arrows, change chart, optional notes from the user) plus Excel and CSV. Does not connect to analytics or ad accounts, does not invent numbers or reasons, and is not for forecasts.
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": "generate_client_report"
}
}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. | |
| notes | No | Optional: your own commentary for the client, printed word for word under Notes, e.g. "We launched the new landing page on Oct 14." Never invented by the tool. | |
| paper | No | Optional: letter (default) or A4. | |
| 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. | |
| client_name | No | Optional: the client's name for the report title, e.g. "Northwind Dental". Default: Client. | |
| prepared_by | No | Optional: your name or agency name shown in the header, e.g. "Brightside Marketing". | |
| accent_color | No | Optional: brand colour for the header bar, hex like #1F3A5F or a name like navy, teal. Default navy. | |
| report_title | No | Optional: report title, e.g. "Monthly SEO report". Default: Weekly report, Monthly report or Performance report from the period. | |
| 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 |