Skip to main content
Glama

linkedin_ad_library_search_ads

LinkedIn publishes run dates, impressions and targeting only on a subset of creatives. Search is the SERP card; source is native|extended. Costs 2 credits. Empty results and failures are never charged. Pass cache=true for a free 24h cache hit (default always fresh).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
qNoAdvertiser / account owner name (min 2 when used). Provide q/company, keyword, or companyId.
cacheNoSet true to serve from the 24h response cache (0 credits on hit). Default false — always fetch fresh.
limitNoMax items to return (default 20, max 200). One LinkedIn SERP page is ~25 cards — when limit is higher, further pages are pulled automatically within the request's time budget, so limit=50 fills to 50 when LinkedIn has the ads (hasMore + nextCursor cover the rest). Flat 2 credits per call on the native path; the extended fallback bills ~3.5 credits per returned ad. Response `source` is native or extended so you can see which price applied.
cursorNoPagination token from paginationToken / nextCursor.
companyNoAlias of q — advertiser / account owner name.
countryNoSingle ISO country code. Default US. Ignored when countries is set. Non-ISO codes are a definitive 400 INVALID_COUNTRY — LinkedIn would otherwise answer an empty result set as if the filter worked.
endDateNoCustom range end YYYY-MM-DD (use with startDate).
keywordNoOptional keyword filter on ad creative copy. Whole-word hits are ordered first; already-fetched SERP cards without a literal hit fill behind them up to limit (matchedFrom [] = ranked fill).
companyIdNoLinkedIn numeric company id for exact advertiser match.
countriesNoComma-separated ISO country codes (e.g. US,CA,MX). Each code is validated — non-ISO codes are a 400 INVALID_COUNTRY.
startDateNoCustom range start YYYY-MM-DD (use with endDate).
paginationTokenNoAlias of cursor.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • changedInput schema / properties / countries / description
      Previous value: -"Comma-separated ISO country codes (e.g. US,CA,MX)."New value: +"Comma-separated ISO country codes (e.g. US,CA,MX). Each code is validated — non-ISO codes are a 400 INVALID_COUNTRY."
    • changedInput schema / properties / country / description
      Previous value: -"Single ISO country code. Default US. Ignored when countries is set."New value: +"Single ISO country code. Default US. Ignored when countries is set. Non-ISO codes are a definitive 400 INVALID_COUNTRY — LinkedIn would otherwise answer an empty result set as if the filter worked."
    • changedInput schema / properties / keyword / description
      Previous value: -"Optional keyword filter on ad creative copy."New value: +"Optional keyword filter on ad creative copy. Whole-word hits are ordered first; already-fetched SERP cards without a literal hit fill behind them up to limit (matchedFrom [] = ranked fill)."
    • changedInput schema / properties / limit / description
      Previous value: -"Max items to return (default 20, max 200). Flat 2 credits per call on the native path; the extended fallback bills ~3.5 credits per returned ad. Response `source` is native or extended so you can see which price applied."New value: +"Max items to return (default 20, max 200). One LinkedIn SERP page is ~25 cards — when limit is higher, further pages are pulled automatically within the request's time budget, so limit=50 fills to 50 when LinkedIn has the ads (hasMore + nextCursor cover the rest). Flat 2 credits per call on the native path; the extended fallback bills ~3.5 credits per returned ad. Response `source` is native or extended so you can see which price applied."
  2. Changed1 schema field changed
    • changedInput schema / properties / cache / description
      Previous value: -"Set true to serve from the 24h response cache (0 credits on hit). Default false — always fetch fresh. Envelope includes cached + cachedAt on hits."New value: +"Set true to serve from the 24h response cache (0 credits on hit). Default false — always fetch fresh."
  3. Changed12 schema fields changed
    • changedInput schema / properties / cache / description
      Previous value: -"Set true to serve from the 24h response cache. Default false — always fetch fresh data."New value: +"Set true to serve from the 24h response cache (0 credits on hit). Default false — always fetch fresh. Envelope includes cached + cachedAt on hits."
    • addedInput schema / properties / company
      Added value: +{
      +  "description": "Alias of q — advertiser / account owner name.",
      +  "type": "string"
      +}
    • changedInput schema / properties / companyId / description
      Previous value: -"LinkedIn numeric company id."New value: +"LinkedIn numeric company id for exact advertiser match."
    • changedInput schema / properties / countries / description
      Previous value: -"Comma-separated ISO codes (e.g. US,CA,MX)."New value: +"Comma-separated ISO country codes (e.g. US,CA,MX)."
    • changedInput schema / properties / country / description
      Previous value: -"ISO country code. Default US."New value: +"Single ISO country code. Default US. Ignored when countries is set."
    • changedInput schema / properties / cursor / description
      Previous value: -"Pagination token from nextCursor/paginationToken."New value: +"Pagination token from paginationToken / nextCursor."
    • changedInput schema / properties / endDate / description
      Previous value: -"YYYY-MM-DD custom range end (with startDate)."New value: +"Custom range end YYYY-MM-DD (use with startDate)."
    • changedInput schema / properties / keyword / description
      Previous value: -"Optional keyword filter on ad copy."New value: +"Optional keyword filter on ad creative copy."
    • changedInput schema / properties / limit / description
      Previous value: -"Max items to return (default 20, max 200). Flat 2 credits on the native path; the extended fallback bills ~3.5 credits per returned ad. Response `source` is native or extended."New value: +"Max items to return (default 20, max 200). Flat 2 credits per call on the native path; the extended fallback bills ~3.5 credits per returned ad. Response `source` is native or extended so you can see which price applied."
    • addedInput schema / properties / paginationToken
      Added value: +{
      +  "description": "Alias of cursor.",
      +  "type": "string"
      +}
    • changedInput schema / properties / q / description
      Previous value: -"Advertiser / account owner (min 2 when used). Or use keyword/companyId."New value: +"Advertiser / account owner name (min 2 when used). Provide q/company, keyword, or companyId."
    • changedInput schema / properties / startDate / description
      Previous value: -"YYYY-MM-DD custom range start (with endDate)."New value: +"Custom range start YYYY-MM-DD (use with endDate)."
  4. Changed1 schema field changed
    • changedInput schema / properties / limit / description
      Previous value: -"Max items to return. Default 20, max 200. Billed per result."New value: +"Max items to return (default 20, max 200). Flat 2 credits on the native path; the extended fallback bills ~3.5 credits per returned ad. Response `source` is native or extended."
  5. Changed8 schema fields changed
    • addedInput schema / properties / companyId
      Added value: +{
      +  "description": "LinkedIn numeric company id.",
      +  "type": "string"
      +}
    • addedInput schema / properties / countries
      Added value: +{
      +  "description": "Comma-separated ISO codes (e.g. US,CA,MX).",
      +  "type": "string"
      +}
    • addedInput schema / properties / cursor
      Added value: +{
      +  "description": "Pagination token from nextCursor/paginationToken.",
      +  "type": "string"
      +}
    • addedInput schema / properties / endDate
      Added value: +{
      +  "description": "YYYY-MM-DD custom range end (with startDate).",
      +  "type": "string"
      +}
    • addedInput schema / properties / keyword
      Added value: +{
      +  "description": "Optional keyword filter on ad copy.",
      +  "type": "string"
      +}
    • changedInput schema / properties / q / description
      Previous value: -"Search query or keywords (min 2 chars)."New value: +"Advertiser / account owner (min 2 when used). Or use keyword/companyId."
    • addedInput schema / properties / startDate
      Added value: +{
      +  "description": "YYYY-MM-DD custom range start (with endDate).",
      +  "type": "string"
      +}
    • removedInput schema / required
      Removed value: -[
      -  "q"
      -]
  6. Changed1 schema field changed
    • changedInput schema / properties / cache / description
      Previous value: -"Responses are cached for 24 hours by default. Set false to bypass the cache and always fetch fresh data (default true)."New value: +"Set true to serve from the 24h response cache. Default false — always fetch fresh data."
  7. Changed1 schema field changed
    • addedInput schema / properties / cache
      Added value: +{
      +  "description": "Responses are cached for 24 hours by default. Set false to bypass the cache and always fetch fresh data (default true).",
      +  "type": "boolean"
      +}
  8. Added

TDQS

A3.5/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does a solid job: it discloses credit costs (`Costs 2 credits`), the free cache behavior (`Pass cache=true for a free 24h cache hit`), the no-charge policy on empty/failed results, the native|extended source split, and a real data limitation (run dates/impressions/targeting only on a subset). It does not mention auth, rate limits, or response structure, but the key behavioral traits are present.

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 description is compact and front-loaded with the most important caveat about data availabilitychers. The phrase 'Search is the SERP card' is awkward and slightly redundant with the tool name, but overall every sentence carries meaningful operational information.

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 12-parameter tool with no output schema, the description is reasonably complete: it covers cost, cache behavior, failure charging, data availability, and source. The schema fills in exhaustive parameter details. Missing return-value format and explicit pagination behavior, but pagination tokens are hinted in schema descriptions, so the gap is modest.

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 description coverage is 100%, so the schema documents all parameters thoroughly. The description adds a single behavioral nuance for the `cache` parameter and clarifies response `source` values, but does not substantially expand on the schema's parameter semantics. 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 states it searches LinkedIn Ad Library ads and indicates the result type ('Search is the SERP card; source is native|extended'), though the phrasing is somewhat oblique and it never uses an explicit verb like 'search for ads.' It is distinguishable from sibling `linkedin_ad_library_ad_details` but does not directly name it.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit when-to-use guidance or comparison with alternatives is provided. The description focuses on cost, caching, and data caveats rather than telling an agent when to prefer this over `linkedin_ad_library_ad_details` or `linkedin_company`. Usage is only implied by the tool's name and context.

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.