Skip to main content
Glama

ask_kb

Answer questions from project and global knowledge bases using RAG: retrieve context, generate a grounded answer, and return cited sources.

Instructions

基于知识库的 RAG 问答(检索 → 上下文拼装 → 护栏生成),返回 answer 与 sources; project:检索该项目子库 + 全局库(空=仅全局库),并写 ask 存取审计; client:来源客户端(可选,缺省从 clientInfo 自动识别,仅审计); LLM 不可用时返回 {"error": "LLM_DISABLED", "message": 配置指引}。 English: Knowledge-base RAG Q&A (retrieve → build context → guarded generation), returning answer and sources; project: search that project's sub-store plus the global store (empty = global only); an ask access-audit is emitted; client is audit-only; returns {"error": "LLM_DISABLED", "message": setup guidance} when the LLM is unavailable.

Input Schema

NameRequiredDescriptionDefault
clientNo
projectNo
questionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior4/5

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

With no annotations the description carries the full burden, and it does disclose meaningful behavior: the retrieve→context→guarded-generation pipeline, the side effect that an ask access-audit is written, that client is audit-only, and the exact failure contract {"error": "LLM_DISABLED", ...}. It stops short of covering auth requirements, rate limits, or result-size limits.

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?

The content is front-loaded and dense, but the English block restates the Chinese block nearly verbatim, roughly doubling the length without adding information. A single-language description would carry the same payload.

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?

No output schema exists, so the description correctly takes on the return contract (answer + sources, plus the error object) and covers the one non-obvious side effect. Missing detail is limited to the shape of sources and any size or rate limits.

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. It successfully explains project (sub-store + global, empty = global only) and client (optional, auto-detected from clientInfo, audit-only), which the schema alone gives no meaning for. Only 'question' is left without added detail, but its meaning is self-evident.

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 states a specific verb and resource: 'Knowledge-base RAG Q&A (retrieve → build context → guarded generation), returning answer and sources'. It is unambiguous about what the tool produces, but it does not name or contrast with siblings such as search_memory, so an agent must infer the boundary itself.

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 by the pipeline and by the project/client explanations, and the LLM-disabled fallback gives situational context. However, there is no explicit when-to-use-this-vs-search_memory guidance, no statement about question phrasing, and no exclusion conditions.

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