list_campaigns
List campaigns from a Meta Ads account, returning id, name, status, objective, daily and lifetime budgets, and bid strategy. Filter by effective status and paginate with limit and cursor.
Instructions
List campaigns in an ad account. Returns id, name, status, objective, daily_budget, lifetime_budget, bid_strategy, created_time. Paginated via limit + after cursor.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ad_account_id | Yes | Ad Account ID — accepts 'act_123456' or just '123456' | |
| limit | No | Default 100 | |
| after | No | Pagination cursor | |
| effective_status | No | Filter by effective_status (e.g. ['ACTIVE','PAUSED']) | |
| fields | No | Override default field list |
Implementation Reference
- src/tools/campaigns.ts:52-58 (handler)The handler function for list_campaigns. It accepts args (ad_account_id, limit, after, effective_status, fields) and makes a GET request to the Meta Graph API endpoint for the ad account's campaigns, passing query params with a default field set and pagination support.
handler: async (args) => metaGet(`/${toAdAccountPath(String(args.ad_account_id))}/campaigns`, { fields: args.fields ?? DEFAULT_CAMPAIGN_FIELDS, limit: args.limit ?? 100, after: args.after, effective_status: args.effective_status, }),