Skip to main content
Glama

Meta Ad Library Spend MCP by AdSpendSpy

Analyze estimated ad spend

get_top_ads_stats
Read-onlyIdempotent

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.
projectNoall, my_brands, unassigned, or an owned project public_id. Every choice stays within your tracked brands.
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

A3.9/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 a real behavioral limit: creative breakdowns sample only the top 1,000 ads. It also tells the agent that response metadata carries matched/sampled counts plus full-match aggregate spend, and that zeros can mean unavailable estimates rather than true zero spend. This is exactly the kind of caveat that prevents 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?

Four tight sentences, purpose front-loaded, with the caveats following in order of importance. The mention of 'creative breakdowns' is slightly unmotivated since no such parameter is exposed, but otherwise 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?

With no output schema, the description usefully compensates by describing response metadata (matched/sampled counts, aggregate spend). Combined with the sampling and zero-value caveats, an agent can call this correctly, though remaining parameter gaps and the absence of any guidance on choosing among sibling analysis tools keep it from being fully complete.

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 only 43% across 7 parameters, so the description must compensate. It does add real meaning for the two most confusable parameters (page_id as an exact advertiser filter; timeframe as last-seen rather than period-spend), but q, project, category, media_type, and active_only get no explanation beyond their schema text.

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 with scope: 'Analyze latest cumulative estimated spend in EUR for your tracked advertisers.' That's far more informative than the ambiguous tool name. It doesn't explicitly distinguish itself from siblings like compare_advertisers or get_top_landingpages_stats, so it stops 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 a valuable exclusions-style warning that 'timeframe filters when ads were last seen, NOT spend accrued during that period,' which steers interpretation of a key filter. However, it never says when to pick this tool over neighbors such as compare_advertisers or get_advertiser_ads, so alternative selection is left to inference.

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