Skip to main content
Glama
hashcott

Meta Ads MCP Server

by hashcott

Get Meta Ads by Ad Set

meta_ads_get_ads_by_adset
Read-onlyIdempotent

Retrieve ads from a specific Meta ad set with filtering by status and fields, and pagination support for managing performance.

Instructions

Retrieve all ads belonging to a specific Meta ad set with filtering and pagination.

Args:

  • adset_id (string): Ad set ID, e.g., '23843211234567'

  • fields (string[]): Fields per ad. Common: id, name, account_id, adset_id, campaign_id, status, effective_status, configured_status, creative, bid_amount, bid_type, created_time, updated_time, targeting, conversion_specs, recommendations, preview_shareable_link

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

  • filtering (object[]): Filter objects. Operators: EQUAL, NOT_EQUAL, GREATER_THAN, GREATER_THAN_OR_EQUAL, LESS_THAN, LESS_THAN_OR_EQUAL, IN_RANGE, NOT_IN_RANGE, CONTAIN, NOT_CONTAIN, IN, NOT_IN, EMPTY, NOT_EMPTY

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

  • after / before (string): Pagination cursors

  • date_format (string): Date format for response

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
adset_idYesAd set ID, e.g., '23843211234567'
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}]
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
date_formatNoFormat for date fields in response. 'U' = Unix timestamp (seconds), 'Y-m-d H:i:s' = MySQL datetime. Default: ISO 8601
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

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