Tag contacts
civicrm_tag_contactsAdd a tag to one or more contacts in a single call. Idempotent, so re-tagging a contact already tagged has no effect.
Instructions
Add a tag to one or more contacts in a single call. Idempotent — re-tagging an already-tagged contact is a no-op. Requires CIVICRM_ALLOW_WRITES=true.
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": {
"contact_ids": "<contact_ids>",
"tag": "<tag>"
},
"name": "civicrm_tag_contacts"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tag | Yes | Tag id (number) or tag name (string). Names are resolved to ids on the fly. | |
| contact_ids | Yes | Contact ids to tag. Bounded at 500 per call to keep one request bounded; chunk larger sets in the caller. |