Skip to main content
Glama

search_memories

Retrieve relevant passages from the user's long-term memory by query, ranked by relevance and labeled by source memory. Use it to ground agent responses with stored facts rather than generate answers.

Instructions

Passages the user's memory holds on q, most relevant first, each naming the Memory it came from (memory_name); a fact carries its mem_ id. limit is the total number of passages (1-50); mode="fast" is one round with no model call. Retrieval, not an answer.

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": {
      "q": "<q>"
    },
    "name": "search_memories"
  }
}

Input Schema

NameRequiredDescriptionDefault
qYes
modeNofull
limitNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/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 well: it discloses result ordering (most relevant first), the shape of each result (passage plus source `memory_name`, `mem_` id for facts), that `mode="fast"` skips a model call, and that this is retrieval rather than generation. It stops short of stating whether anything is mutated or how many rounds 'full' mode makes.

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?

Three tight clauses with no filler, and the core purpose plus ranking guarantee are front-loaded before the parameter notes. The opening is a verbless fragment ('Passages the user's memory holds on `q`') that reads slightly telegraphic, but every clause carries information an agent needs.

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?

With an output schema present, return-value documentation is not required, and the description instead supplies the ranking guarantee and per-result provenance. All three parameters are addressed despite 0% schema coverage; the only real hole is the unexplained default 'full' mode.

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 0%, so the description must compensate and largely does: it defines `q` as the query, `limit` as the total passage count with an explicit 1-50 bound, and `mode="fast"` as a single no-model round. The gap is the default `mode="full"`, whose behavior is never explained even though the schema only declares the default value.

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 names a concrete operation on a concrete resource: returning passages the user's memory holds for a query, ranked by relevance, each tagged with its source `memory_name`. The closing line 'Retrieval, not an answer' cleanly separates it from answer-generating siblings like ask_memory, though no sibling is named explicitly.

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?

'Retrieval, not an answer' implies when to reach for this over an ask/answer tool, and the note that `mode="fast"` does 'one round with no model call' gives a cost/latency basis for choosing a mode. However, there is no explicit when-to-use statement, no exclusion, and no comparison to list_memories for non-query browsing.

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