Skip to main content
Glama

Link Audience to Campaign

link_audience_to_campaign
DestructiveIdempotent

Link an existing audience to a campaign. Each audience can belong to at most one campaign. This is idempotent — calling it again for an already-linked pair is safe. Fails with AUDIENCE_ALREADY_LINKED (naming current_campaign_id) if the audience is already in a different campaign — unlink it there first. Requires 'creator' scope.

Input Schema

NameRequiredDescriptionDefault
audience_idYesThe audience ID to link
campaign_idYesThe campaign ID to link the audience to

Output Schema

NameRequiredDescriptionDefault
okYesWhether the requested action succeeded
guidanceNoInterpretation or recovery guidance for this result
count_unitNo
page_countNoNumber of objects on this page, not the organization total
audience_idYes
campaign_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

A4.2/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, and the description reinforces the idempotency while adding genuinely new context: the exclusive-membership constraint, the AUDIENCE_ALREADY_LINKED error code with the current_campaign_id it returns, and the 'creator' scope requirement. It does not explain why the operation is flagged destructive, which would be the last missing piece.

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 with the core action and cardinality rule front-loaded, followed by idempotency, error handling, and auth. Every sentence carries information, though the idempotency clause partially restates the idempotentHint annotation.

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?

An output schema exists, so return values need not be described. With auth scope, failure code, exclusivity constraint, and idempotency all covered, an agent has everything needed to invoke this correctly and interpret the likely error.

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% for both required parameters, so the schema already explains audience_id and campaign_id. The description adds no format, syntax, or lookup guidance beyond the IDs themselves, so baseline 3 applies.

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?

A specific verb+resource ('Link an existing audience to a campaign') in the first sentence, immediately narrowed by the cardinality rule 'Each audience can belong to at most one campaign'. That rule distinguishes it functionally from the sibling unlink_audience_from_campaign and from create_audience.

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 states the precondition for success and what to do when it fails: 'unlink it there first' when the audience is already in a different campaign. It also tells the agent that repeat calls are safe, which removes a common hesitation. It stops short of naming the unlink sibling tool explicitly, leaving the agent to infer it.

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