Skip to main content
Glama

Patch Audience

patch_audience
DestructiveIdempotent

Rename, 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.

Input Schema

NameRequiredDescriptionDefault
nameNoNew display name for the audience
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
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.
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

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added
  2. Removed
  3. First observed

TDQS

A3.7/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 safety profile is covered. The description adds meaningful context beyond that: the 'creator' scope requirement and the invalid-value warning on set_logic, which an agent would otherwise only learn from a failed call.

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?

Four short sentences, front-loaded with the capability summary and followed by constraints and prerequisites; no filler. There is minor redundancy where the set_logic restriction restates the schema enum.

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?

An output schema exists, so return values need not be explained, and the annotations carry the destructive/idempotent profile. What is missing is whether multiple segments can be added in one call (the schema exposes only singular add/remove fields) and how this tool relates to archive_audience for the archived status.

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

Parameters3/5

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

Schema description coverage is 100%, so every parameter is already documented, including the exclusion semantics of add_excluded_segment_id. The description reinforces the set_logic enum constraint but adds no syntax, cardinality, or format detail beyond the schema – baseline 3 applies.

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 names specific verbs (rename, archive/restore, change composition) against a specific resource (an existing audience), so the agent knows this is a mutating edit tool. It does not distinguish itself from the sibling archive_audience, which appears to overlap with the status=archived path described here, leaving a small ambiguity about which to use for archiving.

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

Usage Guidelines3/5

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

It gives one useful routing rule ('To exclude records, use add_excluded_segment_id') and a hard constraint ('never exclusion'), plus a prerequisite ('Requires creator scope'). However, it never says when to prefer this tool over archive_audience or patch_segment, so the alternative-tool guidance is only implied.

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