Skip to main content
Glama

memory_search

Search stored memory entries within one scope, ranked by BM25 relevance. Use it to recall prior knowledge by keyword, or leave the query empty to list the scope's recent entries.

Instructions

Search memory entries within one scope, ranked by BM25.

Covers the memories table only (direction-layer entries plus the legacy team/agent knowledge partitions); task memos, reports, and tasks are not searched here (use unified_search). Only valid entries are returned. English matches whole words with no stemming ("worktree" does not match "worktrees"); Chinese matches by character bigrams. An empty query returns the scope's most recent entries. To review everything a dispatched agent inherits, use memory_list.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of results, default 10 (1-100)
queryNoSearch keywords (empty = most recent entries in the scope)
scopeNoOne of "global" (default) / "project" / "user" / "team" / "agent". Each call searches exactly one scope, so entries saved with scope="project" are found only with scope="project".global
scope_idNoScope ID;**留空**时服务端按上下文推导(global→system、 user→user、project→当前项目或未注册目录的指纹临时桶)。只有需要 跨作用域精确指定时才显式传(如某 team 的 scope_id)。

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv1.15.0
    • changedInput schema / properties / limit / description
      Previous value: -"Maximum number of results, default 10"New value: +"Maximum number of results, default 10 (1-100)"
    • changedInput schema / properties / query / description
      Previous value: -"Search keywords"New value: +"Search keywords (empty = most recent entries in the scope)"
    • changedInput schema / properties / scope / description
      Previous value: -"Memory scope, default \"global\""New value: +"One of \"global\" (default) / \"project\" / \"user\" / \"team\" /\n\"agent\". Each call searches exactly one scope, so entries saved\nwith scope=\"project\" are found only with scope=\"project\"."
  2. Changed2 schema fields changedv1.11.2
    • changedInput schema / properties / scope_id / default
      Previous value: -"system"New value: +""
    • changedInput schema / properties / scope_id / description
      Previous value: -"Scope ID, default \"system\""New value: +"Scope ID;**留空**时服务端按上下文推导(global→system、\nuser→user、project→当前项目或未注册目录的指纹临时桶)。只有需要\n跨作用域精确指定时才显式传(如某 team 的 scope_id)。"
  3. First observedv1.9.0

TDQS

A4.4/5.0
Behavior4/5

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

Even without annotations, the description discloses meaningful semantics: BM25 ranking, empty query returns most recent entries, only valid entries are returned, and language-specific matching quirks (English whole-word matches, Chinese character bigrams). It does not mention pagination or performance/rate limits, but for a search tool the behavioral picture is quite rich.

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 core purpose and scope constraint are front-loaded in two sentences, with secondary details afterward. The description is a bit long, but every sentence adds useful behavioral context.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given an output schema exists and the tool has four optional parameters with full schema coverage, the description is complete: it explains scope constraints, matching semantics, empty-query behavior, and routing to siblings. Nothing material for correct invocation is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the schema already documents all parameters. The description reinforces the key semantics (one scope per call, empty query behavior) and mentions scope deduplication, but does not add syntax or format details beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb (Search) and resource (memory entries within one scope) and explicitly lists what is covered versus not covered. It distinguishes sibling tools by name (unified_search for docs/tasks, memory_list for reviewing inherited entries).

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

Usage Guidelines5/5

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

It tells when to use this tool versus alternatives: use unified_search for task memos, reports, and tasks; use memory_list to review everything a dispatched agent inherits. The scope-per-call constraint is also spelled out: entries saved with scope="project" are only found with scope="project".

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

Deploy Server

Other Tools