get_ads
Retrieve ads from a Meta Ads account with optional campaign and ad set filters, and pagination to fetch all results.
Instructions
Get ads for a Meta Ads account with optional filtering.
Args:
account_id: Meta Ads account ID (format: act_XXXXXXXXX)
access_token: Meta API access token (optional - will use cached token if not provided)
limit: Maximum number of ads to return per page (default: 10)
campaign_id: Optional campaign ID to filter by
adset_id: Optional ad set ID to filter by
after: Pagination cursor to get the next set of results
fetch_all: Whether to follow pagination cursors to fetch all ads (default: False)
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"account_id": "<account_id>"
},
"name": "get_ads"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| after | No | ||
| limit | No | ||
| adset_id | No | ||
| fetch_all | No | ||
| account_id | Yes | ||
| campaign_id | No | ||
| access_token | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |