Skip to main content
Glama
Alidade MCP

Alidade MCP

Official
by alidade-ai

Search ads

search_ads
Read-only

Search paid ads across Google, Meta, and LinkedIn ad libraries by entity, date range, keywords, or platform to review ad copy, creative URLs, run dates, and spend ranges.

Instructions

The paid ads run by the entities in the scope, collected from the Google, Meta, and LinkedIn ad libraries, newest first by default: copy, link, creative URLs, run dates, reported impression and spend ranges, and a link to the ad's public ad-library page. Scope with savedSearchId or entityIds like the other tools; the date range keeps every ad whose run overlaps it, keyword filters match the ad's headline and body, and adPlatforms (google, meta, linkedin) narrows the ad libraries — a saved search's platform filter does not apply to ads. Requires the mentions API tier, and every returned ad counts against the workspace's monthly post quota — keep pageSize small (default 25) and only paginate when needed.

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": "search_ads"
  }
}

Input Schema

NameRequiredDescriptionDefault
sortNoSort order by when the ad ran: its start date, else its end date, else (for ads the library reports no dates for) when Alidade first collected it.newest
cursorNoOpaque pagination cursor from a previous response's `nextCursor`. Use the same query parameters across paged requests.
dateToNoOnly include ads that started running on or before this date (ISO 8601). A date-only value (`2026-01-31`) includes that whole day, UTC. Overrides the saved search's range end; its range start is kept unless `dateFrom` is also provided.
dateFromNoOnly include ads still running on or after this date (ISO 8601). Ads without run dates match by when Alidade saw them listed (`firstSeenAt`–`lastSeenAt`). A date-only value (`2026-01-31`) means the start of that day, UTC. Overrides the saved search's range start; its range end is kept unless `dateTo` is also provided.
keywordsNoComma-separated keywords to filter ad headline and body text by (e.g. `sustainability,net zero`). Replaces the saved search's keyword filters. Cannot be combined with `booleanQuery`.
pageSizeNoNumber of items per page (max 100, default 25).
entityIdsNoComma-separated entity IDs (max 100) for an ad-hoc scope, treated as a single comparison group. Provide either this or `savedSearchId`.
adPlatformsNoComma-separated ad libraries to include. Valid values: google, meta, linkedin. Omit for all. A saved search's platform filter applies to posts, not ads.
booleanQueryNoBoolean keyword query matching the app's advanced search mode (e.g. `"net zero" AND (solar OR wind)`). Syntax: AND/OR/NOT (upper case), parentheses, quoted phrases with optional proximity (`"health care"~3` = up to 3 words between, any phrase length, max 20), NEAR/N (either order) and THEN/N (ordered) between terms or groups, wildcards (`elect*`, `wom?n`), fuzzy (`medicaid~1`, max 2). Always use explicit operators between terms. Mixing AND or NOT with OR at the same depth is an error — parenthesize to make precedence explicit (`(a AND b) OR c`, `(a OR b) NOT c`). NEAR/THEN bind tighter than AND/OR — parenthesize a proximity expression that sits next to AND/OR (`(a NEAR/5 b) OR c`, `(a OR b) NEAR/5 c`). NOT is not allowed inside NEAR/THEN; exclude outside the proximity expression. Matching is exact-token, case- and accent-insensitive (no stemming) — cover word variants with OR or a wildcard (`tariff OR tariffs`, `tariff*`). Korean attaches particles to words, so put a trailing wildcard on each Korean term (`검색*`). Hindi is written in Devanagari and romanized, so OR both forms (`(दोस्त OR dost)`); Devanagari and Tamil matching ignores vowel signs, so expect some unrelated matches. Comments are ignored by search: `//` to the end of the line, `<<< >>>` inline or across lines. Full syntax: https://docs.alidade-ai.com/search-syntax. Cannot be combined with the keyword parameters.
keywordMatchNoWhether posts must match `any` (default) or `all` of `keywords`.
savedSearchIdNoID of a saved search to scope the request to. Its comparison groups, date range, and keyword filters apply; its platform filter applies to posts, not ads (use `adPlatforms`). Only entities your workspace can access are included; a saved search with none returns 422. Provide either this or `entityIds`.
excludeKeywordsNoComma-separated keywords that matching posts must not contain (exact word/phrase match). Replaces the saved search's keyword filters. Cannot be combined with `booleanQuery`.
keywordMatchTypeNo`exact` (default) matches the exact words or phrases only; `stemmed` also matches English word variants (run/running). Applies to `keywords`.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv0.1.3
    • addedInput schema / additionalProperties
      Added value: +false
    • changedInput schema / properties / booleanQuery / description
      Previous value: -"Boolean keyword query matching the app's advanced search mode (e.g. `\"net zero\" AND (solar OR wind)`). Syntax: AND/OR/NOT (upper case), parentheses, quoted phrases with optional proximity (\"health care\"~3 = up to 3 words between, any phrase length, max 20), NEAR/N (either order) and THEN/N (ordered) between terms or groups, wildcards (elect*, wom?n), fuzzy (medicaid~1, max 2). Always use explicit operators between terms. Mixing AND or NOT with OR at the same depth is an error — parenthesize to make precedence explicit ((a AND b) OR c, (a OR b) NOT c). NEAR/THEN bind tighter than AND/OR — parenthesize a proximity expression that sits next to AND/OR ((a NEAR/5 b) OR c, (a OR b) NEAR/5 c). NOT is not allowed inside NEAR/THEN; exclude outside the proximity expression. Matching is exact-token, case- and accent-insensitive (no stemming) — cover word variants with OR or a wildcard (tariff OR tariffs, tariff*). Korean attaches particles to words, so put a trailing wildcard on each Korean term (검색*). Hindi is written in Devanagari and romanized, so OR both forms ((दोस्त OR dost)); Devanagari and Tamil matching ignores vowel signs, so expect some unrelated matches. Comments are ignored by search: // to the end of the line, <<< >>> inline or across lines. Full syntax: https://docs.alidade-ai.com/search-syntax. Replaces the saved search's keyword filters. Cannot be combined with the keyword parameters."New value: +"Boolean keyword query matching the app's advanced search mode (e.g. `\"net zero\" AND (solar OR wind)`). Syntax: AND/OR/NOT (upper case), parentheses, quoted phrases with optional proximity (`\"health care\"~3` = up to 3 words between, any phrase length, max 20), NEAR/N (either order) and THEN/N (ordered) between terms or groups, wildcards (`elect*`, `wom?n`), fuzzy (`medicaid~1`, max 2). Always use explicit operators between terms. Mixing AND or NOT with OR at the same depth is an error — parenthesize to make precedence explicit (`(a AND b) OR c`, `(a OR b) NOT c`). NEAR/THEN bind tighter than AND/OR — parenthesize a proximity expression that sits next to AND/OR (`(a NEAR/5 b) OR c`, `(a OR b) NEAR/5 c`). NOT is not allowed inside NEAR/THEN; exclude outside the proximity expression. Matching is exact-token, case- and accent-insensitive (no stemming) — cover word variants with OR or a wildcard (`tariff OR tariffs`, `tariff*`). Korean attaches particles to words, so put a trailing wildcard on each Korean term (`검색*`). Hindi is written in Devanagari and romanized, so OR both forms (`(दोस्त OR dost)`); Devanagari and Tamil matching ignores vowel signs, so expect some unrelated matches. Comments are ignored by search: `//` to the end of the line, `<<< >>>` inline or across lines. Full syntax: https://docs.alidade-ai.com/search-syntax. Cannot be combined with the keyword parameters."
    • addedInput schema / properties / pageSize / default
      Added value: +25
    • changedInput schema / properties / pageSize / description
      Previous value: -"Items per page (max 100, default 25)."New value: +"Number of items per page (max 100, default 25)."
    • addedInput schema / properties / sort / default
      Added value: +"newest"
    • changedInput schema / properties / sort / description
      Previous value: -"Sort order by when the ad ran: its start date, else its end date, else (for ads the library reports no dates for) when Alidade first collected it. Default newest."New value: +"Sort order by when the ad ran: its start date, else its end date, else (for ads the library reports no dates for) when Alidade first collected it."
  2. Addedv0.1.2

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the readOnlyHint annotation, it discloses two operationally critical facts an agent cannot infer from schema: the mentions API tier is required, and every returned ad consumes the workspace's monthly post quota, which directly justifies small page sizes. It also states the default ordering rule ('newest first by default'), so cost and safety behavior are both covered.

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 output content is front-loaded in the first sentence and the rest is dense, purposeful clauses about scoping, filtering, and cost, with no filler. It is a single long paragraph, so the quota/tier warning at the end is easier to skim past than it should be, and a couple of schema details are repeated.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 13-parameter, zero-required search tool with no output schema, the description compensates well by describing the returned fields, the default sort, pagination cost constraints, and tier requirements. An agent has everything needed to construct a valid, non-wasteful call.

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?

Schema coverage is 100%, so the baseline is 3, but the description adds cross-parameter meaning the schema only states piecewise: the date range 'keeps every ad whose run overlaps it' rather than simply bounding start/end dates, and it clarifies that a saved search's platform filter does not apply to ads so adPlatforms must be used. Those are genuine semantic additions, though much of the field detail is restated from the schema.

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 states a concrete resource (paid ads from the Google, Meta, and LinkedIn ad libraries) and enumerates exactly what is returned: copy, link, creative URLs, run dates, impression/spend ranges, and the ad-library page link. That enumeration makes the boundary against search_mentions and search_articles unmistakable, since it explicitly notes that a saved search's platform filter applies to posts, not ads.

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?

It gives clear operating guidance: scope via savedSearchId or entityIds, date ranges select by run-overlap, keyword filters hit headline and body, and adPlatforms narrows the libraries independent of a saved search's filter. It also sets a pagination discipline ('keep pageSize small... only paginate when needed'). It stops short of naming a sibling tool to use instead for social posts or articles, which is the only missing piece for a 5.

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