Skip to main content
Glama
get-mcp-ads

ChatGPT Ads MCP server

openai ads get ad groups

openai_ads_get_ad_groups
Read-onlyIdempotent

List one page of ad groups within a campaign, with cursor-based paging, name filtering, and optional serving issue reasons. Use the returned last_id only when has_more is true.

Instructions

List one page of ad groups in a campaign. Native ad group IDs start with adgrp_. Follow last_id only when has_more is true.

Input Schema

NameRequiredDescriptionDefault
nameNoReturn only entities whose name matches this text, 3 to 1,000 characters.
afterNoNext-page cursor: the previous page's last_id, only when has_more is true.
limitNoPage size, 1 to 500. Defaults to 100.
orderNoSort by creation time. Defaults to desc, newest first.desc
beforeNoPrevious-page cursor: a first_id returned by a later page.
includeNoAdd serving_issues to receive native reasons why this entity cannot serve. A paused state is intentional, not an issue.
campaignIdYesNative campaign ID (cmpn_) in the configured account.
adAccountIdYesThe adacct_ ID configured in OPENAI_ADS_ACCOUNT_ID. The API key is scoped to this one account; another ID is refused.

Output Schema

NameRequiredDescriptionDefault
resultYesOriginal tool result: parsed JSON when the text is JSON, otherwise the text or multiple MCP content blocks. Provider fields depend on the selected query.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint and destructiveHint=false, so the safety profile is covered. The description still adds real behavioral value by disclosing the paged result shape and the has_more/last_id contract, which an agent cannot infer from annotations. It omits rate limits or ordering guarantees, keeping it short of a 5.

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?

Three short sentences, front-loaded with the core action, then the ID format, then the one operational caveat. No filler and nothing buried.

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 an output schema present and full parameter documentation, the description need only cover purpose and pagination behavior, which it does. Minor gaps — such as whether results are scoped to the account's configured ID or how filters combine with paging — are handled by the schema, so the definition is nearly complete.

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 coverage is 100%, so every parameter (name, after, before, limit, order, include, campaignId, adAccountId) is already documented precisely. The description only restates the after/last_id relationship already present in the 'after' parameter description, adding little beyond the schema. Baseline 3 applies.

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+resource+scope: "List one page of ad groups in a campaign." That clearly distinguishes it from the singular get_ad_group and from get_campaigns, though it never names those siblings explicitly. The added note about the adgrp_ ID prefix reinforces what kind of entity is returned.

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?

Gives one concrete usage rule — "Follow last_id only when has_more is true" — which governs cursor reuse. However, it offers no guidance on when to pick this tool over get_ad_group or why you would page with limit/order, leaving selection context implied rather than stated.

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