Skip to main content
Glama

Meta Ad Library Spend MCP Demo by AdSpendSpy

Analyze estimated ad spend

get_top_ads_stats
Read-onlyIdempotent

Public demo: Alex Hormozi only (page_id 116482854782233). Ad listings/details expose only approved public creatives; statistics describe this advertiser only. Analyze latest cumulative estimated spend in EUR for your tracked advertisers. page_id is an exact advertiser filter. timeframe filters when ads were last seen, NOT spend accrued during that period. Creative breakdowns sample the top 1,000 ads; response metadata states matched and sampled counts and full-match aggregate spend. Zero can mean unavailable estimates.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_top_ads_stats"
  }
}

Input Schema

NameRequiredDescriptionDefault
qNo
page_idNoMeta advertiser page ID, kept as a string.
projectNoOnly all is available in the public demo.
categoryNo
timeframeNoLast-seen window; never a period-spend calculation.30d
media_typeNoall
active_onlyNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior5/5

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

Goes well beyond the readOnly/idempotent annotations by disclosing that creative breakdowns sample only the top 1,000 ads, that response metadata reports matched vs. sampled counts and full-match aggregate spend, and that zero can mean unavailable estimates. These are exactly the behavioral caveats an agent needs to avoid misreading results.

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?

Dense but every sentence carries information — demo scope, filter semantics, the timeframe trap, and sampling limits. It is slightly back-loaded, with the critical timeframe caveat appearing mid-paragraph rather than first, but there is no filler.

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 7-parameter stats tool with no output schema and low schema description coverage, the description supplies the essential context: scope, sampling, and how to interpret zeros. What is missing is minor — no mention of pagination or default sorting behavior.

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?

With schema coverage at only 43%, the description compensates for the highest-risk parameters: page_id as an exact advertiser filter, timeframe as last-seen rather than accrued spend, and the demo restriction on project. It leaves q, category, media_type, and active_only to the schema, but the ambiguous ones are covered.

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?

States a specific verb and resource: 'Analyze latest cumulative estimated spend in EUR for your tracked advertisers,' which is distinct from sibling stats tools like get_top_landingpages_stats and listing tools like list_brand_ads. It does not explicitly name the sibling it replaces, so it falls short of a 5.

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?

Provides real operating context (public demo restricted to one advertiser, page_id as an exact filter, timeframe as a last-seen window rather than a spend period), which steers correct use. However, it never states when to choose this tool over get_top_landingpages_stats or list_brand_ads, so selection guidance remains implied.

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