Skip to main content
Glama

delete_collection

Destructive

Permanently drops a Directus collection and all its items; requires confirm: true to proceed and reports intended deletion when confirmation is missing.

Instructions

Drops a collection and every item in it, permanently. Requires confirm: true; without it nothing is deleted and the call reports what it would have done. Irreversible and not transactional: related items elsewhere may be left orphaned and a RESTRICT foreign key can make the drop fail halfway. Use delete_items to remove rows and keep the collection, delete_field to remove a single field. Take get_schema_snapshot first when the data model may need restoring.

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": {
      "collection": "<collection>"
    },
    "name": "delete_collection"
  }
}

Input Schema

NameRequiredDescriptionDefault
confirmNoConfirm deletion
collectionYesCollection name

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv12.3.3

TDQS

A4.9/5.0
Behavior5/5

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

Beyond the destructive annotation, the description discloses that confirm: true is required, that omitting it causes a dry run reporting what would have happened, and that the operation is irreversible and non-transactional. It further warns that related items may be orphaned and that a RESTRICT foreign key can make the drop fail halfway.

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 description is dense and front-loaded: the permanent drop and confirm requirement come first, followed by risk disclosure and alternatives. Every sentence provides actionable information without waste.

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, non-transactional tool with no output schema, the definition covers the confirm gate, failure modes, orphan risk, alternatives, and recovery guidance via get_schema_snapshot. Nothing essential for safe invocation is missing.

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

Parameters4/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 meaningful semantics for confirm: without it nothing is deleted and the call reports what it would have done. This goes beyond the schema's terse 'Confirm deletion' by explaining the dry-run behavior.

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: it drops a collection and every item in it, permanently. It also distinguishes the tool from delete_items and delete_field, which handle narrower deletion scopes.

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 explicitly states when to use the alternatives: delete_items removes rows while keeping the collection, and delete_field removes a single field. It also gives a concrete prerequisite to take get_schema_snapshot first when the data model may need restoring.

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