# delete_by_source

Delete all documents from a specific source.

Agent View of the PolicyLayer registry record for `delete_by_source`. HTML page: https://policylayer.com/tools/0xrdan-mcp-rag-server/delete-by-source

## Facts

- Tool: `delete_by_source`
- 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": "delete_by_source",
    "arguments": {}
  }
}
```

## Why delete_by_source is rated Critical

This tool permanently removes all documents associated with a given source from the knowledge base. Deletion is irreversible and cannot be undone through normal operations, making it Destructive rather than Write. The blast radius is high: an AI agent with access to this tool could wipe out entire sections of a knowledge base if it misidentifies or is tricked into targeting the wrong source.

From the tool's own definition: "Tool name 'delete_by_source' combined with description 'Delete all documents from a specific source' — uses imperative 'delete' indicating irreversible removal of data."

## Use case

AI agents call delete_by_source 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": [
    "delete_by_source"
  ]
}
```

## Other tools on MCP RAG Server (6)

- `clear_collection` — Destructive — https://policylayer.com/tools/0xrdan-mcp-rag-server/clear-collection.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
