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
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, idempotentHint=true, providing safety context. The description adds behavioral details: pagination cursors, return structure (data array and paging), and mentions using meta_ads_fetch_pagination_url for more results. This adds value beyond annotations.

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 well-structured with a leading sentence, a bullet list of parameters, and a return section. For 9 parameters, it is appropriately sized without being verbose. Each parameter gets a concise line.

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?

Given 9 parameters (1 required), no output schema, and annotations covering safety, the description explains the return structure and pagination well. It mentions how to get more results using a sibling tool. It lacks error handling or rate limit info, but for a read-only tool this is acceptable.

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 coverage is 100%, so baseline is 3. The description bullet list restates schema parameters with some additional examples (e.g., common fields for 'fields', operators for 'filtering'). However, it does not add significant new meaning beyond what the schema already 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 'Retrieve all ads belonging to a specific Meta ad set with filtering and pagination', which is a clear verb+resource+scope. It distinguishes from siblings like meta_ads_get_ads_by_adaccount and meta_ads_get_ads_by_campaign by specifying 'by adset'.

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 context (when you have an ad set ID) but does not explicitly mention when to use this tool versus alternatives like meta_ads_get_ads_by_campaign or meta_ads_get_ads_by_adaccount. No exclusions or when-not-to-use guidance is provided.

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