Skip to main content
Glama

memory_search

Read-only

Search shared project and user memories using keyword and optional semantic ranking; omit the query to browse recent entries and filter by project, scope, kind, tags, or status.

Instructions

检索记忆(词法全文 + 可选语义向量混合排序)。query 可省略以浏览最近记忆。在 project 指定的项目内检索(HTTP 模式必须传 project),并合并用户级记忆,命中带 scope 标注。命中字段:score 是本次查询内的融合排序分(0..1,跨查询不可比);relevance 是绝对相关性(语义余弦原值,纯词法命中为 null);matched 标明命中来源(semantic/lexical/both);semanticScore 保留为兼容字段。total 是过相关性门槛后的命中数,scanned 是参与语义扫描的向量数。

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "memory_search"
  }
}

Input Schema

NameRequiredDescriptionDefault
kindNo
tagsNo
limitNo
queryNo检索词;省略则按时间浏览
scopeNo限定作用域层:user/project/device/agent;默认全作用域(含用户级)
offsetNo
statusNo默认 active
projectNo项目名或 id。省略时从当前工作目录自动解析

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.4

TDQS

A4/5.0
Behavior5/5

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

Annotation readOnlyHint=true is consistent with a search tool and the description does not contradict it. Beyond the annotations it discloses real behavior: project is mandatory in HTTP mode, results merge user-level memories across scopes, hits carry a scope label, score is query-local and not comparable across queries, relevance may be null on pure lexical hits, and it explains what total and scanned mean. This is unusually rich behavioral context for a read-only tool.

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 description is front-loaded: purpose and hybrid ranking come first, then the optional-query behavior, then the project/scope rules, then the return-field semantics. The return-field block is dense but every field it names is genuinely useful. It is slightly long, but no sentence is wasted.

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?

There is no output schema, so the description carrying the meaning of score, relevance, matched, semanticScore, total, and scanned is exactly the right move. The tool has 8 parameters and only part of their semantics is covered, which keeps this short of a 5. For a read-only search tool, the essential context is present.

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 coverage is only 50%, and the description closes the most important gaps: it explains that query is optional (browse mode) and that project is required under HTTP mode, on top of the schema's auto-resolve note. It leaves kind, tags, limit, offset, and status unexplained, so it adds value but does not fully compensate for the coverage gap.

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 gives a specific verb and resource ('检索记忆'), and adds the distinguishing mechanism: lexical full-text plus optional semantic vector hybrid ranking. An agent can tell this is the search tool rather than a single-record read. It does not explicitly contrast itself with memory_read or memory_review, so it stops 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?

It gives one concrete when-to-use rule: omit query to browse recent memories, and it notes that HTTP mode requires project. There is no guidance on choosing between this and siblings like memory_read or memory_review, or on when semantic search is worth the cost versus plain lexical lookup.

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