Change contact segments

Adds contacts to segments and removes them from others, like the Change Segments batch action.

MCP tool mautic_write → change_contact_segments

write

Applies the Change Segments batch action to the contacts you list: they join the segments in add and leave the ones in remove. Only static segments take hand-picked members, because a dynamic segment is decided by its filters. It reaches nobody by itself, and one call with add and remove swapped undoes it, so it does not wait for your OK; a campaign that starts from the segment may email the new members.

Parameters

Parameters: change_contact_segments
NameTypeDescription
contact_ids array required array Contact IDs from list_contacts.
add array array Segment aliases to add the contacts to.
remove array array Segment aliases to remove the contacts from.

tools/call

JSON-RPC

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "mautic_write",
    "arguments": {
      "operation": "change_contact_segments",
      "arguments": {
        "contact_ids": [
          1042,
          1388,
          1410
        ],
        "add": [
          "newsletter"
        ]
      }
    }
  }
}

Example response

JSON

{
  "content": [
    {
      "type": "text",
      "text": "{ ... same JSON as structuredContent ... }"
    }
  ],
  "structuredContent": {
    "updated": 3,
    "added": [
      "newsletter"
    ],
    "removed": []
  },
  "isError": false
}

Sign in once. Your agent does the rest.

Sign up and add the apps you need. Free 7-day trial with 2,000 credits, no card needed.