Skip to main content
Glama

Get ChatGPT Ads ad-group insights

get-openai-ads-ad-group-insights
Read-only

Get spend, impressions, clicks, CTR, CPC and CPM for one ChatGPT Ads ad group over a date range, as {data, has_more}. Defaults to one rollup row; aggregation_level ad gives a row per ad. ad_group_id comes from list-openai-ads-ad-groups. 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.
ad_group_idYesAd group ID from list-openai-ads-ad-groups
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_group, 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. Changed3 schema fields changed
    • changedInput schema / properties / ad_group_id / description
      Previous value: -"Ad group ID"New value: +"Ad group ID from list-openai-ads-ad-groups"
    • 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

A3.9/5.0
Behavior4/5

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

Annotations already cover the read-only/no-destructive profile, and the description adds real value on top: the response shape {data, has_more}, the rollup-vs-granular default, and that attribution windows only apply when include_sales is true. It does not cover pagination mechanics or rate/limit behavior, keeping it at 4 rather than 5.

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

Conciseness4/5

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

Three dense sentences, front-loaded with the metric list and return shape before getting into defaults and the include_sales switch. No filler, though the final sentence mildly duplicates what include_sales already spells out in the schema.

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?

With 12 parameters, no output schema, and conditional sales/attribution behavior, the description supplies the important bits: return envelope, default grain, and the include_sales gate. Sorting and limit/pagination behavior are left entirely to the schema, a minor gap given there is no output schema.

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

Parameters3/5

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

Schema description coverage is 100%, so the baseline is 3. The description restates values the schema already documents (aggregation_level grain, include_sales contents, which metrics are returned) and does not add syntax, formatting, or interaction detail beyond that.

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?

States a specific verb and resource: fetch spend/impressions/clicks/CTR/CPC/CPM metrics for one ChatGPT Ads ad group over a date range, plus the return envelope {data, has_more}. Scope ('one ad group') implicitly distinguishes it from the account/campaign/ad insights siblings, but the description never names those alternatives explicitly.

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

Usage Guidelines4/5

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

Clear operational context: ad_group_id comes from list-openai-ads-ad-groups, the tool defaults to one rollup row, and aggregation_level=ad yields a row per ad. It also explains when to set include_sales. No explicit when-not-use or alternative-tool routing, so it stops short of 5.

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