Skip to main content
Glama

ChatGPT Ads insights query (advanced)

chatgpt_ads_insights_query
Read-only

The full reporting query, for questions the other report tools don't cover: hourly, daily, monthly or total rows; at account, campaign, ad group or ad level; split by ONE of country, device, platform (ChatGPT app vs web) or product; filtered to campaigns or a campaign status; sorted by a metric; including entities with no impressions; with the conversion window and date basis of your choice. Rules from OpenAI: one segment per request; segmented requests allow none, daily or monthly (not hourly); product reports aren't hourly. Money is in the account currency; days follow the account time zone. Conversions use a 30-day click plus 1-day view window by default; null means unavailable, not zero. For ordinary questions prefer chatgpt_ads_performance_report.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "chatgpt_ads_insights_query"
  }
}

Input Schema

NameRequiredDescriptionDefault
levelNoWhat a row is (default campaign).
limitNoMost rows to return (default 200, max 2000).
sortByNoSort rows by this metric, highest first (default spend for totals).
statusNoOnly campaigns with this status.
endDateNoYYYY-MM-DD in the ad account's time zone. Omit for yesterday.
segmentNoOne of country, device, platform, product.
accountIdNoThe ChatGPT Ads ad account id, as listed by chatgpt_ads_list_ad_accounts. A connection reaches one ad account, so this is normally left out.
startDateNoYYYY-MM-DD in the ad account's time zone. Omit for the last 30 days.
timeBasisNoDate conversions by the ad interaction (default) or by when they happened.
campaignIdsNoOnly these campaigns (ids from chatgpt_ads_get_campaigns).
viewThroughNoCount conversions from people who saw but didn't click an ad, within one day (default true). Set false for click-only attribution.
clickWindowDaysNoClick attribution window in days: 7, 14 or 30 (default 30). Changes conversions, CPA and sales, not impressions, clicks or spend.
timeGranularityNonone = one row per entity for the whole range (default), or daily, monthly, hourly.
includeZeroImpressionsNoAlso return campaigns, ad groups or ads with no impressions (unsegmented only).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false and openWorldHint=true, so safety is covered; the description then adds substantial non-schema context: OpenAI's rule that only one segment is allowed per request, that segmented requests cannot be hourly, that product reports are never hourly, that money is in account currency, that days follow the account time zone, and that null conversions mean unavailable rather than zero. These are exactly the correctness-critical caveats an agent would otherwise get wrong.

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?

It is a single dense block of useful content with no filler, front-loading the capability enumeration before the constraint rules and the sibling routing sentence. The middle "Rules from OpenAI" run-on is harder to scan than it needs to be, but every clause carries operational meaning and nothing is redundant with 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?

For a 14-parameter read-only analytics tool with no output schema, the description covers the dimensions that determine correctness: granularity/segment interaction, currency, time zone, attribution windows and null semantics. The main remaining gap is the shape of returned rows and whether beyond the 2000-row limit result truncation occurs, which matters for a tool this flexible.

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 baseline is 3, and the description earns an upgrade by stating cross-parameter constraints the schema cannot express: one segment per request, segmented requests restricted to none/daily/monthly, and product reports not supporting hourly. It also restates defaults for conversion window, zero-impression inclusion, sorting and segmentation, though it leaves limit, accountId and a few enum values to the schema.

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 opens by naming the tool as the full reporting query and then enumerates its exact dimensions: granularity (hourly/daily/monthly/total), level (account/campaign/ad group/ad), segmentation, filtering, sorting and zero-impression inclusion. It explicitly contrasts itself with sibling report tools ("questions the other report tools don't cover") and names chatgpt_ads_performance_report as the ordinary-case alternative, so an agent can distinguish it without opening the schema.

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

Usage Guidelines5/5

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

It gives an explicit when-to-use condition (non-standard reporting questions) and an explicit when-not-to-use routing rule: "For ordinary questions prefer chatgpt_ads_performance_report." It also enumerates the exact capabilities that justify escalation to this tool, so the agent has a concrete decision criterion rather than inference.

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