Skip to main content
Glama

Search LinkedIn's Ad Library

search_linkedin_ads

Search the ads LinkedIn shows in its public Ad Library, by advertiser, by words in the ad or by company id, optionally by country and date: each ad's advertiser, format, headline, text, image or video, call to action, where it leads, when it ran, its impressions range and its targeting, about 25 a page. Use this to watch what a competitor advertises. Give exactly one of advertiser or company_id or query. Costs 3 credits, cached or not; a failed call is refunded.

Input Schema

NameRequiredDescriptionDefault
freshNoSkip the cache and fetch now. Charged normally. Not available on trial credits — buy any pack to unlock it.
queryNoWords in the ad.
cursorNoThe `meta.next_cursor` from the previous page. Omit for the first page.
end_dateNoOnly ads shown on or before this day, `YYYY-MM-DD`, before today. With `start_date`.
countriesNoOnly ads shown in these countries: two-letter codes, comma-separated, e.g. `US,GB`.
advertiserNoThe advertiser's name, as the library searches it. It matches loosely: a person whose name contains it can appear.
company_idNoLinkedIn's numeric id for the company, `company_id` in linkedin/company: that company's ads only.
start_dateNoOnly ads shown on or after this day, `YYYY-MM-DD`, within the last year. With `end_date`.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / company_id / examples
      Added value: +[
      +  "1035"
      +]
    • addedInput schema / properties / query / examples
      Added value: +[
      +  "electric cars"
      +]
  2. First observed

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations present, the description carries the full burden and does so well: it discloses cost (3 credits regardless of cache), that failed calls are refunded, page size (~25 a page), and the cache/fresh distinction. These are exactly the operational facts an agent needs before invoking a paid call.

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 purpose, then the return shape, then the usage hint, then cost — a sensible order. The middle sentence is long and comma-heavy, but nearly every clause earns its place by describing retrievable fields.

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 an 8-param, no-output-schema tool, the description compensates by listing the returned fields (advertiser, format, headline, text, media, CTA, destination, run dates, impressions range, targeting) and the pagination mechanism via the schema's meta.next_cursor. Nothing material for a correct first call is missing.

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 description coverage is 100%, so the field-level meaning of each parameter is already documented; baseline would be 3. The description adds value beyond the schema by surfacing the exactly-one-of(advertiser | company_id | query) exclusivity rule, which the empty required array does not express.

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?

States a specific verb+resource ('Search the ads LinkedIn shows in its public Ad Library') and enumerates the searchable axes (advertiser, ad words, company id, country, date), which cleanly separates it from the sibling get_linkedin_ad and search_tiktok_ads. It also previews the returned record, so an agent knows what it is buying before opening the schema.

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?

'Use this to watch what a competitor advertises' supplies a concrete use case, and 'Give exactly one of advertiser or company_id or query' is a hard selection rule the agent must obey. It does not explicitly contrast itself with get_linkedin_ad or state when-not to use it, so it stops short of full routing guidance.

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.