Skip to main content
Glama

Search memories

memory_search

Retrieve relevant memories from external storage at session start to recover facts, decisions, roles, and history.

Instructions

Retrieve relevant memories from external storage. Call this at the start of a session (or whenever prior context might exist) to recover facts, decisions, roles and history.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeNo
limitNo
queryNoKeywords to match (omit to get a scope/recency-ranked list)
scopeNoCurrent project path or workspace id to filter by
explainNoInclude per-memory score breakdown (V4.2.0+)
includeFutureNo
includeExpiredNo
includeArchivedNo
includeQuarantinedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv4.8.0
    • addedInput schema / properties / explain
      Added value: +{
      +  "description": "Include per-memory score breakdown (V4.2.0+)",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / includeArchived
      Added value: +{
      +  "type": "boolean"
      +}
    • addedInput schema / properties / includeExpired
      Added value: +{
      +  "type": "boolean"
      +}
    • addedInput schema / properties / includeFuture
      Added value: +{
      +  "type": "boolean"
      +}
    • addedInput schema / properties / includeQuarantined
      Added value: +{
      +  "type": "boolean"
      +}
    • changedInput schema / properties / type / enum
      Previous value: -[
      -  "fact",
      -  "decision",
      -  "role",
      -  "history"
      -]New value: +[
      +  "fact",
      +  "preference",
      +  "decision",
      +  "constraint",
      +  "instruction",
      +  "role",
      +  "entity",
      +  "relationship",
      +  "event",
      +  "history",
      +  "observation"
      +]
  2. First observedv0.4.0

TDQS

B3.1/5.0
Behavior2/5

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

With no annotations provided, the description carries the full behavioral disclosure burden, but it only says memories are 'relevant' and recoverable. It does not explain matching semantics, ordering, return format, or how filters like includeExpired/includeArchived/includeQuarantined affect results. This is a significant transparency gap.

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 description is short and front-loaded with the core retrieves role, and the usage note is valuable. However, the phrase 'facts, decisions, roles and history' largely duplicates enum values already present in the schema, so not every word adds unique value.

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

Completeness2/5

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

Given 9 parameters, no annotations, and no output schema, this description is insufficient for an agent to fully understand how to invoke the tool correctly. It tells when to call it but not how filtering flags, limits, or explain scoring behave, leaving key invocation details unresolved.

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

Parameters2/5

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

Schema description coverage is only 33%, so the description must compensate for the many undocumented parameters. It does not; it only lists memory categories like facts, decisions, roles, and history, which partially overlap the 'type' enum. The six undocumented include flags and limit behavior remain unexplained.

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 specific verb ('Retrieve') and resource ('relevant memories from external storage'), and its focus on relevance and session-start recovery distinguishes it reasonably from memory_list or memory_get. However, it does not explicitly differentiate from siblings, so it stops short of a 5.

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?

'Call this at the start of a session (or whenever prior context might exist)' is explicit, actionable guidance on when to use the tool. It lacks any mention of when NOT to use it or which sibling tools are better suited for specific cases, so it does not fully earn a 5.

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