Skip to main content
Glama
Ancient Echoes MCP

Ancient Echoes MCP

lingxi.rag_search

lingxi.rag_search
Read-only

Retrieve original knowledge-base passages with source details—title, page, file, similarity, and chunk position—without AI generation or credits; if searched=false, report reason as execution error.

Instructions

只检索知识库并返回命中的原文片段与出处(篇目、页码、来源文件、相似度、chunk 位置),不生成回答、不消耗 AI 额度、不依赖 AI provider key。searched=false 表示检索没有执行,调用方必须按 reason 报错,不得当成“库里没有这段内容”。

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": {
      "dataset_key": "<dataset_key>",
      "query": "<query>"
    },
    "name": "lingxi.rag_search"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryYes检索词,优先使用原文用词
top_kNo
collectionNo可选,覆盖数据集默认 collection
dataset_keyYes数据集 key,可通过 GET /api/v1/rag/datasets 获取

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.1

TDQS

A4.4/5.0
Behavior5/5

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

Annotations only declare readOnlyHint=true, and the description adds substantive behavior beyond that: no AI quota consumed, no provider key required, and precise semantics for the searched=false flag including the correct caller reaction. The failure-mode contract is exactly the kind of context annotations cannot express.

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

Conciseness5/5

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

Two dense sentences, front-loaded with what is retrieved and returned, followed by the searched=false contract. No filler and no repetition of the tool name or title.

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

Completeness4/5

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

With no output schema, the description carries the return-value burden and does so by listing the provenance fields and the searched flag semantics. Minor gap: nothing about result ordering/ranking expectations or how top_k affects output, though those are partly inferable from the schema.

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?

Schema description coverage is 75%, with query, dataset_key, and collection documented in-schema; top_k carries no description text. The description itself adds no parameter-level meaning (no guidance on top_k values, collection override behavior, or query phrasing beyond what the schema says). Baseline 3 applies since the schema does most of the work.

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?

The description names a specific verb and resource ("只检索知识库") and enumerates the exact payload returned: 原文片段 plus 篇目、页码、来源文件、相似度、chunk 位置. It also explicitly carves out what it is not ("不生成回答"), which is the key distinction from the generation-oriented sibling lingxi.rag_query.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Clear context for choosing this tool: no AI quota, no provider key, retrieval-only. It also gives an explicit operational rule for the searched=false case (must raise an error per reason, must not be read as an empty knowledge base). It stops short of naming lingxi.rag_query as the alternative when a generated answer is actually wanted, leaving that step to inference.

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