Skip to main content
Glama

Custom audiences

meta_audience

Create a custom audience. create_website: from pixel events and URL rules (up to 180 days). create_lookalike: from a seed audience in the same account; ratios are 0 to 1. create_engagement: from a Facebook Page or Instagram business account. To delete one, use meta_delete_audience. Changes the ad account: tell the user exactly what will change and call only after their Yes. If the result lists rule reasons, nothing changed: show them, ask again, and only after a new Yes retry with acknowledge_rules: true.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "action": "<action>",
      "account_id": "<account_id>",
      "name": "<name>"
    },
    "name": "meta_audience"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYes
eventNoRequired for create_engagement
ratioNoOnly create_lookalike
actionYes
countryNoRequired for create_lookalike
prefillNoOnly create_website
pixel_idNoRequired for create_website. A string, never a number
source_idNoRequired for create_engagement. A string, never a number
account_idYese.g. act_1234567890
descriptionNo
source_typeNoRequired for create_engagement
url_containsNoOnly create_website
exclude_eventsNoOnly create_website
include_eventsNoOnly create_website
retention_daysNoDefault 30; create_website max 180
starting_ratioNoOnly create_lookalike
acknowledge_rulesNoOnly on a retry after the user's Yes to rule reasons; never on a first call.
origin_audience_idNoRequired for create_lookalike. A string, never a number
exclude_url_containsNoOnly create_website

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A5/5.0
Behavior5/5

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

Annotations only say this is a non-idempotent, non-read-only write; the description adds the things annotations cannot: that the call mutates the ad account, that explicit user confirmation is required first, and the exact failure semantics when rule reasons come back (nothing changed, re-confirm before retrying with acknowledge_rules). That is substantive behavior disclosure rather than a restatement of hints.

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?

Front-loaded with the core verb and resource, then one short clause per action variant, then the alternative tool, then the confirmation protocol. Every sentence carries distinct operational information — action routing, deletion routing, or the consent/retry procedure — with no filler.

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 a 19-parameter, three-mode creation tool with no output schema, this is complete: it tells the agent how to choose a mode, what each mode needs at a high level, how to handle the one non-obvious return case (rule reasons), and that consent must precede the call. Nothing needed to invoke it correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is already 84%, so most parameters carry their own descriptions; the description mainly mirrors that mapping (event, pixel_id, source_id, origin_audience_id, ratio bounds, 180-day website retention) rather than adding new meaning. The baseline of 3 applies when the schema does the heavy lifting, and the description only partially exceeds it by tying parameters to the action branches.

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?

Opens with a specific verb+resource ("Create a custom audience") and then breaks the tool into its three concrete actions (create_website, create_lookalike, create_engagement) with the data source each draws from. It also names the sibling that handles the opposite operation (meta_delete_audience), so the agent can separate creation from deletion without opening either schema.

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

Usage Guidelines5/5

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

Gives an explicit routing rule to the alternative tool ("To delete one, use meta_delete_audience") plus per-action conditions that determine which variant to pick. It also spells out the human-in-the-loop protocol — describe the change, wait for "Yes", and on rule reasons stop, report, and retry only after a new Yes with acknowledge_rules: true.

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.