Skip to main content
Glama

memory_search

Search local long-term memory for knowledge card summaries by entity, identifier, or path fragment. Retrieve project background, past decisions, or configuration details.

Instructions

检索本地长期记忆库,返回最相关的知识卡摘要。当需要项目背景、历史决策、之前讨论过的方案、环境配置、踩过的坑,或任何「我之前是不是记过这件事」的场景时调用。查不到就说明没记过,不要凭猜测继续。支持中文词、英文标识符(如 nginx、id_ed25519)、IP、路径片段。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kindNo可选,按卡片类型过滤:knowledge / project / mistake / prompt / tool / content
limitNo返回条数上限,默认 5,最大 20
queryYes检索词。**传实体名 / 标识符 / 命令 / 路径片段,不要传整句问句。**好的例子:`阿里云`、`id_ed25519`、`sqlite3`、`ecs-prod`、`/etc/nginx`、`database is locked`。不要传:「之前记过阿里云的内容吗」、「帮我找一下数据库相关的记录」——完整问句里只有个别词有检索价值,其余词会把结果带偏,并且会使匹配档位从精确(AND)降级到放宽(OR),而放宽档正是噪音的主要来源。
sourceNo可选,按来源 agent 过滤

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/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 does notably well: it explains that an empty result means nothing was recorded (a non-obvious, actionable behavioral trait) and lists the token types that match well. It does not disclose permissions, ranking/scoring behavior, or result shape, but for a local read-only search this is genuinely informative.

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?

Front-loads the core action and result, then the usage conditions, then the empty-result caveat and format support. Every sentence earns its place and there is no filler, though it is slightly long.

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 4-param, no-annotation, no-output-schema tool, the description covers purpose, usage triggers, empty-result semantics, and query format. The kind/source filters and limit are left to the schema, which is acceptable given full schema coverage, leaving only minor gaps.

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 100% and the schema already documents query/kind/limit/source in detail, so the baseline is 3. The description still adds value by stating supported query forms (Chinese words, English identifiers like nginx/id_ed25519, IPs, path fragments), reinforcing how to populate query beyond the schema text.

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?

Opens with a concrete verb+resource: '检索本地长期记忆库,返回最相关的知识卡摘要', which clearly marks it as a search/retrieval tool. It does not explicitly name or differentiate from the siblings memory_get/memory_stats, so it falls short of a 5, but the purpose is unambiguous.

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

Usage Guidelines4/5

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

Gives a rich when-to-use list (项目背景、历史决策、之前讨论过的方案、环境配置、踩过的坑, or 'did I record this'). It also gives a when-not/what-to-do-if-empty rule ('查不到就说明没记过,不要凭猜测继续'). It never mentions the alternative retrieval tools (memory_get, memory_stats), so it stops short of explicit alternative routing.

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