Skip to main content
Glama
hashcott

Meta Ads MCP Server

by hashcott

Get Meta Ad Account Insights

meta_ads_get_adaccount_insights
Read-onlyIdempotent

Retrieve performance metrics and insights for a Meta ad account. Analyze impressions, clicks, spend, and conversions with customizable time ranges and breakdowns.

Instructions

Retrieve performance insights for a Meta ad account.

Fetches metrics like impressions, reach, clicks, spend, conversions, and more for an entire ad account. Supports time range definitions, demographic breakdowns, and attribution settings.

Args:

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

  • fields (string[]): Metrics to retrieve. Common: impressions, reach, clicks, spend, ctr, cpc, cpm, cpp, frequency, actions, conversions, cost_per_action_type

  • date_preset (string): Relative time range preset (default: last_30d)

  • time_range (object): Custom range {'since':'YYYY-MM-DD','until':'YYYY-MM-DD'}

  • level (string): Aggregation level: account, campaign, adset, ad (default: account)

  • breakdowns (string[]): Segment by: age, gender, country, impression_device, publisher_platform, etc.

  • See full parameter list in inputSchema

Returns: Object with:

  • data (array): List of insight records with requested metrics

  • paging (object): Pagination cursors. Use meta_ads_fetch_pagination_url with paging.next to get more results

Pagination note: When response contains paging.next, use meta_ads_fetch_pagination_url to retrieve additional pages automatically.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fieldsNoMetrics and dimensions to retrieve. Common examples: impressions, reach, clicks, spend, ctr, cpc, cpm, cpp, frequency, actions, conversions, cost_per_action_type, date_start, date_stop
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 providedlast_30d
time_rangeNoSpecific time range {'since':'YYYY-MM-DD','until':'YYYY-MM-DD'}. Overrides date_preset
time_rangesNoArray of time range objects for period comparison. Overrides time_range and date_preset
time_incrementNoTime breakdown granularity: integer 1-90 (days per point), 'monthly', or 'all_days' (single summary). Default: all_daysall_days
levelNoLevel of aggregation: account, campaign, adset, or ad
action_attribution_windowsNoAttribution windows for actions. Examples: 1d_view, 7d_view, 28d_view, 1d_click, 7d_click, 28d_click, dda, default
action_breakdownsNoSegments the actions results. Examples: action_device, action_type, conversion_destination, action_destination. Default: [action_type]
action_report_timeNoWhen actions are counted: impression (time of ad impression), conversion (time of conversion), mixed. Default: mixed
breakdownsNoSegment results by dimensions. Examples: age, gender, country, region, dma, impression_device, publisher_platform, platform_position, device_platform
default_summaryNoIf true, include an additional summary row in the response. Default: false
use_account_attribution_settingNoIf true, use the attribution settings defined at the ad account level. Default: false
use_unified_attribution_settingNoIf true, use unified attribution settings defined at the ad set level. Recommended for consistency with Ads Manager. Default: true
filteringNoList of filter objects. Each has 'field', 'operator', and 'value'. Example: [{field: 'spend', operator: 'GREATER_THAN', value: 50}]
sortNoSort field and direction. Format: {field}_ascending or {field}_descending. Example: impressions_descending
sinceNoStart timestamp for time-based pagination (Unix or strtotime). Only used when time_range and time_ranges are not set
untilNoEnd timestamp for time-based pagination (Unix or strtotime). Only used when time_range and time_ranges are not set
localeNoLocale for text responses (e.g., en_US). Controls language and formatting
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
act_idYesAd account ID prefixed with 'act_', e.g., 'act_1234567890'
Behavior4/5

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

The description adds value beyond annotations by detailing the return structure (data array with metrics, paging object) and pagination behavior, including the need to use a sibling tool for fetching additional pages. This complements the readOnly and idempotent hints effectively.

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

Conciseness3/5

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

The description is well-structured with sections and bullet points, but it is verbose. It repeats parameter information already present in the schema, which makes it longer than necessary. While organized, the redundancy hurts conciseness.

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 the tool's complexity (23 parameters, nested objects, no output schema), the description adequately covers the main purpose, return format, and pagination. It mentions time ranges, breakdowns, and attribution settings. The pagination note and reference to a sibling tool enhance completeness.

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?

The input schema already provides detailed descriptions for all parameters (100% coverage). The description's 'Args' section adds common metric examples but does not significantly clarify meaning beyond the schema. The baseline of 3 is appropriate as the description does not compensate for any lacks.

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 tool retrieves performance insights for a Meta ad account, specifying metrics and features. However, it does not explicitly distinguish this tool from sibling insight tools like meta_ads_get_ad_insights or meta_ads_get_campaign_insights, which slightly reduces clarity for an agent deciding which tool to use.

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

Usage Guidelines2/5

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

The description lacks explicit guidance on when to use this tool versus its siblings. It does not mention when to prefer account-level insights over campaign, adset, or ad-level insights. The pagination note is useful but does not cover tool selection. This leaves the agent without clear decision criteria.

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