marketing_report
Marketing Report | the caller's OWN brand marketing report, read deterministically from the derived marketing_daily table server-side (the exact numbers the user sees in the app | nothing re-derived, nothing estimated, no LLM). In one sentence: what one brand spent across Meta Ads, Google Ads, TikTok Ads, Shopify, Amazon and Google Analytics, and what came back, under ONE definition of return on ad spend. Call it when a user asks "how did brand X do last week", "what did we spend on Meta vs Google", "which campaign has the best ROAS", "what is our cost per acquisition this month", "did spend go up compared to last week", "is any channel stale". Sections: overview (spend, conversions, revenue, conversion value, return on ad spend and cost per acquisition for the period, each with the same figure for the comparison period and the move between them, plus one real total PER CURRENCY and the printed definition of every ratio), channels (one row per channel | meta_ads, google_ads, tiktok_ads, shopify, amazon, ga4 | with the same columns, its share of the spend and its own move), campaigns (top campaigns by spend and by return on ad spend, each carrying the spend behind the ratio so a tiny campaign with a spectacular number is visibly tiny), daily (one row per day that actually reported, with spend and return on ad spend). THE HONESTY RULES, which are part of the data and not a disclaimer: money is NEVER converted between currencies, so a total over more than one currency is null with a reason naming them and the per-currency breakdown is the answer instead; conversions and conversion value are what each ad platform reported under its OWN attribution setting and are never de-duplicated across channels; shop revenue and analytics revenue are separate rows and must never be added; a day no platform reported is ABSENT from the daily series rather than present as a zero; a ratio with no denominator is null, never infinite and never zero. The comparison period is the same window shifted by its own rhythm (a week for the week presets, so Monday compares to Monday). Scope: one brand per call | pass brand to pick one (the older spelling client is still accepted), otherwise the account's Default brand answers. A brand that is not the caller's answers an error, never another brand's numbers. An account with nothing connected gets a named empty state saying which of the four reasons applies, never a zero. Requires the caller's own autario account (API key or OAuth) with at least one ad or shop connector | see get_app_context("marketing-report").
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | End day (YYYY-MM-DD) when period is "custom". | |
| from | No | Start day (YYYY-MM-DD) when period is "custom". An unusable pair falls back to the default window rather than erroring. | |
| brand | No | The brand id (uuid) to report on. Omitted means the account's Default brand, which is where every unassigned connector already belongs. Every response lists the caller's brands, so a first call without this argument tells you what to pass next. | |
| client | No | Deprecated spelling of `brand`, still accepted so callers written before 2026-09-22 keep working. Pass `brand`. | |
| format | No | Output wire format for this MCP call. Default 'toon' (Token-Oriented Notation, fewest tokens, best for tabular rows). 'compact' = minified JSON. 'json' = pretty JSON for readability. The REST API always returns JSON regardless. | |
| period | No | The reporting window. Default last-30. "this-week" runs Monday to today and compares to the same weekdays one week earlier; "custom" needs `from` and `to`. | |
| sections | No | Which report sections to return. Default ["overview"]. Request only what the question needs (token efficiency); call again for more. | |
| instances | No | Optional comma-separated connector instance ids, to narrow the report to some of the connections inside the selected brand (for example one of two Search Console properties). Omitted means all of them. An id that is not yours, or not in that brand, answers an error rather than a quietly shorter report. The ids are the instance ids get_app_context returns for this app. |