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
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
| Name | Type | Description |
|---|---|---|
| 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
{
"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
{
"content": [
{
"type": "text",
"text": "{ ... same JSON as structuredContent ... }"
}
],
"structuredContent": {
"updated": 3,
"added": [
"newsletter"
],
"removed": []
},
"isError": false
}