Skip to main content
Glama

Get ChatGPT Ads account insights

get-openai-ads-account-insights
Read-only

Get spend, impressions, clicks, CTR, CPC and CPM for the domain's whole ChatGPT Ads account over a date range, as {data, has_more}. Defaults to one rollup row; daily granularity gives a row per day and aggregation_level a row per campaign, ad group or ad. Set include_sales for order sales, ROAS, CPA and post-click conversion rate under the given attribution windows.

Input Schema

NameRequiredDescriptionDefault
sortNoSort directives, an array of {field, direction}. Example: [{"field":"spend","direction":"desc"}].
limitNoMax rows
sinceYesRange start date (YYYY-MM-DD, inclusive)
untilYesRange end date (YYYY-MM-DD, inclusive)
domain_idYesDomain ID from list-domains
time_basisNoWhether results are dated by ad_event_time or conversion_time. Defaults to ad_event_time. Applied only when include_sales is true.
include_salesNoAlso return conversions, CPA, post-click conversion rate, order sales and ROAS. Defaults to false.
time_granularityNoTime granularity. Defaults to none (single rollup row).
view_window_daysNoView-through attribution window in days: 0 (off) or 1. Defaults to 1. Applied only when include_sales is true.
aggregation_levelNoRow grain: ad_account, campaign, ad_group or ad. Defaults to ad_account, one row for the whole scope.
click_window_daysNoClick attribution window in days: 7, 14 or 30. Defaults to 30. Applied only when include_sales is true.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedInput schema / properties / click_window_days / description
      Previous value: -"Click attribution window in days: 7, 14 or 30. Defaults to 30."New value: +"Click attribution window in days: 7, 14 or 30. Defaults to 30. Applied only when include_sales is true."
    • changedInput schema / properties / time_basis / description
      Previous value: -"Whether results are dated by ad_event_time or conversion_time. Defaults to ad_event_time."New value: +"Whether results are dated by ad_event_time or conversion_time. Defaults to ad_event_time. Applied only when include_sales is true."
    • changedInput schema / properties / view_window_days / description
      Previous value: -"View-through attribution window in days: 0 (off) or 1. Defaults to 1."New value: +"View-through attribution window in days: 0 (off) or 1. Defaults to 1. Applied only when include_sales is true."
  2. Changed2 schema fields changed
    • changedInput schema / properties / domain_id / description
      Previous value: -"Domain ID"New value: +"Domain ID from list-domains"
    • changedInput schema / properties / limit / description
      Previous value: -"Max rows to return"New value: +"Max rows"
  3. Changed3 schema fields changed
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / domain_id / pattern
      Added value: +"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    • removedInput schema / properties / sort / items / additionalProperties
      Removed value: -false
  4. Changed8 schema fields changed
    • addedInput schema / properties / click_window_days
      Added value: +{
      +  "description": "Click attribution window in days: 7, 14 or 30. Defaults to 30.",
      +  "enum": [
      +    7,
      +    14,
      +    30
      +  ],
      +  "type": "number"
      +}
    • addedInput schema / properties / include_sales
      Added value: +{
      +  "description": "Also return conversions, CPA, post-click conversion rate, order sales and ROAS. Defaults to false.",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / sort / items / properties / field / description
      Previous value: -"Metric name, e.g. \"spend\", \"clicks\", \"impressions\", \"ctr\", \"cpc\", \"cpm\"."New value: +"Metric to sort by: spend, impressions, clicks, ctr, cpc or cpm. Sales figures, conversions included, cannot be sorted on."
    • addedInput schema / properties / sort / items / properties / field / enum
      Added value: +[
      +  "spend",
      +  "impressions",
      +  "clicks",
      +  "ctr",
      +  "cpc",
      +  "cpm"
      +]
    • removedInput schema / properties / sort / items / properties / field / minLength
      Removed value: -1
    • addedInput schema / properties / sort / maxItems
      Added value: +5
    • addedInput schema / properties / time_basis
      Added value: +{
      +  "description": "Whether results are dated by ad_event_time or conversion_time. Defaults to ad_event_time.",
      +  "enum": [
      +    "ad_event_time",
      +    "conversion_time"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / view_window_days
      Added value: +{
      +  "description": "View-through attribution window in days: 0 (off) or 1. Defaults to 1.",
      +  "enum": [
      +    0,
      +    1
      +  ],
      +  "type": "number"
      +}
  5. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already establish that this is a read-only, non-destructive operation. The description adds useful behavioral context: it returns {data, has_more}, defaults to a single rollup row, and gates sales metrics behind include_sales with specific attribution windows.

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

Conciseness5/5

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

The description is three dense, front-loaded sentences with no filler. It states the returned metrics and shape first, then explains granularity/aggregation, then the sales-metric switch.

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 an 11-parameter tool with no output schema, the description covers the return envelope, key metrics, row grain options, and sales-metric behavior. Sort and limit are not explained, but the schema fully documents them, so the remaining gap is minor.

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 100%, so the schema already documents all parameters. The description still adds value by explaining the interaction between time_granularity, aggregation_level, and include_sales, and by naming the metrics enabled by include_sales.

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

Purpose5/5

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

The description states a specific verb and resource: get spend, impressions, clicks, CTR, CPC, and CPM for the domain's whole ChatGPT Ads account over a date range. It also distinguishes account-wide scope from row-grain options like campaign, ad group, or ad, which helps separate it from sibling insight tools.

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?

The description explains defaults and how time_granularity and aggregation_level change the row grain, but it does not explicitly say when to use this tool versus get-openai-ads-campaign-insights, get-openai-ads-ad-group-insights, or get-openai-ads-ad-insights. Usage is implied rather than routed.

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.

Resources