Add or remove device tag
tag_deviceAdd or remove a tag on a GenieACS CPE device to control preset matching and enable tag-based device searches.
Instructions
Add a tag to a CPE device or remove one. Tags group devices: presets match on them (precondition {"tags":"office"}) and search_devices finds by them. Adding or removing a tag can therefore make a preset apply to the device, or stop applying, at its next inform. Tags are case-sensitive. Use letters, digits, "-" and "": GenieACS rejects a tag with other characters (a "." for example) with a 404. Fails with ACS error 404 when the device id does not exist. Example: tag_device(device_id="202BC1-BM632w-000001", tag="office", action="add").
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": {
"device_id": "<device_id>",
"tag": "<tag>",
"action": "<action>"
},
"name": "tag_device"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tag | Yes | The tag, e.g. "office", "floor-2", "firmware_pending". | |
| action | Yes | "add" tags the device, "remove" untags it. | |
| device_id | Yes | The GenieACS device id (the _id field), exactly as GenieACS stores it, usually OUI-ProductClass-SerialNumber, e.g. "202BC1-BM632w-000001". GenieACS escapes characters other than letters and digits inside the product class and serial as %XX (a "-" there becomes "%2D"), so copy ids from genieacs://devices/list or search_devices rather than typing them. |