Skip to main content
Glama

search_memory

Retrieve stored memories and knowledge using hybrid vector and BM25 keyword search, returning scored matches. Scope results to a project plus global entries or search global only.

Instructions

混合检索记忆与知识(向量语义 + BM25 关键词,归一化融合); 返回命中列表,每项含 id/content/score/type/source。 project 指定项目子库时,检索范围 = 该项目子库 + 全局库(项目命中加分); 不传 project 时只检索全局库。 top_k 小于 1 时返回 {"error": "INVALID_ARGUMENT", "message": 原因}。 client:来源客户端(可选,缺省从 clientInfo 自动识别,仅审计)。 English: Hybrid retrieval over memories and knowledge (vector semantics + BM25 keywords, normalized fusion); returns a hit list, each item having id/content/score/type/source. With project, the scope is that project's sub-store plus the global store (project hits boosted); without project, only the global store is searched. Returns {"error": "INVALID_ARGUMENT", "message": reason} when top_k is less than 1. client: source client (optional; auto-detected from clientInfo when omitted; audit only).

Input Schema

NameRequiredDescriptionDefault
queryYes
top_kNo
clientNo
projectNo

Output Schema

NameRequiredDescriptionDefault
resultYes

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?

No annotations are provided, so the description carries the full burden and largely meets it: it discloses the return shape (id/content/score/type/source per hit), the error contract for top_k < 1, the project-boost behavior, and that client is audit-only. It omits auth/permission requirements and any latency or rate-limit context, keeping it out of 5 territory.

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?

Content is front-loaded and each clause carries information, but the entire description is duplicated verbatim in Chinese and English, roughly doubling the length for the same payload. That redundancy is a real cost against a tight token budget even if it aids bilingual readability.

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?

For a four-parameter retrieval tool with an output schema present, the description covers the scoping model, error behavior, and audit-only client well enough to call correctly. Since an output schema exists it need not detail return values, though it helpfully does; only query semantics and default top_k are left unaddressed.

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 for most parameters: project's scoping effect, top_k's validation boundary, and client's optional/auto-detected/audit-only nature. The query parameter itself is left unexplained and top_k's default (5) and result-count meaning are not spelled out, so it is strong but not complete.

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 — hybrid retrieval over memories and knowledge — and even names the retrieval mechanism (vector semantics + BM25, normalized fusion), so the agent knows exactly what operation this performs. It does not, however, differentiate itself from siblings like read_memory or ask_kb, so it falls short of a 5.

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 through conditional scoping rules (with project → project sub-store + global; without project → global only), which tells the agent how the call behaves. But there is no explicit guidance on when to choose this over ask_kb or read_memory, and no exclusions stated.

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