Skip to main content
Glama
hashcott

Meta Ads MCP Server

by hashcott

Get Meta Campaigns by Ad Account

meta_ads_get_campaigns_by_adaccount
Read-onlyIdempotent

Fetch campaigns from a Meta ad account with filtering by status, objective, or date. Paginate through results to handle large datasets.

Instructions

Retrieve all campaigns from a specific Meta ad account with filtering and pagination.

Args:

  • act_id (string): Ad account ID prefixed with 'act_', e.g., 'act_1234567890'

  • fields (string[]): Fields per campaign. Common: id, name, objective, effective_status, created_time, daily_budget, lifetime_budget, budget_remaining

  • effective_status (string[]): Filter by status: ACTIVE, PAUSED, DELETED, PENDING_REVIEW, DISAPPROVED, PREAPPROVED, PENDING_BILLING_INFO, ARCHIVED, WITH_ISSUES

  • objective (string[]): Filter by objective: APP_INSTALLS, BRAND_AWARENESS, CONVERSIONS, EVENT_RESPONSES, LEAD_GENERATION, LINK_CLICKS, MESSAGES, PAGE_LIKES, POST_ENGAGEMENT, PRODUCT_CATALOG_SALES, REACH, VIDEO_VIEWS

  • filtering (object[]): Additional filter objects with field, operator, value

  • limit (number): Results per page (1-100, default: 25)

  • after / before (string): Pagination cursors

  • date_preset / time_range: Date filter for campaigns

  • updated_since (number): Return campaigns updated since this Unix timestamp

  • is_completed (boolean): True = only completed, False = only active, null = both

  • special_ad_categories (string[]): Filter by: EMPLOYMENT, HOUSING, CREDIT, ISSUES_ELECTIONS_POLITICS, NONE

  • include_drafts (boolean): Include draft campaigns if true

  • date_format (string): Date format for response

Returns: Object with data (campaign array) and paging. Use meta_ads_fetch_pagination_url with paging.next for more results.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
act_idYesAd account ID prefixed with 'act_', e.g., 'act_1234567890'
fieldsNoList of specific fields to retrieve. If omitted, default fields are returned
filteringNoList of filter objects. Each has 'field', 'operator', and 'value'. Example: [{field: 'spend', operator: 'GREATER_THAN', value: 50}]
date_presetNoPredefined relative time range. Options: today, yesterday, this_month, last_month, this_quarter, maximum, last_3d, last_7d, last_14d, last_28d, last_30d, last_90d, last_week_mon_sun, last_week_sun_sat, last_quarter, last_year, this_week_mon_today, this_week_sun_today, this_year. Default: last_30d. Ignored if time_range, time_ranges, since, or until is provided
time_rangeNoCustom time range with since/until dates in YYYY-MM-DD format
updated_sinceNoReturn campaigns updated since this Unix timestamp
effective_statusNoFilter by effective status. Options: ACTIVE, PAUSED, DELETED, PENDING_REVIEW, DISAPPROVED, PREAPPROVED, PENDING_BILLING_INFO, CAMPAIGN_PAUSED, ARCHIVED, ADSET_PAUSED, IN_PROCESS, WITH_ISSUES
is_completedNoTrue = only completed, False = only active, null = both
special_ad_categoriesNoFilter by special ad categories: EMPLOYMENT, HOUSING, CREDIT, ISSUES_ELECTIONS_POLITICS, NONE
objectiveNoFilter by objective: APP_INSTALLS, BRAND_AWARENESS, CONVERSIONS, EVENT_RESPONSES, LEAD_GENERATION, LINK_CLICKS, MESSAGES, PAGE_LIKES, POST_ENGAGEMENT, PRODUCT_CATALOG_SALES, REACH, VIDEO_VIEWS
buyer_guarantee_agreement_statusNoFilter by buyer guarantee agreement status: APPROVED, NOT_APPROVED
date_formatNoFormat for date fields in response. 'U' = Unix timestamp (seconds), 'Y-m-d H:i:s' = MySQL datetime. Default: ISO 8601
include_draftsNoInclude draft campaigns in results if true
limitNoMaximum number of results to return per page (1-100, default: 25)
afterNoCursor for the next page of results, from response.paging.cursors.after
beforeNoCursor for the previous page of results, from response.paging.cursors.before
offsetNoAlternative pagination: number of results to skip
Behavior4/5

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

Annotations already indicate read-only, non-destructive, idempotent behavior. The description aligns and adds value by detailing pagination via meta_ads_fetch_pagination_url and parameter options. No contradictions.

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 structured with bullet points and sections, but it is relatively long. However, every section adds value (parameter details, return info). It could be slightly more concise.

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

Completeness5/5

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

Given 17 parameters, nested objects, pagination, and no output schema, the description covers all parameters, return format, and references the pagination tool. It is fully adequate for agent understanding.

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

Parameters4/5

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

Schema coverage is 100%, but the description adds meaning beyond schemas by listing common fields, enumerating filter values, and explaining pagination cursors. This compensates for the high coverage baseline.

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 clearly states the verb 'retrieve', the resource 'campaigns', and the context 'from a specific Meta ad account'. It mentions filtering and pagination, distinguishing it from siblings like get_campaign_by_id (single campaign) or get_campaign_insights (insights).

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 but provides no explicit guidance on when to use this tool versus siblings (e.g., get_campaign_by_id for a single campaign). No when-not-to-use or alternative comparisons are given.

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

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