Skip to main content
Glama

Enroll contacts in a campaign

enroll_contacts
Idempotent

Enroll contacts by ids, tag, source/list, status, text or custom fields. Suppressed, replied, unsubscribed, bounced, address-less and blocked-domain contacts are skipped with a reason, and a contact in another running campaign is skipped (or moved with on_conflict=move). dry_run=true returns who would be enrolled and who skipped. Requires the manage_campaigns 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>"
    },
    "name": "enroll_contacts"
  }
}

Input Schema

NameRequiredDescriptionDefault
qNoText in name, email or title.
tagNoEvery contact with this tag.
listNoAlias of source.
fieldsNoExact-match filter on custom fields.
sourceNoEvery contact from this source or list.
statusNoEvery contact with this status.
dry_runNo
campaign_idYesCampaign id.
claim_checkNoRelay campaigns: pass, fail or held for every enrolled contact.
contact_idsNoContact ids (up to 1000).
on_conflictNoskip (default) or move.
per_contactNoRelay campaigns: contact id -> { claim_check, evidence_url }, overrides the two fields above for that contact.
evidence_urlNoRelay campaigns: the public link that backs the message, for every enrolled contact.
idempotency_keyNoOptional. Repeating a call with the same key and the same arguments returns the first result instead of writing again, so retries are safe.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / claim_check
      Added value: +{
      +  "description": "Relay campaigns: pass, fail or held for every enrolled contact.",
      +  "enum": [
      +    "pass",
      +    "fail",
      +    "held"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / evidence_url
      Added value: +{
      +  "description": "Relay campaigns: the public link that backs the message, for every enrolled contact.",
      +  "type": "string"
      +}
    • addedInput schema / properties / per_contact
      Added value: +{
      +  "description": "Relay campaigns: contact id -> { claim_check, evidence_url }, overrides the two fields above for that contact.",
      +  "type": "object"
      +}
  2. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Beyond annotations, it discloses exactly which contacts get skipped and that a reason is returned (suppressed, replied, unsubscribed, bounced, address-less, blocked-domain), the cross-campaign conflict behavior, the dry-run preview semantics, and the required manage_campaigns scope. That is meaningful operational context an agent needs before mutating enrollment state.

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?

Three dense sentences, front-loaded with the selection modes, then the skip/conflict rules, then the safe-preview option and permission requirement. No filler or repetition of the title.

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?

For a 14-parameter mutation tool with nested objects and no output schema, the description covers selection, filtering, skip rules, conflicts, preview, and auth. It does not describe what a successful non-dry-run response contains (counts, per-contact results), which is the main remaining gap.

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 already 93%, so the schema carries most parameter meaning, but the description adds real semantics the schema lacks: on_conflict=move vs. skip is explained in terms of a contact being in another running campaign, and dry_run is tied to a concrete preview result. The relay-specific parameters (claim_check, evidence_url, per_contact) are left to the schema.

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?

The description opens with a specific verb and resource ('Enroll contacts') and enumerates the selection modes (ids, tag, source/list, status, text, custom fields), so an agent can immediately distinguish it from siblings like stop_enrollment, simulate_campaign, or update_contact.

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 clear context for when to use it (bulk enrollment into a campaign) and names the key decision the caller faces: skip vs. move via on_conflict, plus dry_run=true to preview. It stops short of explicitly routing to siblings such as simulate_campaign for a full preview or stop_enrollment for reversal, so it is not a full when/when-not/alternatives statement.

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