Skip to main content
Glama

Meta Ad Library Spend MCP by AdSpendSpy

Rank landing pages by estimated spend

get_top_landingpages_stats
Read-onlyIdempotent

Rank the landing pages of your tracked advertisers by latest cumulative estimated spend in EUR. Ads are grouped by landing URL with ad, advertiser and active-ad counts, the top-spending advertiser and, when one is stored, a screenshot as screenshot_url (site path) and screenshot_full_url (absolute URL). page_id is an exact advertiser filter; q matches part of the landing URL. timeframe filters when ads were last seen, NOT spend accrued during that period. 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_landingpages_stats"
  }
}

Input Schema

NameRequiredDescriptionDefault
qNoSubstring of the landing URL.
limitNo
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.
timeframeNoLast-seen window; never a period-spend calculation.30d
active_onlyNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already establish a safe, idempotent, closed-world read. The description adds real context beyond that: how results are grouped (by landing URL with ad/advertiser/active-ad counts and top-spending advertiser), the screenshot fields and their URL forms, and that 'zero can mean unavailable estimates' — a non-obvious data-quality caveat.

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?

Front-loaded with the core ranking behavior, then the return shape, then the two caveats. It is dense but every clause carries information; the return-shape sentence is long but justified because there is no output schema.

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 and six parameters, the description does the necessary work of explaining the returned grouping and caveats. The main gap is silence on limit/project/active_only behavior and pagination, but the core contract an agent needs is present.

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 67%, so the schema documents most parameters. The description reinforces q (substring of landing URL) and page_id (exact advertiser filter) and adds the critical timeframe semantics, but says nothing about limit, project, or active_only, leaving roughly a third of the parameter space to the schema alone. Baseline 3 is appropriate.

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 opens with a specific verb and resource ('Rank the landing pages of your tracked advertisers by latest cumulative estimated spend in EUR'), which is clearly distinct from the ad-level sibling get_top_ads_stats. It does not explicitly name an alternative, but the resource scope makes the distinction obvious.

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?

Usage is implied through the metric and the important caveat that 'timeframe filters when ads were last seen, NOT spend accrued during that period' — this prevents a common misuse. However, there is no explicit when-to-use-this-vs-sibling guidance or exclusion of alternatives such as get_top_ads_stats or compare_advertisers.

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