openai ads get ad groups
openai_ads_get_ad_groupsList 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
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Return only entities whose name matches this text, 3 to 1,000 characters. | |
| after | No | Next-page cursor: the previous page's last_id, only when has_more is true. | |
| limit | No | Page size, 1 to 500. Defaults to 100. | |
| order | No | Sort by creation time. Defaults to desc, newest first. | desc |
| before | No | Previous-page cursor: a first_id returned by a later page. | |
| include | No | Add serving_issues to receive native reasons why this entity cannot serve. A paused state is intentional, not an issue. | |
| campaignId | Yes | Native campaign ID (cmpn_) in the configured account. | |
| adAccountId | Yes | The adacct_ ID configured in OPENAI_ADS_ACCOUNT_ID. The API key is scoped to this one account; another ID is refused. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes | Original tool result: parsed JSON when the text is JSON, otherwise the text or multiple MCP content blocks. Provider fields depend on the selected query. |