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: [],
        },
    },
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden. It discloses the plan requirement ('Starter plan or higher'), which is useful behavioral context. However, it lacks details on rate limits, pagination behavior (despite a 'limit' parameter), error conditions, or what happens if no campaigns exist—leaving gaps for a read operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized with two sentences: one stating the purpose and returned fields, and another providing usage context and prerequisites. It's front-loaded with core functionality, though the second sentence could be slightly more streamlined.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a read-only list tool with no annotations and no output schema, the description covers the basics (purpose, usage, plan requirement) but lacks details on output format (e.g., structure of returned campaigns), pagination beyond the 'limit' parameter, or error handling. Given the complexity and sibling tools, it's adequate but has clear gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents both parameters ('limit' and 'status') fully. The description doesn't add any parameter-specific semantics beyond what's in the schema, such as explaining how filtering interacts with the listing or default behaviors beyond 'limit'.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('List') and resource ('all campaigns in the Meta ad account') with specific attributes returned (ID, name, status, objective, daily budget). It distinguishes from siblings like 'get_meta_campaign_stats' by focusing on listing rather than detailed statistics, though it doesn't explicitly name alternatives.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It provides clear context for when to use this tool ('Use campaign IDs to get stats, adjust budgets, or pause/enable') and mentions prerequisites ('Requires Starter plan or higher'). However, it doesn't explicitly state when NOT to use it or name specific alternatives among siblings like 'list_tiktok_campaigns' for TikTok campaigns.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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