Delete items
delete_itemsDelete items of one kind into the 30-day recycle bin.
When to use:
The person has confirmed what should go (show it with list_items or get_items first).
When NOT to use:
Taking a screen out of a group: use update_items removeScreenIds.
Stopping a takeover: use end_takeover.
What to know:
restore_items undoes a delete within 30 days. A deleted playlist or schedule stops on every screen playing it; a deleted screen's device returns to pairing; a deleted location hands its content to its parent.
Refused: the root, a location with child locations, items shared to another workspace. Each id reports ok or its error. Needs the kind's delete permission.
Parameters:
kind and ids: every id must be of that kind.
permanent: true erases for good instead (recycle-bin kinds only). The first call deletes nothing and returns wouldErase and a confirmCode.
confirmCode: only with permanent:true; send the code from the first call, after the person says yes, with the same kind and ids. It lasts 10 minutes and fits only those ids; without permanent it is an error.
Example: {kind:"playlists", ids:["pl_8f2c"]}.
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": {
"kind": "<kind>",
"ids": "<ids>"
},
"name": "delete_items"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ids | Yes | The items to delete, by id. Ids come from list_items. | |
| kind | Yes | The kind of item that every id names. | |
| permanent | No | Erase the items for good and skip the recycle bin. This needs a second call with confirmCode. | |
| confirmCode | No | The code the first permanent call returned, sent back after the person agrees. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | No | The kind of item the call acted on, as it was asked. | |
| next | No | Preview call: what to do next. | |
| erased | No | How many items were erased for good (0 on the first, preview call). | |
| failed | No | How many ids failed. A failed id never stops the others, so check each row. | |
| results | No | One row per id, in the order the ids were given. | |
| permanent | No | true for a permanent delete. | |
| succeeded | No | How many ids succeeded. | |
| wouldErase | No | Preview call: the items that would be erased. | |
| confirmCode | No | Preview call: send this on the second call, after the person says yes. | |
| expiresInSeconds | No | Preview call: how long the confirmCode stays valid. |