Skip to main content
Glama

kb_search

Search the SQLite knowledge base and return relevant text snippets for a query, with optional tag filtering and result limits.

Instructions

检索知识库,返回最相关的片段。

Args: query: 查询文本。 top_k: 返回片段数,1-50;0 表示使用配置值。 tags: 逗号分隔的标签过滤(需全部匹配)。

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": {
      "query": "<query>"
    },
    "name": "kb_search"
  }
}

Input Schema

NameRequiredDescriptionDefault
tagsNo
queryYes
top_kNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.1/5.0
Behavior2/5

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

No annotations are provided, so the description must carry the full burden of behavioral disclosure. It says only that results are 'most relevant snippets' — it does not describe ranking method, whether results are capped by top_k or by configuration, latency, or any permission requirements.

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 purpose sentence is front-loaded and short, and the per-argument notes are compact. The 'Args:' section is conventional rather than elegant, 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?

With an output schema present, return values need not be explained, and all three parameters are documented. What remains missing is usage context — when to prefer this over the other kb_* tools — which matters given nine sibling knowledge-base tools.

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%, but the description compensates well: it explains that top_k has a range of 1–50 and that 0 means 'use the configured value', and that tags is a comma-separated filter requiring all tags to match. These are meaningful semantics the schema does not encode.

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 ('检索知识库,返回最相关的片段'), so an agent immediately knows this is a semantic search over the knowledge base. It does not distinguish itself from kb_get or kb_list, so sibling differentiation is left implicit.

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

Usage Guidelines2/5

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

There is no statement of when to use this tool rather than kb_get, kb_list, or web_search, and no prerequisites or exclusions are given. The agent must infer usage from the verb alone.

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