Skip to main content
Glama

Restore deleted items

restore_items
Idempotent

Bring back deleted items of one kind from the 30-day recycle bin.

When to use:

  • Undoing delete_items.

When NOT to use:

  • Items deleted more than 30 days ago: they are gone and report not found.

What to know:

  • Whatever used a restored item (playlists, screens) uses it again; a restored screen re-pairs by itself if its device still holds its pairing. Each id reports ok or not found. Needs the kind's delete permission.

Parameters:

  • kind: the list_items kind name, so a recycle_bin row of kind playlist is restored with kind playlists.

  • ids: up to 50, from list_items kind recycle_bin. An id that is not in the bin reports "not in the recycle bin"; one deleted over 30 days ago reports not found.

  • 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": "restore_items"
  }
}

Input Schema

NameRequiredDescriptionDefault
idsYesThe deleted items to bring back, by id. Ids come from list_items kind recycle_bin.
kindYesThe kind of item that every id names.

Output Schema

NameRequiredDescriptionDefault
kindNoThe kind of item the call acted on, as it was asked.
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.
succeededNoHow many ids succeeded.

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",
      -  "media_folders",
      -  "screen_groups",
      -  "alert_rules",
      -  "signage_templates",
      -  "banners",
      -  "celebrations"
      -]New value: +[
      +  "screens",
      +  "media",
      +  "playlists",
      +  "schedules",
      +  "layouts",
      +  "creatives",
      +  "apps",
      +  "data_sources",
      +  "media_folders",
      +  "screen_groups",
      +  "alert_rules",
      +  "signage_templates",
      +  "banners",
      +  "celebrations",
      +  "content_folders"
      +]
  2. Changed1 schema field changed
    • changedInput schema / properties / kind / enum
      Previous value: -[
      -  "screens",
      -  "media",
      -  "playlists",
      -  "schedules",
      -  "layouts",
      -  "creatives",
      -  "apps",
      -  "data_sources",
      -  "media_folders",
      -  "screen_groups"
      -]New value: +[
      +  "screens",
      +  "media",
      +  "playlists",
      +  "schedules",
      +  "layouts",
      +  "creatives",
      +  "apps",
      +  "data_sources",
      +  "media_folders",
      +  "screen_groups",
      +  "alert_rules",
      +  "signage_templates",
      +  "banners",
      +  "celebrations"
      +]
  3. Changed10 schema fields changed
    • addedOutput schema / description
      Added value: +"Which deleted items came back, one row per id. A restored item is in use again wherever it was used before."
    • 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: the item as it is now, back out of the recycle bin. Read it with get_items for its full fields."
    • changedOutput schema / properties / succeeded / description
      Previous value: -"How many ids or items succeeded."New value: +"How many ids succeeded."
  4. Changed2 schema fields changed
    • changedInput schema / properties / ids / description
      Previous value: -"Deleted item ids."New value: +"The deleted items to bring back, by id. Ids come from list_items kind recycle_bin."
    • changedInput schema / properties / kind / description
      Previous value: -"Kind of the ids."New value: +"The kind of item that every id names."
  5. Changed2 schema fields changed
    • changedInput schema / properties / ids / description
      Previous value: -"Ids to restore, 1 to 50, from list_items kind recycle_bin."New value: +"Deleted item ids."
    • changedInput schema / properties / kind / description
      Previous value: -"The kind of every id."New value: +"Kind of the ids."
  6. Added

TDQS

A5/5.0
Behavior5/5

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

Beyond the annotations, the description discloses the 30-day recovery limit, required delete permission, per-id success and failure behavior, and side effects such as dependent playlists or screens using the restored item again. It also notes that restored screens re-pair automatically if the device still holds its pairing, which is important operational context.

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?

The definition is front-loaded and organized into purpose, when/when-not usage, behavioral notes, and parameter notes, which makes it easy to scan. The repeated 30-day detail is tied to per-id error behavior rather than being wasted wording, and the example is compact.

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 two-parameter restore tool with rich annotations and an output schema, the description covers the action, usage boundaries, permissions, side effects, parameter nuances, and error cases. An agent should be able to select and invoke it correctly without needing additional undocumented assumptions.

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?

Although the schema already documents both parameters, the description adds meaningful semantics: it explains the singular-versus-plural kind mapping between recycle_bin rows and list_items kinds, confirms the 50-id limit, and describes specific error outcomes for ids not in the bin or older than 30 days. The example further clarifies the expected kind and ids format.

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 description states a specific action and resource: bringing back deleted items of one kind from the 30-day recycle bin. It clearly distinguishes the operation from delete_items by framing it as undoing a delete, and it is precise enough to separate it from list_items or get_items.

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?

It gives explicit when-to-use guidance by naming delete_items as the operation being undone. It also gives a clear when-not-to-use condition for items older than 30 days and references list_items kind recycle_bin as the source for valid ids.

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