Skip to main content
Glama

create_custom_audience

Create a Meta Ads custom audience for targeting by defining its name and subtype, such as website, app, customer list, or engagement.

Instructions

Create a new custom audience. Subtype determines the audience source (CUSTOM, WEBSITE, APP, OFFLINE_CONVERSION, LOOKALIKE, ENGAGEMENT, etc.).

Input Schema

NameRequiredDescriptionDefault
nameYesAudience name
ruleNoJSON object defining website, video, or engagement audience rules. This creates an audience; validate-only is not supported.
subtypeYesAudience subtype
pixel_idNoPixel ID for website audiences
account_idNoAd account ID to create the audience in (e.g. 'act_123' or '123'). Falls back to META_AD_ACCOUNT_ID env var if omitted.
descriptionNoAudience description
retention_daysNoRetention period; allowed range depends on the audience source
customer_file_sourceNoSource of customer file: USER_PROVIDED_ONLY, PARTNER_PROVIDED_ONLY, BOTH_USER_AND_PARTNER_PROVIDED

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv1.6.1
    • addedInput schema / properties / account_id
      Added value: +{
      +  "description": "Ad account ID to create the audience in (e.g. 'act_123' or '123'). Falls back to META_AD_ACCOUNT_ID env var if omitted.",
      +  "type": "string"
      +}
    • addedInput schema / properties / pixel_id
      Added value: +{
      +  "description": "Pixel ID for website audiences",
      +  "type": "string"
      +}
    • addedInput schema / properties / retention_days
      Added value: +{
      +  "description": "Retention period; allowed range depends on the audience source",
      +  "exclusiveMinimum": 0,
      +  "type": "integer"
      +}
    • addedInput schema / properties / rule
      Added value: +{
      +  "description": "JSON object defining website, video, or engagement audience rules. This creates an audience; validate-only is not supported.",
      +  "type": "string"
      +}
  2. First observedv1.2.0

TDQS

B3.1/5.0
Behavior2/5

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

With no annotations at all, the description carries the full behavioral burden and delivers very little: it does not state permission requirements, that this is an irreversible write, which fields are mandatory per subtype (pixel_id for WEBSITE, rule for engagement/video), or what happens when a required companion field is missing. The "validate-only is not supported" caveat lives in the schema, not the description.

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?

Two short sentences with the core action front-loaded and the subtype semantics attached directly to it. No filler and nothing an agent must read past to find the important constraint.

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

Completeness2/5

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

For an 8-parameter, no-annotation, no-output-schema mutation tool with subtype-conditional required fields, the description is too thin. It never explains which parameters become mandatory for which subtype, which is the single most likely source of a failed call.

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, and the description adds meaning the schema lacks by explaining that subtype is a causal selector of the audience source. It stops short of covering the other seven parameters, so it is a modest rather than comprehensive uplift.

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?

States a specific verb and resource ("Create a new custom audience") and immediately explains that subtype drives the audience source. It does not differentiate itself from the sibling create_lookalike_audience, even though LOOKALIKE appears in its own subtype enum, which leaves a real ambiguity unresolved.

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 when-to-use guidance and no comparison against alternatives such as create_lookalike_audience or list_custom_audiences. The only contextual hint is that subtype determines the source, which is a mechanic rather than guidance about when to pick this tool.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools