Skip to main content
Glama

search_memory

Retrieve relevance-ranked project memory blocks by query to pull targeted prior decisions, conventions, or notes for a task without loading the entire memory file.

Instructions

Relevance-ranked memory retrieval. Returns the memory blocks most relevant
to `query` (scored by keyword overlap) instead of the head of memory.md.

Use this to pull targeted prior decisions/conventions/notes for the current
task without loading the whole memory file.

Args:
    query: Free-form text describing what you're looking for.
    n_results: Maximum number of memory blocks to return (default 5).

Returns:
    Markdown with the top matching memory blocks, or a hint if none match.

Input Schema

NameRequiredDescriptionDefault
queryYes
n_resultsNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.12.0

TDQS

A4.3/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 disclose meaningful behavior: the scoring mechanism (keyword overlap), the default of 5 results, the markdown return format, and the fallback "hint if none match." It omits any note on permissions or performance limits, keeping it from a 5.

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-loads the purpose, then uses tidy Args/Returns sections. Every line is relevant, though the Returns section partly restates the output schema, making it slightly less lean than it could be.

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?

For a simple two-param read tool, the description covers purpose, usage, both params, and return shape. An output schema already exists, so the added Returns note is bonus rather than necessity, and the definition is essentially complete.

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 description coverage is 0%, so the description must compensate, and it does: `query` is "free-form text describing what you're looking for" and `n_results` is "maximum number of memory blocks to return (default 5)." Both parameters gain meaning not present in the bare schema, though no bounds or edge cases on n_results are given.

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 ("Relevance-ranked memory retrieval") and immediately clarifies the scope: returns blocks most relevant to `query` rather than the head of memory.md. This directly distinguishes it from the read_memory sibling without requiring the schema to be opened.

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?

"Use this to pull targeted prior decisions/conventions/notes for the current task without loading the whole memory file" gives a clear when-to-use and an implicit contrast with whole-file reading. It doesn't name read_memory explicitly or state when-not to use, so it falls short of a full 5.

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