Skip to main content
Glama

Batch Restore Items

restore_items
Idempotent

Restore multiple soft-deleted items in batch from the trash by providing an explicit items list or using filters; the recovery is reversible for added safety.

Instructions

Restore many soft-deleted items at once (batch recover from the trash). Provide either an explicit items list (entity_type + entity_id pairs) OR filters: entity_type, older_than_days, or all. Restores are reversible - you can delete the items again - so this executes directly and returns a summary of what was recovered. Use purge_items to permanently delete instead.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "restore_items"
  }
}

Input Schema

NameRequiredDescriptionDefault
allNoFilter: every recoverable item in the trash.
daysNoFilter look-back window in days. Defaults to 30.
itemsNoExplicit items to restore. Provide this OR filters.
entity_typeNoFilter: only this entity type.
older_than_daysNoFilter: only items deleted more than N days ago.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.4.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare destructiveHint=false and idempotentHint=true, and the description reinforces this with the genuinely additive claim that "Restores are reversible - you can delete the items again - so this executes directly," which explains why no confirmation step exists. It also discloses the return shape ("returns a summary of what was recovered"). It stops short of describing rate limits, batch-size caps, or what happens to items that fail mid-batch.

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?

Three sentences, zero filler: purpose first, then the input-mode contract, then the safety/reversibility note and the sibling pointer. Parenthetical glosses like "(batch recover from the trash)" add meaning rather than padding.

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

Completeness4/5

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

For a mutation tool with no required parameters, no output schema, and full annotation coverage, this is close to sufficient: it covers reversibility, direct execution, and the summary return. The remaining gaps are the omitted `days` filter and the unstated question of whether filter conditions combine with AND, which an agent would need to know before calling with multiple filters.

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

Parameters3/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, and the description does add real value by spelling out that `items` is a list of entity_type + entity_id pairs and that items and filters are alternatives. However, it lists the filters as "entity_type, older_than_days, or all" and never mentions the `days` parameter that the schema documents, leaving the relationship between `days` and `older_than_days` unexplained and making the filter description incomplete rather than clarifying.

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 opens with a specific verb and resource — "Restore many soft-deleted items at once (batch recover from the trash)" — and immediately distinguishes batch recovery from the singular `restore_item` sibling by emphasizing "many" and "at once". It also names `purge_items` as the permanent-delete counterpart, so an agent can route correctly without reading any 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?

It states the two mutually exclusive input modes explicitly ("Provide either an explicit `items` list ... OR filters") and gives a clear when-not via "Use purge_items to permanently delete instead." The only minor omission is that it never points to `restore_item` for single-item recovery, but the batch-vs-singular distinction is legible from the name.

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

Deploy Server

Other Tools