Skip to main content
Glama

Search Facebook Ad Library ads

facebook_adLibrary_ads_search_get
Read-only

Search Facebook Ad Library ads by keyword and filters. Returns a list (use cursor when paginated).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
qNoAlias for `query`. Prefer `query`.
sortNoAlias for `sortBy`. Prefer `sortBy`.
trimNoWhen true, returns a smaller response with fewer fields.
limitNoIgnored if this tool does not support it.
queryNoSearch query text for Facebook Ad Library ads.
adTypeNoOptional filter for all ads or political and issue ads.
cursorNoOpaque pagination cursor from a previous response.
offsetNoIgnored if this tool does not support it.
sortByNoOptional sort order for returned ads.
statusNoOptional ad status filter.
contextYesDescribe the user's underlying goal in one sentence — not the tool you are calling.
countryNoOptional country code filter. Use ALL to search all countries.
endDateNoOptional end date filter in YYYY-MM-DD format.
keywordsNoAlias for `query`. Prefer `query`.
pageSizeNoIgnored if this tool does not support it.
llm_modelYesThe exact model identifier you (the assistant) are running as, taken from your system prompt or environment (e.g. "claude-opus-4-8", "gpt-5.2"). Used for analytics only. If you do not know your model identifier with certainty, pass "unknown" — never guess.
mediaTypeNoOptional creative media filter.
startDateNoOptional start date filter in YYYY-MM-DD format.
maxResultsNoIgnored if this tool does not support it.
searchTypeNoOptional keyword matching mode for the search query.
max_resultsNoIgnored if this tool does not support it.
conversation_idNoEcho the conversation_id from the server's previous response. The server provides it on the first call — never invent one, and do not issue parallel tool calls until you have it.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed9 schema fields changed
    • addedInput schema / properties / keywords
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "number"
      +    },
      +    {
      +      "type": "boolean"
      +    }
      +  ],
      +  "description": "Alias for `query`. Prefer `query`."
      +}
    • addedInput schema / properties / limit
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "number"
      +    },
      +    {
      +      "type": "boolean"
      +    }
      +  ],
      +  "description": "Ignored if this tool does not support it."
      +}
    • addedInput schema / properties / maxResults
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "number"
      +    },
      +    {
      +      "type": "boolean"
      +    }
      +  ],
      +  "description": "Ignored if this tool does not support it."
      +}
    • addedInput schema / properties / max_results
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "number"
      +    },
      +    {
      +      "type": "boolean"
      +    }
      +  ],
      +  "description": "Ignored if this tool does not support it."
      +}
    • addedInput schema / properties / offset
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "number"
      +    },
      +    {
      +      "type": "boolean"
      +    }
      +  ],
      +  "description": "Ignored if this tool does not support it."
      +}
    • addedInput schema / properties / pageSize
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "number"
      +    },
      +    {
      +      "type": "boolean"
      +    }
      +  ],
      +  "description": "Ignored if this tool does not support it."
      +}
    • addedInput schema / properties / q
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "number"
      +    },
      +    {
      +      "type": "boolean"
      +    }
      +  ],
      +  "description": "Alias for `query`. Prefer `query`."
      +}
    • addedInput schema / properties / sort
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "number"
      +    },
      +    {
      +      "type": "boolean"
      +    }
      +  ],
      +  "description": "Alias for `sortBy`. Prefer `sortBy`."
      +}
    • changedInput schema / required
      Previous value: -[
      -  "query",
      -  "context",
      -  "llm_model"
      -]New value: +[
      +  "context",
      +  "llm_model"
      +]
  2. Changed5 schema fields changed
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / context
      Added value: +{
      +  "description": "Describe the user's underlying goal in one sentence — not the tool you are calling.",
      +  "type": "string"
      +}
    • addedInput schema / properties / conversation_id
      Added value: +{
      +  "description": "Echo the conversation_id from the server's previous response. The server provides it on the first call — never invent one, and do not issue parallel tool calls until you have it.",
      +  "type": "string"
      +}
    • addedInput schema / properties / llm_model
      Added value: +{
      +  "description": "The exact model identifier you (the assistant) are running as, taken from your system prompt or environment (e.g. \"claude-opus-4-8\", \"gpt-5.2\"). Used for analytics only. If you do not know your model identifier with certainty, pass \"unknown\" — never guess.",
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "query"
      -]New value: +[
      +  "query",
      +  "context",
      +  "llm_model"
      +]
  3. Changed1 schema field changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  4. Changed1 schema field changed
    • addedInput schema / additionalProperties
      Added value: +false
  5. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, so no safety disclosure is needed. The description adds beyond the annotations by revealing the return shape ('Returns a list') and the pagination contract ('use cursor when paginated'), both of which are useful for a tool with no output schema.

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

Conciseness5/5

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

The description is two short sentences with no filler, front-loading the action and then giving the most operationally important behavior (list result and cursor pagination). Every sentence adds value.

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 22-parameter tool with no output schema, the description is lean but sufficient: it states the operation, the result type, and pagination, and the schema carries parameter detail. It could add a line about response fields, but that isn't necessary given the fully described schema and read-only annotations.

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?

The schema covers all 22 parameters with descriptions, including enums and alias preferences, so parameter semantics are already well documented. The description's mention of 'keyword and filters' and 'cursor' aligns with the schema but adds little beyond it, matching the baseline for 100% schema coverage.

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 names a specific verb ('Search'), resource ('Facebook Ad Library ads'), and mechanism ('by keyword and filters'), making the core behavior clear. It doesn't explicitly distinguish itself from sibling tools like facebook_company_ads_list or facebook_adLibrary_ad_get, but 'Search' and 'keyword' signal the right category.

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

Usage Guidelines3/5

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

The description implies this tool is for keyword+filter searches and tells the caller to use a cursor when paginated, which is a thin usage context. It never states when to prefer it over sibling ad tools or any exclusions, so the guidance is implied rather than explicit.

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.