Skip to main content
Glama
MCP Server RAG

MCP Server RAG

by atengk

rag_clear_kb

Clears all documents and chunks from a specified knowledge base while preserving its configuration and metadata. Use it to reset KB content without deleting the KB itself.

Instructions

清空指定知识库中的所有文档与切片数据,但保留知识库本身的基础配置与元数据。

Args:
    name: 待清空的知识库名称

Returns:
    dict[str, Any]: 清空结果与状态说明

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "name": "<name>"
    },
    "name": "rag_clear_kb"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full burden and does useful work: it discloses that all documents and chunk data are destroyed and precisely what survives (base configuration and metadata), which is exactly the boundary an agent needs before a destructive call. It stops short of stating irreversibility, whether confirmation is required, or what happens if the name does not exist.

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

Conciseness4/5

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

The body sentence is front-loaded and states the scope plus the preservation boundary with no filler; the Args/Returns block is formulaic but compact. Slightly redundant given the single obvious parameter, but nothing is wasted.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The output schema exists, so the Returns note is not needed for return-value comprehension. For a destructive operation with zero annotation coverage, the definition should say more about irreversibility, behavior on a missing knowledge base, and whether the call is idempotent — those gaps matter more here than for a read tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

There is a single parameter with 0% schema description coverage, so the description must compensate; it clarifies the value is the knowledge base name being cleared, distinguishing it from an ID. However, it adds no detail on format, case sensitivity, or error behavior for an unknown name, so the compensation is only partial.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb (清空/clear) and a specific resource scope (all documents and chunks in the given KB), and explicitly states that the knowledge base itself plus its configuration and metadata are preserved. That preservation clause is what separates it from a KB-deleting operation like rag_delete_kb, though the sibling is not named outright.

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?

Usage is implied rather than stated: an agent can infer this is for wiping content while keeping the KB, which contrasts with deleting the KB entirely. There is no explicit when-to-use/when-not-to-use guidance, no mention of prerequisites, and no named alternative for the case where the whole knowledge base should go.

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