Skip to main content
Glama

Batch Permanently Delete Items

purge_items
DestructiveIdempotent

Permanently delete batches of soft-deleted items from the trash, using explicit items or filters; requires confirmation before irreversible removal.

Instructions

Permanently and irreversibly delete many soft-deleted items at once (batch purge from the trash). Provide either an explicit items list (entity_type + entity_id pairs, e.g. gathered from list_deleted) OR filters: entity_type, older_than_days, only_demo (leftover demo/test fixtures), or all. On the first call it returns a confirmation conflict summarizing how many items of each type will be destroyed; pass resolution: "confirm" only after the user explicitly agrees. Only ever touches already-soft-deleted items; cascades to child rows the database cascades. Use restore_items to recover 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": "purge_items"
  }
}

Input Schema

NameRequiredDescriptionDefault
allNoFilter: every recoverable item in the trash. Use with care.
daysNoFilter look-back window in days. Defaults to 30.
itemsNoExplicit items to purge. Provide this OR filters.
only_demoNoFilter: only leftover demo / test fixtures.
resolutionNoPass "confirm" after the user agrees, "cancel" to abort. Omit on the first call to get a confirmation prompt.
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

A5/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, and the description adds context beyond them: it explains what is destroyed (soft-deleted items only, never live rows), that deletion cascades to database child rows, and that a confirmation conflict precedes any destruction. That is unusually rich disclosure of a destructive operation's real-world effect.

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?

Four tight sentences with no filler: purpose first, then input options, then the confirmation protocol, then scope and the recovery alternative. Every sentence carries decision-relevant information, and the most consequential facts (irreversible, confirm gate) appear early.

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, parameter-rich tool with no output schema, the description covers what an agent needs: what it destroys, what it never touches, the cascade behavior, the two-phase confirmation flow, and the recovery alternative. The only omission is return-shape detail beyond the confirmation summary, which is acceptable given the description already sketches the first-call response.

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 schema already carries the field-level meaning; the description still adds value by explaining the items shape (entity_type + entity_id pairs, typically from list_deleted), clarifying only_demo as leftover demo/test fixtures, and framing `all` as a caution-worthy catch-all. One small discrepancy exists: it references an `older_than_days` filter while the schema names the parameter `days`, but the intent remains unambiguous.

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, resource, and scope: 'Permanently and irreversibly delete many soft-deleted items at once (batch purge from the trash).' The word 'many'/'batch' implicitly separates it from the singular sibling purge_item, and the closing line 'Use restore_items to recover instead' names the opposite operation, so an agent can pick correctly without opening a 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 explicit alternatives: provide either an `items` list or filters (entity_type, older_than_days, only_demo, all), and it names restore_items as the recovery path. It also spells out the two-phase rule – the first call returns a confirmation conflict and `resolution: "confirm"` may only be passed after the user explicitly agrees – which is exactly the guidance an agent needs to avoid accidental destruction.

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