Skip to main content
Glama
This connector has been deprecated

Replaced by io.github.no-fait/infinite-audience

Create Audience

create_audience

Create an audience from one or more existing segments. Audiences are the delivery payload — they have no subtype. To create filter or matched cohorts, 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.

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": {
      "name": "<name>",
      "segment_refs": "<segment_refs>"
    },
    "name": "create_audience"
  }
}

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.
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. Added

TDQS

A4.8/5.0
Behavior5/5

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

Annotations establish that this is a non-destructive, non-idempotent write operation, and the description adds substantial behavior not in the annotations: it returns audience_id, status, and campaign_id immediately, an unknown campaign ID causes INVALID_CAMPAIGN_ID with nothing created, an audience belongs to at most one campaign, and the tool requires 'creator' scope.

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 dense but well ordered: creation purpose, subtype distinction, segment_refs semantics, set_logic, return values, record_count caution, campaign linking, and scope requirement. A few points, such as campaign linking and record_count behavior, restate schema descriptions, but every sentence carries relevant information.

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 that an output schema exists and annotations cover safety hints, the description still fills the important gaps: it explains composition semantics, return immediacy, campaign linking behavior, failure behavior for an invalid campaign, and required scope. An agent has enough context to invoke it correctly and to choose it over create_segment.

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 coverage is 100%, so the baseline is 3, and the description adds useful semantic guidance beyond the schema: segment_refs compose include/exclude roles, set_logic combines include-role segments, record_count should be used only for a verified count of the exact composition, and campaign_id can be omitted to leave the audience unlinked. Much of this is also present in the rich schema descriptions, so it does not reach the highest level of added meaning.

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?

States a specific verb and resource ('Create an audience from one or more existing segments') and immediately distinguishes it from create_segment by naming the alternative for filter or matched cohorts. The scope note that audiences have no subtype further separates it from sibling tools.

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?

Explicitly names create_segment as the alternative and states the condition that selects it. It also gives when/when-not guidance for record_count and campaign_id, including the alternative of omitting campaign_id and 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