Skip to main content
Glama

tiktok_ad_library_search

Search TikTok Commercial Content Library — relevance-filtered, uniform null schema (2 credits). 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
qYesKeyword or advertiser to search TikTok Commercial Content Library (min 2 characters).
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). Flat 2 credits per call.
matchNoKeyword token mode: "any" (default, OR whole-word) or "all" (AND). hair ≠ wheelchair. Literal hits lead; already-fetched SERP ads fill behind them up to limit (matchedFrom [] = ranked fill). Empty results are free.
countryNoTwo-letter ISO country code (e.g. GB, DE, FR). Default GB. TikTok's Commercial Content Library only covers the EU/EEA, the UK and Switzerland (32 countries) — other codes (US, SA, …) return 400 UNSUPPORTED_REGION with the supported list; TikTok has no ad-library data for them.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / country / description
      Previous value: -"Two-letter ISO country code (e.g. GB, DE, FR). Default GB (EU DSA library; US often empty)."New value: +"Two-letter ISO country code (e.g. GB, DE, FR). Default GB. TikTok's Commercial Content Library only covers the EU/EEA, the UK and Switzerland (32 countries) — other codes (US, SA, …) return 400 UNSUPPORTED_REGION with the supported list; TikTok has no ad-library data for them."
    • changedInput schema / properties / match / description
      Previous value: -"Keyword token mode: \"any\" (default, OR whole-word) or \"all\" (AND). hair ≠ wheelchair. Empty results are free."New value: +"Keyword token mode: \"any\" (default, OR whole-word) or \"all\" (AND). hair ≠ wheelchair. Literal hits lead; already-fetched SERP ads fill behind them up to limit (matchedFrom [] = ranked fill). Empty results are free."
  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. Changed5 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."
    • changedInput schema / properties / country / description
      Previous value: -"ISO country code. Default GB (US often empty)."New value: +"Two-letter ISO country code (e.g. GB, DE, FR). Default GB (EU DSA library; US often empty)."
    • 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 per call."
    • changedInput schema / properties / match / description
      Previous value: -"Keyword mode: \"any\" (default) or \"all\"."New value: +"Keyword token mode: \"any\" (default, OR whole-word) or \"all\" (AND). hair ≠ wheelchair. Empty results are free."
    • changedInput schema / properties / q / description
      Previous value: -"Search query or keywords (min 2 chars)."New value: +"Keyword or advertiser to search TikTok Commercial Content Library (min 2 characters)."
  4. Changed1 schema field changed
    • addedInput schema / properties / match
      Added value: +{
      +  "description": "Keyword mode: \"any\" (default) or \"all\".",
      +  "type": "string"
      +}
  5. Changed1 schema field changed
    • changedInput schema / properties / country / description
      Previous value: -"ISO country code. Default DE."New value: +"ISO country code. Default GB (US often empty)."
  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

A4.3/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It does well: it discloses the credit cost (2 credits), the free-cache behavior, the free empty-results/failures policy, the region limitation with the 400 UNSUPPORTED_REGION error, and the ranked-fill behavior with matchedFrom. This is substantial behavioral context beyond what the schema provides. It could add a bit more about pagination or rate limits, but the disclosed behaviors are genuinely useful.

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 core purpose and cost. The additional behavioral details are packed into the parameter descriptions rather than the main description, which keeps the main text tight. It's slightly dense in the match parameter, but every sentence earns its place. A small deduction for the main description being a bit telegraphic with parentheticals.

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 search tool with 5 parameters, no output schema, and no annotations, the description covers the essential operational context: cost, caching, region limits, match semantics, and fill behavior. The main gap is that it doesn't describe the return shape or fields of the results, but since there's no output schema, an agent might benefit from knowing what the response contains. Still, the description is quite complete for the tool's complexity.

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 baseline is 3. The description adds meaningful semantics beyond the schema: it explains the credit implications of cache, the 'hair ≠ wheelchair' example for match modes, the ranked-fill behavior with matchedFrom, and the region error behavior. This goes beyond the schema's parameter descriptions and helps an agent choose parameter values correctly.

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 opens with a specific verb and resource ('Search TikTok Commercial Content Library') and immediately distinguishes it from the sibling tools by noting the relevance-filtered, uniform null schema and credit cost. It clearly identifies what this tool does and how it differs from related ad-library tools like facebook_ad_library_search or tiktok_ad_library_top_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?

The description gives clear context for when to use this tool: searching TikTok's Commercial Content Library with keyword or advertiser queries. It explains the cache behavior and the region limitation (EU/EEA/UK/CH only), which helps an agent decide when this tool is appropriate. However, it doesn't explicitly name sibling alternatives or state when NOT to use this tool in favor of another ad-library search tool.

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.