# clear_collection

Clear all indexed data from the collection. Use with caution - this is destructive.

Agent View of the PolicyLayer registry record for `clear_collection`. HTML page: https://policylayer.com/tools/0xrdan-mcp-rag-server/clear-collection

## Facts

- Tool: `clear_collection`
- Server: MCP RAG Server (`0xrdan/mcp-rag-server`) — https://policylayer.com/tools/0xrdan-mcp-rag-server.md
- Homepage: https://github.com/0xrdan/mcp-rag-server
- 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": "clear_collection",
    "arguments": {}
  }
}
```

## Why clear_collection is rated Critical

This tool performs an irreversible deletion of all data in a collection without granular targeting. While not financial or involving code execution, it permanently removes stored information with no undo capability, matching the Destructive category. The severity is high because the blast radius affects the entire knowledge base but is scoped to a single collection.

From the tool's own definition: "Tool description explicitly states 'Clear all indexed data from the collection. Use with caution - this is destructive.' The action irreversibly removes all indexed data."

Risk signals: Bulk/mass operation — affects multiple targets

## Use case

AI agents call clear_collection to permanently remove resources in MCP RAG 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 MCP RAG Server:

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

## Other tools on MCP RAG Server (6)

- `delete_by_source` — Destructive — https://policylayer.com/tools/0xrdan-mcp-rag-server/delete-by-source.md
- `get_stats` — Read — https://policylayer.com/tools/0xrdan-mcp-rag-server/get-stats.md
- `rag_query` — Read — https://policylayer.com/tools/0xrdan-mcp-rag-server/rag-query.md
- `rag_search` — Read — https://policylayer.com/tools/0xrdan-mcp-rag-server/rag-search.md
- `index_document` — Write — https://policylayer.com/tools/0xrdan-mcp-rag-server/index-document.md
- `index_documents_batch` — Write — https://policylayer.com/tools/0xrdan-mcp-rag-server/index-documents-batch.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=0xrdan-mcp-rag-server · API: https://policylayer.com/registry/api · Policy library: https://policylayer.com/policies/0xrdan-mcp-rag-server
