Skip to main content
Glama

Queue Delete

queue_delete

Remove items from a Drupal queue by item ID, by deleting the oldest count, or by clearing the entire queue without requiring Drush service registration.

Instructions

Delete queue items: one by id, the oldest count, or the whole queue.

Drush's queue:delete takes exactly one argument - the queue name - so the item_id and count forms cannot go through it: they passed extra arguments that Drush refused with "Too many arguments", and all three branches failed, so this tool never once succeeded.

Even the plain case now runs in PHP rather than through Drush, because queue:delete only resolves queues that are registered as services and answers "Queue not found" for anything else - including a queue this very server just created with queue_create. Queue::deleteQueue() is what Drush calls internally, so the result is the same operation without Drush's registration requirement.

item_id deliberately repeats the queue name in its condition even though core's own DatabaseQueue::deleteItem() does not - that method deletes by item_id alone, so without the name a request for an item in one queue would happily delete a different queue's item that happened to share the id.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
countNo
item_idNo
queue_nameYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so richly: it discloses the history of Drush failures, explains the switch to PHP and why it bypasses Drush's queue registration requirement, and documents the safety rationale for repeating the queue name in item_id conditions. This is far more behavioral context than typical.

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

Conciseness3/5

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

The first sentence is concise and front-loaded, but the remaining paragraphs contain lengthy historical justification about Drush internals and prior failures. While informative, much of this detail is not strictly necessary for invoking the tool correctly, making the description longer than needed.

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?

The tool has an output schema, so return values need not be explained. For a deletion tool with no annotations and 0% schema coverage, the description covers purpose, modes, and an important safety measure. It is slightly incomplete regarding permissions required and what happens if both item_id and count are supplied.

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 description coverage is 0%, so the description must compensate. It explains each mode: item_id deletes a specific item, count deletes the oldest N items, and omitting both deletes the whole queue. It also clarifies the safety purpose of item_id repeating the queue name. However, it does not explicitly state mutual exclusivity or default behavior when both item_id and count are given.

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?

Starts with a specific verb and resource: 'Delete queue items', then names the three supported deletion modes. An agent can immediately tell this tool deletes queue items rather than creating or running queues, despite the name queue_delete potentially suggesting queue deletion.

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

Usage Guidelines3/5

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

Describes the three modes of operation (by id, by count, whole queue) but does not explicitly say when to choose one over another or point to sibling tools like queue_run or queue_create as alternatives. Usage is implied by the mode descriptions rather than stated as guidance.

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