Skip to main content
Glama
This connector has been deprecated

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

Patch Audience

patch_audience
DestructiveIdempotent

Edit name, description or labels, archive/restore, or change the composition of an existing audience. Also supports adding/removing included or excluded segments. set_logic must be "union" or "intersection" — never "exclusion". To exclude records, use add_excluded_segment_id. 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": {
      "audience_id": "<audience_id>"
    },
    "name": "patch_audience"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNoNew display name for the audience
labelsNoDescriptive labels; an empty array clears them
statusNoStatus transition: active once ready, archived to hide from the default list; active restores it
set_logicNoChange inclusion logic: "union" (OR) or "intersection" (AND)
audience_idYesThe audience ID returned by create_audience or list_audiences
descriptionNoHuman description; null clears it without changing membership
add_segment_idNoSegment ID to append to the included list
remove_segment_idNoSegment ID to remove from the included list
add_excluded_segment_idNoSegment ID to add as an exclusion — records matching this segment are subtracted from the audience
remove_excluded_segment_idNoExcluded segment ID to stop excluding

Output Schema

NameRequiredDescriptionDefault
statusYes
guidanceNoInterpretation or recovery guidance for this result
count_unitNo
page_countNoNumber of objects on this page, not the organization total
audience_idYes
count_stateNoUnknown means no count; available does not guarantee freshness. Recount for a current value.
next_actionsNoSuggested next calls using returned IDs and available scopes. Not executed and not user consent.
population_inputNoPopulation input used for the preview; IDs refer to their current saved definitions

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added
  2. Removed
  3. Added

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and idempotentHint=true, so the bar is lower, and the description still adds the auth requirement ('Requires creator scope') plus the non-obvious semantic that a null description clears it without changing membership. It does not spell out which changes are irreversible or how segment removal affects downstream deliveries, which matters for a destructive patch.

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?

Three short sentences, front-loaded with the edit surface and followed by the two highest-risk constraints (exclusion routing and scope). No filler. It could trim minor duplication of the schema's set_logic enum definition.

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?

With an output schema present, return values need not be described, and 10 parameters at full schema coverage means the description only has to carry behavior. It covers scope, exclusion routing, and the clearing semantics well; the one gap is not stating how composition changes interact with already-delivered or refreshed audiences.

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 baseline is 3; the description earns above that by explaining the exclusion model and the union/intersection choice in a way the enum alone does not. It also maps archive/restore to the status field. The remaining params (name, labels) are left entirely to schema descriptions.

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 opens with a specific verb and resource ('Edit ... an existing audience') and enumerates the editable surfaces: name, description, labels, status archive/restore, and composition/segments. That distinguishes it from create_audience and patch_segment. It loses a point because 'archive/restore' overlaps with the sibling archive_audience tool without explaining the difference.

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

Usage Guidelines4/5

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

It gives real routing guidance: exclusion is done via add_excluded_segment_id rather than set_logic, and set_logic is constrained to union/intersection. That closes the most likely misuse. It still lacks any 'when not to use this' guidance versus patch_segment or archive_audience, so it is not a full 5.

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