Tag chat
Add tags to a chat, or remove them.
MCP tool livechat_write → tag_chat
write
Adds the tags in add to a chat and removes the tags in remove. Tags must already exist in Settings > Tags, which only admins and the owner can change, and must be visible to your role. Works on active and archived chats. Tagging reaches no customer and is undone with one call, so tag_chat runs without asking first.
Parameters
| Name | Type | Description |
|---|---|---|
| chat_id string required | string | Chat ID from list_chats or list_archived_chats. |
| add string[] | string[] | Tag names to add. |
| remove string[] | string[] | Tag names to remove. |
tools/call
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "livechat_write",
"arguments": {
"operation": "tag_chat",
"arguments": {
"chat_id": "PJ0MRSHTDG",
"add": [
"refund"
]
}
}
}
} Example response
{
"content": [
{
"type": "text",
"text": "{ ... same JSON as structuredContent ... }"
}
],
"structuredContent": {
"chat_id": "PJ0MRSHTDG",
"added": [
"refund"
],
"removed": [],
"tags": [
"refund"
]
},
"isError": false
}