Skip to main content
Glama

delete_document

Delete all records of a RAG document, webpage, or table by source, cascading to BM25 and vector indexes; returns source and deleted count. Empty source is invalid.

Instructions

按 source 删除一份 RAG 文档/网页/表格的全部记录,返回 {"source", "deleted"}; 删除会级联清理 BM25 与向量索引;source 为空时返回 INVALID_ARGUMENT。 project 指定项目子库(空=全局库);client 仅用于审计归类。 English: Delete all records of one RAG document/webpage/table by source, returning {"source", "deleted"}; cascades to BM25 and vector indexes; empty source returns INVALID_ARGUMENT. project selects the sub-store (empty = global); client is audit-only.

Input Schema

NameRequiredDescriptionDefault
clientNo
sourceYes
projectNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.4.4

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden and does substantial work: it discloses cascade deletion of BM25 and vector indexes, the {"source", "deleted"} return shape, the INVALID_ARGUMENT failure for empty source, and that client is audit-only metadata. It stops short of stating whether deletion is recoverable, what the `deleted` count represents, or whether elevated permissions are required for a destructive operation.

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?

Content is front-loaded with the destructive scope and cascade behavior in the opening sentence, which is correct ordering. But the entire text is duplicated verbatim in Chinese and English, roughly doubling length with zero added information for a single agent, and the parenthetical error/parameter notes are run together in one block.

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 3-parameter destructive tool with no annotations and no output schema, the description supplies the essential load-bearing facts: what gets removed, that secondary indexes are cascaded, the return shape, and the error condition. Only permission/auth prerequisites and irreversibility are unstated, which is a minor residual gap given the rest of the coverage.

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, and it explains the role of all three parameters: project selects the sub-store (empty = global), client is audit-only, and source is the deletion key. The remaining gap is that the required `source` parameter's expected format (exact URL, path, or filename) and matching semantics are never specified.

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?

States a specific verb and resource with explicit scope: delete *all records* of one RAG document/webpage/table, keyed by source. That scope wording distinguishes it from the sibling delete_memory (which operates on memories, not ingested document records) without needing to open either schema.

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?

The description implies when to use it (purge a whole document's records by source) and explains the project sub-store selection and the empty-source error case. However it gives no explicit when-not-to-use guidance, never mentions the delete_memory sibling, and does not say anything about confirming intent before a destructive purge.

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