Skip to main content
Glama

Create Audience

create_audience

Create an audience from one or more existing segments. Audiences are the delivery payload — they have no subtype. To create typed cohorts (filter, matched, similarity, propensity), use create_segment instead. Accepts segment_refs: [{segment_id, role: include|exclude}] to compose the audience with per-segment inclusion/exclusion control. set_logic controls how include-role segments are combined (union or intersection). Returns audience_id, status and campaign_id immediately. Use record_count only for a verified count of this exact composition. Optional campaign_id links the new audience to that campaign (an audience belongs to at most one); omit it to leave the audience unlinked — link it later with link_audience_to_campaign. Requires 'creator' scope.

Input Schema

NameRequiredDescriptionDefault
nameYesHuman-readable audience name
set_logicNoHow include-role segments are combined: 'union' (OR, default) or 'intersection' (AND)union
campaign_idNoOptional campaign to link the new audience to (see list_campaigns). An unknown ID is rejected with INVALID_CAMPAIGN_ID and nothing is created.
record_countNoLegacy caller-provided count for this exact composition. Prefer omitting it and calling recount_audience. The server may reuse a valid saved member count; otherwise record_count is null
segment_refsYesArray of segment references with roles. Must include at least one include-role segment.

Output Schema

NameRequiredDescriptionDefault
nameYes
statusYes
guidanceNoInterpretation or recovery guidance for this result
set_logicNoHow included segments combine; excluded segments always subtract
count_unitNo
page_countNoNumber of objects on this page, not the organization total
audience_idYes
campaign_idNo
count_stateNoUnknown means no count; available does not guarantee freshness. Recount for a current value.
segment_idsYes
next_actionsNoSuggested next calls using returned IDs and available scopes. Not executed and not user consent.
record_countNoSaved composition count; null is unknown. Use recount_audience for a current value.
money_displayNoCurrency amounts formatted once from source paths ending in _cents. Use verbatim; do not divide again. Null/missing source amounts are omitted, not zero.
population_inputNoPopulation input used for the preview; IDs refer to their current saved definitions
excluded_segment_idsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added
  2. Removed
  3. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Beyond the annotations, it discloses the required 'creator' scope, the immediate return fields, and the cardinality constraint that an audience belongs to at most one campaign. It also clarifies that record_count is only for a verified count of the exact composition.

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 front-loaded with purpose and sibling differentiation, then moves through composition, return behavior, optional parameters, and auth scope. Despite its length, each sentence supports correct invocation or disambiguation.

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?

Given the tool has five parameters, an output schema, and annotations, the description covers the critical creation flow, segment composition, campaign linking, return timing, and permission requirement. No material decision-making detail is missing for an agent to call it correctly.

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 useful operational meaning around record_count and campaign_id, including omitting campaign_id to link later, though much of the per-parameter detail is already present in the schema.

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 gives a specific verb and resource: 'Create an audience from one or more existing segments.' It also distinguishes audiences from typed cohorts and explicitly routes agents to create_segment for that separate purpose.

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?

It states the key alternative: use create_segment for typed cohorts such as filter, matched, similarity, and propensity. It also explains when to use campaign_id versus linking later with link_audience_to_campaign.

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.

Resources