Skip to main content
Glama

search_memories

Query persistent project-scoped memory for facts, rules, and lessons relevant to the current task; results stay scoped unless you widen to all projects.

Instructions

Search your persistent memory store for facts, rules, and lessons relevant to the current task. CALL THIS: at the start of every session, before answering questions about past work, before applying preferences the user may have expressed before, or whenever you are unsure whether you have prior context on a topic. SCOPED BY DEFAULT: results come from the current project's family plus global (project-less) memories — other projects' memories never appear unless you widen. To widen: pass all_projects=true to search the entire store (each hit then carries its 'project' label), or pass project= to hard-filter to one specific project. The resume digest and blocks show a memory index with counts ('+N more on ') — those topics are guaranteed to return results here; the injected blocks are a teaser of this store, not its full depth. Returns memories ranked by relevance — only what matters, not everything. Superseded (corrected/replaced) memories are hidden by default. This is faster and more relevant than reading individual memory files.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "query": "<query>"
    },
    "name": "search_memories"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryYesNatural-language description of what you want to recall. Examples: 'user preferences for code style', 'how does the Instagram pipeline work', 'what trading rules should I follow'
top_kNoMax results to return (default 8, max 30). Use 15-20 for broad topic discovery.
formatNoOutput format. 'json' (default) is universal and works with all LLMs. 'toon' is a token-efficient sigil format — use only if you know the TOON spec.json
projectNoHard-filter to exactly one project's memories. Usually UNNECESSARY — searches are already scoped to the current project's family + global memories. Set only to look at a specific other project.
type_filterNofb=feedback (corrections, preferences, how the user likes to work), us=user (who the user is, their role, expertise, goals), pj=project (active projects, goals, decisions, deadlines), rf=reference (pointers to external systems, URLs, tools), cn=convention (code style, naming, architecture rules), lx=lesson (lessons learned, post-mortems, 'we got burned by X'), co=core (the per-project operating guide — which tools/skills/commands to reach for; always injected at session start, subordinate to the repo's own rules), tr=tracker (LIVE STATUS of exactly one entity — a deploy, draft, migration, campaign. One tracker per entity, slug '<entity>-status', tags naming the entity; UPDATE it by re-saving the same slug whenever the state changes. Trackers render as the status board at session start; memgit is the authority for this status, files are downstream)
all_projectsNoSearch the ENTIRE store instead of the default scope (current project family + global). Every hit carries its 'project' label so cross-project results are attributable.
include_supersededNoAlso score memories that a newer memory supersedes. Default false — the current head of each correction chain is what you want; set true only for history archaeology.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.14.3

TDQS

A4.6/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 disclosure burden and does most of it: default scoping, the fact that superseded memories are hidden, that hits are ranked by relevance rather than exhaustive, and that cross-project hits carry a 'project' label. It stops short of describing empty-result or failure behavior, so it is strong but not exhaustive.

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 then an explicit CALL THIS block then scoping rules — an agent can act after the first two sentences. A few clauses are redundant (the memgit-recall teaser explanation and the closing comparison repeat the 'not its full depth' idea), but nothing is filler-heavy enough to obscure the call instructions.

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?

Seven parameters with no annotations and no output schema, yet the description covers return ranking, hidden superseded entries, per-hit project attribution, and the default scope boundary — everything an agent needs to interpret results correctly. The complexity is fully matched by the prose.

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 would be 3, but the description adds genuine decision meaning: it frames project= as 'usually UNNECESSARY' versus all_projects=true as the store-wide widening, which the raw schema does not make relational. It also explains why default results are safe without either parameter.

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?

Opens with a specific verb and resource ('Search your persistent memory store') plus the content classes it holds (facts, rules, lessons) and the scope (current project family + global). It is clearly distinguishable from sibling read tools like list_memories or get_memory, which are enumeration/lookup rather than relevance search.

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?

Gives explicit trigger conditions ('at the start of every session, before answering questions about past work, before applying preferences... whenever you are unsure'), explicit default behavior ('SCOPED BY DEFAULT... other projects' memories never appear unless you widen'), and the two widening routes side by side. It also names the alternative it beats ('faster and more relevant than reading individual memory files').

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