Skip to main content
Glama
This connector has been deprecated

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

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.

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": {
      "campaign_id": "<campaign_id>",
      "audience_id": "<audience_id>"
    },
    "name": "link_audience_to_campaign"
  }
}

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.
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.7/5.0
Behavior5/5

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

Annotations already declare idempotentHint=true and destructiveHint=true, and the description reinforces idempotency with a plain-language guarantee ('calling it again for an already-linked pair is safe') rather than merely repeating the flag. It adds genuinely new behavior: the exact failure code AUDIENCE_ALREADY_LINKED, that the error exposes current_campaign_id, and the required 'creator' scope. No contradiction with the annotations.

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?

Four short sentences, each carrying a distinct fact: purpose, cardinality rule, idempotency, failure mode with remedy, and auth scope. The core action is front-loaded and there is no filler.

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?

The tool is a simple two-parameter mutation with a full output schema, so return values need no explanation. Given that, the description covers everything an agent needs to call it correctly: scope, idempotency, the uniqueness constraint, and the exact error path with a recovery step.

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 both parameters (audience_id, campaign_id) are already documented and the schema carries the burden. The description adds only indirect context by mentioning that an error returns current_campaign_id, which is a response field rather than parameter guidance. 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?

States a specific verb and resource ('Link an existing audience to a campaign') and implicitly distinguishes itself from the sibling unlink_audience_from_campaign. An agent can tell exactly what this does without consulting the schema.

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?

Gives the cardinality constraint (one campaign per audience), the when-not condition (audience already in a different campaign), and the alternative remedy (unlink it there first), naming the sibling tool explicitly. It also states the prerequisite 'creator' scope, so nothing about eligibility is left to inference.

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