Skip to main content
Glama

Execute Meta Ads report

meta_ads_execute_report
Read-only

Execute a Meta (Facebook) Marketing API query for one account and return JSON Lines (every line is a JSON object): the first line is a JSON Schema of the returned fields (carrying a "metadata":"schema" marker to identify it), then one JSON object per record. The Graph API is JSON-native, so each record is returned verbatim (nested objects and arrays preserved) and the schema is inferred from the data. The query is Graph API syntax, an edge name plus parameters such as fields=, date_preset=, time_range=. The act_ prefix and access token are added automatically; do not include them.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesGraph API edge plus parameters. Do not include the act_<accountId> prefix or access_token; they are added automatically. Examples: 'campaigns?fields=name,status,daily_budget'; 'ads?fields=name,adset_id,campaign_id'; 'insights?fields=impressions,clicks,spend&date_preset=last_7d'; 'insights?fields=impressions,clicks,spend&time_range={"since":"2025-01-01","until":"2025-01-31"}'. Account-level queries start with 'me/' (e.g. 'me/adaccounts?fields=name,currency').
accountIdYesTrueClicks account id (the numeric Id field from the account listing, not the Meta customer id / ClientCustomerId). Must be a Meta account accessible by the connector.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / accountId / description
      Previous value: -"Ad platform account ID to query (must be a Meta account accessible by the connector)."New value: +"TrueClicks account id (the numeric Id field from the account listing, not the Meta customer id / ClientCustomerId). Must be a Meta account accessible by the connector."
    • changedInput schema / properties / query / description
      Previous value: -"Graph API edge plus parameters. Do not include the act_<accountId> prefix or access_token — they are added automatically. Examples: 'campaigns?fields=name,status,daily_budget'; 'ads?fields=name,adset_id,campaign_id'; 'insights?fields=impressions,clicks,spend&date_preset=last_7d'; 'insights?fields=impressions,clicks,spend&time_range={\"since\":\"2025-01-01\",\"until\":\"2025-01-31\"}'. Account-level queries start with 'me/' (e.g. 'me/adaccounts?fields=name,currency')."New value: +"Graph API edge plus parameters. Do not include the act_<accountId> prefix or access_token; they are added automatically. Examples: 'campaigns?fields=name,status,daily_budget'; 'ads?fields=name,adset_id,campaign_id'; 'insights?fields=impressions,clicks,spend&date_preset=last_7d'; 'insights?fields=impressions,clicks,spend&time_range={\"since\":\"2025-01-01\",\"until\":\"2025-01-31\"}'. Account-level queries start with 'me/' (e.g. 'me/adaccounts?fields=name,currency')."
  2. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, and the description adds valuable context: the output is JSON Lines with a schema-first line, records are returned verbatim with nested structures preserved, the schema is inferred from data (open-world), and the act_ prefix/token are auto-added. This goes beyond annotations and clarifies behavior without any contradiction.

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 three sentences, front-loaded with the core purpose and output format, then providing Graph API context and the auto-added prefix note. It is efficient with no fluff, though the second sentence could be slightly tightened without losing meaning.

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?

For a generic query executor with open-world semantics, the description covers the essential aspects: what it does, output format, query syntax, auto-added credentials, and the read-only nature (via annotations). It does not mention error handling or rate limits, but these are not critical for a read-only tool. The description is sufficient for an agent to call it correctly.

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 has 100% coverage with detailed descriptions for both parameters, including examples and constraints (e.g., do not include act_ prefix, accountId is TrueClicks id). The description reiterates the auto-added prefix/token but adds little new semantic meaning beyond the schema. Baseline 3 is appropriate because the schema already carries the burden.

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 action (execute a Meta Marketing API query), the resource (Meta/Facebook), and the output format (JSON Lines with schema). It distinguishes from sibling execute_report tools by explicitly naming Meta and contrasting with the Google and Microsoft siblings in the tool list. The purpose is unambiguous and specific.

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

Usage Guidelines4/5

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

The description implies usage for Meta ads via the name and explicit 'Meta (Facebook) Marketing API' phrasing, and it provides guidance on query syntax and what to exclude (act_ prefix, token). However, it does not explicitly mention alternatives (e.g., 'use google_ads_execute_report for Google Ads'), so the guidance is clear but not fully explicit about when not to use this tool. Sibling names make the platform distinction obvious.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources