Skip to main content
Glama

Delete items

delete_items
DestructiveIdempotent

Delete 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

NameRequiredDescriptionDefault
idsYesThe items to delete, by id. Ids come from list_items.
kindYesThe kind of item that every id names.
permanentNoErase the items for good and skip the recycle bin. This needs a second call with confirmCode.
confirmCodeNoThe code the first permanent call returned, sent back after the person agrees.

Output Schema

NameRequiredDescriptionDefault
kindNoThe kind of item the call acted on, as it was asked.
nextNoPreview call: what to do next.
erasedNoHow many items were erased for good (0 on the first, preview call).
failedNoHow many ids failed. A failed id never stops the others, so check each row.
resultsNoOne row per id, in the order the ids were given.
permanentNotrue for a permanent delete.
succeededNoHow many ids succeeded.
wouldEraseNoPreview call: the items that would be erased.
confirmCodeNoPreview call: send this on the second call, after the person says yes.
expiresInSecondsNoPreview call: how long the confirmCode stays valid.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / kind / enum
      Previous value: -[
      -  "screens",
      -  "media",
      -  "playlists",
      -  "schedules",
      -  "layouts",
      -  "creatives",
      -  "apps",
      -  "data_sources",
      -  "screen_groups",
      -  "locations",
      -  "media_folders",
      -  "emergency_templates",
      -  "alert_rules",
      -  "webhooks",
      -  "power_policies",
      -  "ad_slots",
      -  "serial_templates",
      -  "signage_templates",
      -  "banners",
      -  "celebrations",
      -  "device_preassignments",
      -  "render_agents",
      -  "synced_folders",
      -  "proof_schedules",
      -  "pending_screens",
      -  "workspace_shares"
      -]New value: +[
      +  "screens",
      +  "media",
      +  "playlists",
      +  "schedules",
      +  "layouts",
      +  "creatives",
      +  "apps",
      +  "data_sources",
      +  "screen_groups",
      +  "locations",
      +  "media_folders",
      +  "emergency_templates",
      +  "alert_rules",
      +  "webhooks",
      +  "power_policies",
      +  "ad_slots",
      +  "serial_templates",
      +  "signage_templates",
      +  "banners",
      +  "celebrations",
      +  "device_preassignments",
      +  "render_agents",
      +  "synced_folders",
      +  "proof_schedules",
      +  "pending_screens",
      +  "workspace_shares",
      +  "content_folders"
      +]
  2. Changed1 schema field changed
    • changedInput schema / properties / kind / enum
      Previous value: -[
      -  "screens",
      -  "media",
      -  "playlists",
      -  "schedules",
      -  "layouts",
      -  "creatives",
      -  "apps",
      -  "data_sources",
      -  "screen_groups",
      -  "locations",
      -  "media_folders",
      -  "emergency_templates"
      -]New value: +[
      +  "screens",
      +  "media",
      +  "playlists",
      +  "schedules",
      +  "layouts",
      +  "creatives",
      +  "apps",
      +  "data_sources",
      +  "screen_groups",
      +  "locations",
      +  "media_folders",
      +  "emergency_templates",
      +  "alert_rules",
      +  "webhooks",
      +  "power_policies",
      +  "ad_slots",
      +  "serial_templates",
      +  "signage_templates",
      +  "banners",
      +  "celebrations",
      +  "device_preassignments",
      +  "render_agents",
      +  "synced_folders",
      +  "proof_schedules",
      +  "pending_screens",
      +  "workspace_shares"
      +]
  3. Changed9 schema fields changed
    • changedOutput schema / properties / failed / description
      Previous value: -"How many failed; the rest still ran."New value: +"How many ids failed. A failed id never stops the others, so check each row."
    • changedOutput schema / properties / kind / description
      Previous value: -"The kind that was acted on."New value: +"The kind of item the call acted on, as it was asked."
    • changedOutput schema / properties / results / description
      Previous value: -"One row per id or item, in the order given."New value: +"One row per id, in the order the ids were given."
    • addedOutput schema / properties / results / items / description
      Added value: +"The outcome for one id."
    • changedOutput schema / properties / results / items / properties / error / description
      Previous value: -"Why this one failed, with the next step to take (present when not ok)."New value: +"Present when ok is false: why this id failed and the next step to take."
    • changedOutput schema / properties / results / items / properties / label / description
      Previous value: -"The id, or the item's name (or #position) for a create."New value: +"The id this row is about (account for kind account)."
    • changedOutput schema / properties / results / items / properties / ok / description
      Previous value: -"true when this one succeeded."New value: +"true when this id succeeded; false when it failed and error says why."
    • changedOutput schema / properties / results / items / properties / result / description
      Previous value: -"The record as the API returned it (present when ok)."New value: +"Present when ok: what the API answered for the deleted item. It is now in the recycle bin (or erased, on a permanent delete); restore_items brings back a recycle-bin item within 30 days."
    • changedOutput schema / properties / succeeded / description
      Previous value: -"How many ids or items succeeded."New value: +"How many ids succeeded."
  4. Changed1 schema field changed
    • addedOutput schema / description
      Added value: +"A recycle-bin delete returns results, one row per id. A permanent delete returns wouldErase and confirmCode on its first call and erases nothing; the second call, with the code, returns erased and results."
  5. Changed5 schema fields changed
    • changedInput schema / properties / confirmCode / description
      Previous value: -"Code from the first call."New value: +"The code the first permanent call returned, sent back after the person agrees."
    • changedInput schema / properties / ids / description
      Previous value: -"Item ids."New value: +"The items to delete, by id. Ids come from list_items."
    • changedInput schema / properties / kind / description
      Previous value: -"Kind of the ids."New value: +"The kind of item that every id names."
    • changedInput schema / properties / permanent / description
      Previous value: -"Erase for good."New value: +"Erase the items for good and skip the recycle bin. This needs a second call with confirmCode."
    • addedOutput schema / properties / expiresInSeconds
      Added value: +{
      +  "description": "Preview call: how long the confirmCode stays valid.",
      +  "type": [
      +    "integer",
      +    "null"
      +  ]
      +}
  6. Changed4 schema fields changed
    • changedInput schema / properties / confirmCode / description
      Previous value: -"permanent:true only: the code the first call returned, sent after the person said yes."New value: +"Code from the first call."
    • changedInput schema / properties / ids / description
      Previous value: -"Item ids to delete, 1 to 50, from list_items (or kind recycle_bin for a permanent delete)."New value: +"Item ids."
    • changedInput schema / properties / kind / description
      Previous value: -"The kind of every id."New value: +"Kind of the ids."
    • changedInput schema / properties / permanent / description
      Previous value: -"true erases for good instead of the recycle bin. Recycle-bin kinds only (not locations, screen groups or emergency templates). Needs confirmCode on a second call."New value: +"Erase for good."
  7. Added

TDQS

A5/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already flag destructiveHint and idempotentHint, but the description adds substantial context beyond them: cascade semantics (deleted playlist/schedule stops on every screen, screen's device returns to pairing, location's content moves to its parent), 30-day recoverability via restore_items, and the specific refusal cases (root, location with child locations, cross-workspace shares). It also discloses per-id ok/error reporting and the delete-permission requirement.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded purpose sentence followed by labeled sections (when to use, when not to use, what to know, parameters) and a one-line example. No filler; even the long cascade sentence carries decision-relevant information about side effects.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a destructive, high-blast-radius tool with four parameters, the definition covers preconditions, side effects, refusals, permissions, and the two-step irreversible path. An output schema exists, yet the description still notes per-id ok/error results, leaving nothing an agent needs before calling it.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds real meaning: permanent's first call deletes nothing and returns wouldErase plus a confirmCode; the confirmCode is valid only with permanent:true, only for the same kind/ids, lasts 10 minutes, and errors without permanent. It also states that every id must match the declared kind and provides a worked example.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The first sentence gives a specific verb (delete), resource (items of one kind), and destination (the 30-day recycle bin), which immediately distinguishes it from siblings like restore_items and update_items. Scope is qualified by 'one kind', matching the kind/ids constraint in the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit 'When to use' requires prior confirmation and points to list_items/get_items for showing the target. Explicit 'When NOT to use' names two concrete alternatives with the exact mechanism (update_items removeScreenIds for removing a screen from a group, end_takeover for stopping a takeover), which is precisely the routing guidance an agent needs.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources