list_meta_campaigns
Retrieve Meta ad campaigns with IDs, status, objectives, and budgets to monitor performance and manage advertising activities.
Instructions
List all campaigns in the Meta (Facebook/Instagram) ad account with campaign ID, name, status (ACTIVE/PAUSED/ARCHIVED), objective, and daily budget. Use campaign IDs to get stats, adjust budgets, or pause/enable. Requires Starter plan or higher.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Max campaigns to return. Default: 20. | |
| status | No | Filter by status: ACTIVE, PAUSED, or ARCHIVED. Omit to return all. |
Implementation Reference
- src/index.ts:415-425 (handler)The handler implementation for the list_meta_campaigns tool, which performs validation, formats parameters, and calls the Meta API to list campaigns.
case 'list_meta_campaigns': { const denied = licenseCheck('meta'); if (denied) return fail(denied); if (!cfg.hasMeta()) return fail('Meta credentials not set. Add META_ADS_ACCESS_TOKEN, META_ADS_ACCOUNT_ID, META_PAGE_ID.'); const params: Record<string, string> = { fields: 'id,name,status,objective,daily_budget,spend_cap,start_time', limit: String(args.limit ?? 20), }; if (args.status) params.effective_status = `["${args.status}"]`; return ok(await metaGet(`/${cfg.metaAccount()}/campaigns`, params)); } - src/index.ts:214-224 (schema)Tool definition for list_meta_campaigns, including its description and input schema.
name: 'list_meta_campaigns', description: 'List all campaigns in the Meta (Facebook/Instagram) ad account with campaign ID, name, status (ACTIVE/PAUSED/ARCHIVED), objective, and daily budget. Use campaign IDs to get stats, adjust budgets, or pause/enable. Requires Starter plan or higher.', inputSchema: { type: 'object', properties: { limit: { type: 'number', description: 'Max campaigns to return. Default: 20.' }, status: { type: 'string', description: 'Filter by status: ACTIVE, PAUSED, or ARCHIVED. Omit to return all.' }, }, required: [], }, },