Skip to main content
Glama

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
NameRequiredDescriptionDefault
limitNoMax campaigns to return. Default: 20.
statusNoFilter by status: ACTIVE, PAUSED, or ARCHIVED. Omit to return all.

Implementation Reference

  • 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));
    }
  • 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: [],
        },
    },

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Nolas-Shadow/agent1st-ads-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server