Skip to main content
Glama

Ads export

ads_export
Read-onlyIdempotent

Builds 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

NameRequiredDescriptionDefault
inputYes
accountIdsNoOptional account selection; can only narrow this workspace's access.
userStatementNoRequired 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.
idempotencyKeyNoRequired for mutations. Reuse the same key only when retrying the exact same call; a completed outcome is applied once.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / input / properties / kind
      Added value: +{
      +  "const": "comments",
      +  "type": "string"
      +}
    • removedInput schema / properties / input / required
      Removed value: -[
      -  "since",
      -  "until"
      -]
  2. Added

TDQS

A3.8/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Despite annotations already declaring a safe read, the description adds substantial behavior the annotations cannot: links are signed for the connected person and expire in one hour, the file is read from the ad platform on link open, output is capped at 5 preview rows, top 15 ads and up to 50 ad sets, and 20,000 comments, and a missing Meta comment permission is surfaced in the result and file name while the other surface is still read.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is one enormous run-on paragraph punctuated by sentence fragments ("filters.by also takes region, dma, frequency, product or user_segment, each alone:"). It is dense and unscannable, and several clauses are so compressed they are nearly unparseable, though the underlying content is largely relevant.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a complex tool with no output schema and nested parameters, it covers a lot: result shape (title, accounts, up to 5 preview rows, signed links), row caps, the comments mode with its 30-day default, and permission-failure behavior. It omits what the default date range is for the main ads export and how accountIds interacts with per-workspace access.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 75%, and the description usefully expands the opaque filter object: valid filters.by values (region, dma, frequency, product, user_segment), filters.level modes per row type, filters.label0 through label4, and the meaning of filters.all. Some phrasing is cryptic ("each alone:", "keep those values"), and the relationship between top, since/until and the defaults is only partially spelled out.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening states a specific verb and resource: builds a CSV/PDF file of each account's ads over a date range, across Meta and Google Ads. It is clear what the tool produces, but it never distinguishes itself from siblings like google_ads_library or creative_insights, and the single sprawling sentence buries the purpose statement under filter minutiae.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Conditional usage is implied throughout: use kind "comments" to get comments, use filters.all when the user asks for all ads, use filters.level to switch Google row types. There is no explicit when-not guidance and no named alternative tool, so the agent must infer routing from the filter semantics.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.