Skip to main content
Glama

Memory Search

memory_search

Search long-term memory for facts matching a natural-language query to avoid asking users to repeat themselves. Returns ranked matches, optionally filtered by user, agent, or category.

Instructions

Search long-term memory for facts matching a natural-language query.

Use this before asking the user to repeat themselves. Searches fact content (keyword and, when a retrieval index exists, ranked matching) and returns the best matches with their category and confidence.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of facts to return (default 10).
queryYesWhat to look for, e.g. "package manager preference".
user_idNoWhose memory to search. Defaults to the server's configured user when omitted.
categoryNoOptional exact category filter (e.g. "preference", "correction"). Applied before the result limit.
agent_nameNoOptional per-agent bucket. Omit for shared memory.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

No annotations are present, so the description carries the behavioral burden. It discloses useful search behavior: keyword matching, conditional ranked matching when an index exists, and returns including category and confidence. It doesn't explicitly say the operation is read-only, but 'Search' strongly implies non-mutation, and the matching behavior is well described.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three short sentences front-load the core purpose, then provide usage timing, then explain matching behavior. Every sentence adds distinct value with no filler or repetition of schema details. The structure makes the tool easy to scan and act on.

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 and 100% schema coverage, the description doesn't need to restate return structures. It supplies the key missing context: when to call it and how matching works. It could more explicitly route to sibling tools like memory_get or memory_context, but it is otherwise complete for a search tool.

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 description coverage is 100%, so the schema already documents all five parameters. The description adds mild nuance to 'query' as a natural-language search and references category/confidence in results, but doesn't systematically enrich parameter meaning beyond the schema. Baseline 3 is appropriate.

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 opens with a specific verb and resource: 'Search long-term memory for facts matching a natural-language query.' It clearly distinguishes this from the sibling memory tools by emphasizing natural-language search over retrieval, remembering, updating, or deleting. The 'best matches' framing further clarifies that this is a search-and-rank operation.

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?

The description gives an explicit trigger condition: 'Use this before asking the user to repeat themselves.' This is concrete and actionable. It doesn't name alternative sibling tools or state when not to use it, but the guidance is clear enough for most agent decisions.

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