Skip to main content
Glama
pralayasimha23

meta-ads-mcp

get_campaigns

Retrieve Meta Ads campaigns with optional filters for status and objective. Supports pagination and fetching all results.

Instructions

Get campaigns for a Meta Ads account with optional filtering.

Note: By default, the Meta API returns a subset of available fields. 
Other fields like 'effective_status', 'spend_cap', 'budget_remaining',
'promoted_object', 'source_campaign_id', etc., might be available but
require specifying them in the API call (currently not exposed by this
tool's parameters).

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 campaigns to return per page (default: 10)
    status_filter: Filter by effective status (e.g., 'ACTIVE', 'PAUSED', 'ARCHIVED').
                   Maps to the 'effective_status' API parameter, which expects an array
                   (this function handles the required JSON formatting). Leave empty for all statuses.
    objective_filter: Filter by campaign objective(s). Can be a single objective string or a list of objectives.
                     Valid objectives: 'OUTCOME_AWARENESS', 'OUTCOME_TRAFFIC', 'OUTCOME_ENGAGEMENT',
                     'OUTCOME_LEADS', 'OUTCOME_SALES', 'OUTCOME_APP_PROMOTION'.
                     Examples: 'OUTCOME_LEADS' or ['OUTCOME_LEADS', 'OUTCOME_SALES'].
                     Leave empty for all objectives.
    after: Pagination cursor to get the next set of results
    fetch_all: Whether to follow pagination cursors to fetch all campaigns (default: False)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
afterNo
limitNo
fetch_allNo
account_idYes
access_tokenNo
status_filterNo
objective_filterNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

No annotations are provided, so the description carries the full burden. It discloses that the API returns a subset of fields by default, that certain fields are not exposed, that status_filter maps to effective_status with JSON formatting handled, and that pagination is controlled via 'after' and 'fetch_all'. This adds meaningful behavioral context beyond the schema.

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 front-loaded with a clear summary, followed by a useful note about API fields, then a structured Args list. It is a bit lengthy but every sentence contributes meaningful detail, so it earns its place.

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

Completeness4/5

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

With 7 parameters, pagination, and filtering, the description covers the main usage thoroughly. It mentions field limitations, filtering behavior, and pagination. An output schema exists, so return values are covered elsewhere. Minor gaps include error handling and rate limits, but overall it's adequate for a listing tool of this complexity.

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

Parameters5/5

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

Schema description coverage is 0%, so the description compensates fully. It explains each parameter in the Args section, including valid values, examples, defaults, and the distinction between status and objective filters. This exceeds what the schema alone provides.

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

Purpose5/5

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

The description states 'Get campaigns for a Meta Ads account with optional filtering' with a clear verb and resource. The plural 'campaigns' and optional filters distinguish it from sibling tools like get_campaign_details (which targets a single campaign).

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

Usage Guidelines3/5

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

The description implies usage for listing campaigns with filters, but does not explicitly mention when to choose this over alternatives like get_campaign_details. The 'optional filtering' and parameter details suggest context, but there is no explicit exclusion or alternative naming.

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/pralayasimha23/meta-ads-mcp'

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