Skip to main content
Glama

memory_search

Read-only

Search persistent project and personal memory by keyword to recall past decisions, conventions, or preferences before asking the user again.

Instructions

Search persistent memory by keyword (BM25 full-text). Returns matching memories from the current project and/or personal scope. Call before asking the user about past decisions, conventions, or preferences they may have told you before. Search well: break the question into its concepts and try 2–3 phrasings per concept — synonyms, the user's other language, shorter keyword forms — and check the other scope too, before concluding nothing is stored. Results are ranked by BM25 within review tiers — reviewed (approved/published) project memories come first. limit caps how many come back (default 8) and type restricts to one memory type.

Input Schema

NameRequiredDescriptionDefault
typeNoRestrict to memories of this type (e.g. decision, preference, gotcha).
limitNoMax results to return (default 8).
queryYesFree-text query. File paths, error strings, identifiers work well.
scopeNoWhich scope(s) to search. Default: both.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.7.3
    • addedInput schema / properties / limit / description
      Added value: +"Max results to return (default 8)."
    • changedInput schema / properties / scope / enum
      Previous value: -[
      -  "project",
      -  "personal",
      -  "user",
      -  "both"
      -]New value: +[
      +  "project",
      +  "personal",
      +  "both"
      +]
    • changedInput schema / properties / type / description
      Previous value: -"Restrict to memories of this type."New value: +"Restrict to memories of this type (e.g. decision, preference, gotcha)."
  2. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so safety is covered. The description adds genuinely new behavioral context: results are ranked by BM25 within review tiers and reviewed (approved/published) project memories come first, plus the default result cap of 8. It does not discuss latency or result volume beyond the limit.

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-loaded with purpose and return behavior, then usage and search strategy. Every sentence is functional, though the search-strategy sentence is dense and could be tightened slightly without losing meaning.

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?

Covers scope of results, absence of output schema is compensated by 'Returns matching memories,' and ranking/default behavior is explained. An agent has everything needed to decide to call it and to call it well.

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%, so the baseline is 3. The description adds meaning beyond the schema by explaining how to phrase the `query` effectively (concepts, synonyms, shorter keyword forms) and reiterating the `limit` default and `type` restriction in context.

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?

States a specific verb and resource (search persistent memory) and the retrieval method (BM25 full-text). It also scopes results to 'current project and/or personal scope,' which lets an agent separate it from memory_list or memory_forget without opening a schema.

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 clear trigger condition: call before asking the user about past decisions, conventions, or preferences. Adds concrete search strategy (break into concepts, try 2-3 phrasings, check the other scope). It does not name which sibling to use instead when memory is absent, so it stops short of the top tier.

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