Ads export
ads_exportBuilds a file of each account's ads over a date range, Meta's and Google Ads', as CSV and PDF: the Ads Manager columns, each Meta ad's share of spend by age, gender, placement and country, and the ad text. filters.by also takes region, dma, frequency, product or user_segment, each alone: region, DMA and product rows hold no purchases, and frequency rows hold reach alone. A Google account gives its ads and the asset groups Performance Max has instead, or with filters.level keyword, asset, product, search_term, landing_page, placement or audience its keywords, its assets (Performance Max's too, with their status), its Shopping and Performance Max products with their attributes, its search terms (Performance Max's too), the pages people landed on, where its ads ran or the audiences its campaigns and ad groups add; filters.by a custom label (custom_label_0), category, product type or brand gives one product row per value, and filters.label0 to label4, category, type or brand keep those values. Rows carrying Google's cart data add Google orders, revenue, cost of goods, gross profit, margin and return on profit. The result holds the file's title, the accounts in it, up to 5 preview rows and its file links, signed for the connected person and valid for one hour; the file is read from the ad platform when a link is opened. A file holds each account's top 15 ads by spend, top sets up to 50, and every ad that spent is included when filters.all is true or the userStatement asks for all of them ("all my ads", "every ad"); a period and the columns named in the userStatement shape the file as they do in the app. kind "comments" (or a userStatement asking for the comments) builds instead a file of every comment and reply under the Facebook and Instagram posts of the Meta ads that spent over the dates, the last 30 days when none are given, narrowed by filters.campaignIds or filters.adIds (Meta ids) or by campaign and ad names: CSV with one row per comment (ad account, campaign, ad set, ad, surface, post id and link, comment id, parent comment id, author as Meta returns it, text, ISO time, likes, replies, hidden), PDF, and a text for Claude grouped by ad with its spend, up to 20,000 comments. Where the Meta connection lacks a comment permission, the result and the file name the missing permission and the other surface is still read.
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": {
"input": "<input>"
},
"name": "ads_export"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| input | Yes | ||
| accountIds | No | Optional account selection; can only narrow this workspace's access. | |
| userStatement | No | Required for launch_brief: the user's request or answer for this launch, in their own words. Otherwise optional: the user's request for this call, treated as an unverified user statement, never permission or verified platform evidence. | |
| idempotencyKey | No | Required for mutations. Reuse the same key only when retrying the exact same call; a completed outcome is applied once. |