# drain_queue

Remove all jobs from a queue

Agent View of the PolicyLayer registry record for `drain_queue`. HTML page: https://policylayer.com/tools/adamhancock-bullmq-mcp/drain-queue

## Facts

- Tool: `drain_queue`
- Server: BullMQ MCP Server (`adamhancock/bullmq-mcp`) — https://policylayer.com/tools/adamhancock-bullmq-mcp.md
- Homepage: https://github.com/adamhancock/bullmq-mcp
- Risk category: Destructive (Critical risk)
- Registry record: grade F, identity unverified
- Server rate-limited: no
- Parameters: 0
- Recommended policy verdict: Hidden

## Example call (MCP tools/call, JSON-RPC 2.0)

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

## Why drain_queue is rated Critical

This tool permanently removes all jobs from a queue without the ability to undo the operation. While not a financial transaction, the irreversible deletion of potentially critical job data (business-critical tasks, user requests, etc.) represents a destructive action with significant blast radius if triggered by an AI agent without proper intent. The data loss is immediate and complete for that queue.

From the tool's own definition: "Tool named 'drain_queue' with description 'Remove all jobs from a queue' — irreversibly deletes all queued jobs in a single operation."

## Use case

AI agents call drain_queue to permanently remove resources in BullMQ MCP Server, typically in cleanup and lifecycle workflows. It does its job in a single call, and there is no undo.

## Recommended policy (PolicyLayer)

Verdict: **Hidden**. Enforced by the PolicyLayer MCP gateway (https://policylayer.com/mcp-gateway) before a call reaches BullMQ MCP Server:

```json
{
  "version": "1",
  "default": "deny",
  "hide": [
    "drain_queue"
  ]
}
```

## Other tools on BullMQ MCP Server (19)

- `clean_queue` — Destructive — https://policylayer.com/tools/adamhancock-bullmq-mcp/clean-queue.md
- `remove_job` — Destructive — https://policylayer.com/tools/adamhancock-bullmq-mcp/remove-job.md
- `pause_queue` — Execute — https://policylayer.com/tools/adamhancock-bullmq-mcp/pause-queue.md
- `resume_queue` — Execute — https://policylayer.com/tools/adamhancock-bullmq-mcp/resume-queue.md
- `retry_job` — Execute — https://policylayer.com/tools/adamhancock-bullmq-mcp/retry-job.md
- `switch_connection` — Other — https://policylayer.com/tools/adamhancock-bullmq-mcp/switch-connection.md
- `get_job` — Read — https://policylayer.com/tools/adamhancock-bullmq-mcp/get-job.md
- `get_job_logs` — Read — https://policylayer.com/tools/adamhancock-bullmq-mcp/get-job-logs.md
- `get_jobs` — Read — https://policylayer.com/tools/adamhancock-bullmq-mcp/get-jobs.md
- `list_connections` — Read — https://policylayer.com/tools/adamhancock-bullmq-mcp/list-connections.md
- `list_queues` — Read — https://policylayer.com/tools/adamhancock-bullmq-mcp/list-queues.md
- `query_dead_letter_queue` — Read — https://policylayer.com/tools/adamhancock-bullmq-mcp/query-dead-letter-queue.md
- `stats` — Read — https://policylayer.com/tools/adamhancock-bullmq-mcp/stats.md
- `add_job` — Write — https://policylayer.com/tools/adamhancock-bullmq-mcp/add-job.md
- `add_job_log` — Write — https://policylayer.com/tools/adamhancock-bullmq-mcp/add-job-log.md
- `connect` — Write — https://policylayer.com/tools/adamhancock-bullmq-mcp/connect.md
- `disconnect` — Write — https://policylayer.com/tools/adamhancock-bullmq-mcp/disconnect.md
- `move_failed_jobs_to_dlq` — Write — https://policylayer.com/tools/adamhancock-bullmq-mcp/move-failed-jobs-to-dlq.md
- `promote_job` — Write — https://policylayer.com/tools/adamhancock-bullmq-mcp/promote-job.md

## For agents

This record is a snapshot. Live verdicts and the full registry:

- Check every server in your MCP config at once: `npx -y policylayer stack`
- Vet a server before you add it: install the mcp-precheck skill — `npx skills add https://policylayer.com` (skill text: https://policylayer.com/skill.md)
- Query the registry over MCP: endpoint `https://api.policylayer.com/mcp` — tools `check_mcp_server`, `check_mcp_stack`, `check_tool`, `search_registry`, `get_change_events`

---

Source: the PolicyLayer MCP registry — one continuously verified record per MCP server. Full record: https://policylayer.com/registry?q=adamhancock-bullmq-mcp · API: https://policylayer.com/registry/api · Policy library: https://policylayer.com/policies/adamhancock-bullmq-mcp
