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. Costs 2 credits. Empty results and failures are never charged. Pass cache=true for a free 24h cache hit (default always fresh).

Input 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

B3/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 deliver non-obvious operational facts: 2-credit cost, empty results and failures are never charged, the 24h cache option, and the caveat that LinkedIn only publishes run dates/impressions/targeting on a subset of creatives. It omits auth requirements, rate limits, and a clear explanation of the native vs extended source distinction.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Four dense sentences, but the lead sentence is a coverage caveat rather than the purpose, and 'Search is the SERP card; source is native' is cryptic filler that does not earn its place. Pricing and caching sentences are load-bearing.

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

Completeness3/5

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

For a 12-parameter search tool with no annotations and no output schema, the description covers billing and caching well but says nothing about what an ad record contains, pagination behavior, or how to interpret the source field — gaps the schema only hints at.

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 baseline is 3. The description restates the cache parameter and adds the 2-credit pricing context, but adds no syntax or meaning beyond what the schema already documents for q/company, country, keyword, dates, and cursor.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description never plainly states 'search LinkedIn ads' — it opens with a data-availability caveat and a cryptic fragment ('Search is the SERP card; source is native'). The tool's actual function is inferable from the name, not the prose. It also does not distinguish itself from linkedin_ad_library_ad_details or the other ad-library siblings.

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?

There is no guidance on when to use this versus linkedin_ad_library_ad_details or other ad-library tools. The only actionable hint is the cache=true vs default-fresh note, which is a parameter choice rather than a when-to-use condition or exclusion.

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.