Skip to main content
Glama

search_knowledge_tool

Search project knowledge using hybrid keyword, semantic vector, and full-text retrieval. Filter by framework, code type, or symbol, and supply multilingual query variants to improve cross-language matches.

Instructions

搜尋知識文件內容(三路混合檢索:關鍵字 + 向量語意 + 全文內容)

Args: project_name: 專案名稱 query: 主要搜尋查詢(任何語言) query_variants: 同義查詢的其他語言版本,例如 ["nearby area search", "近郊地區搜尋"] 提供越多語言版本,跨語言命中率越高 framework: 框架過濾(選填) framework_layer: 框架層級過濾(選填) code_type: 程式碼類型過濾(選填) symbol_name: 符號名稱過濾(選填)

Returns: 搜尋結果與使用指引

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

Input Schema

NameRequiredDescriptionDefault
queryYes
code_typeNo
frameworkNo
symbol_nameNo
project_nameYes
query_variantsNo
framework_layerNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2601.5

TDQS

B3.3/5.0
Behavior3/5

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

With no annotations, the description must carry the behavioral load, and it does disclose the retrieval strategy (keyword + vector + full-text), which is genuinely useful context about how matches are produced. It says nothing about result caps, ranking or ordering, pagination, project scoping requirements, or cost/latency; the Returns line (搜尋結果與使用指引) is nearly empty, though the presence of an output schema lowers the burden somewhat.

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 is front-loaded in one line, followed by a compact Args block in schema order, which makes it easy to scan. A few entries are near-redundant with their parameter names (project_name: 專案名稱) and the Returns line carries almost no information, but nothing is verbose.

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?

For a seven-parameter search tool with zero schema description coverage and no annotations, the definition covers the parameter surface but leaves behavioral gaps: no statement of result limits or how many results come back, no mention of how the four filters combine, and no note on prerequisites such as the project needing to be indexed. The existence of an output schema excuses it from explaining return values in detail.

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 does enumerate all seven parameters with at least a gloss on each and marks the four filters as optional (選填). The query_variants entry adds real semantics the schema cannot convey — a multilingual synonym list with the note that more languages improve cross-language recall. The glosses for framework, framework_layer, code_type, and symbol_name remain close to name restatement, so it is not a full 5.

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 opening line states a specific verb and resource (搜尋知識文件內容) and even names the mechanism (三路混合檢索:關鍵字 + 向量語意 + 全文內容), so an agent can tell this is a hybrid search tool rather than a read/get/list tool. It stops short of naming a sibling such as read_knowledge_tool as the alternative, which keeps it out of the top band.

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 explicit statement of when to use this versus read_knowledge_tool, get_project_knowledge_tool, or list_knowledge_tool, and no when-not guidance. The only usage-like advice is about supplying more query variants to raise cross-language hit rate, which is parameter tuning rather than tool selection.

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