Skip to main content
Glama

search_memory

Search memories by relevance using full-text search with stemming and substring fallback; filter by category, importance, or expiry and get snippets per result.

Instructions

Search memories by relevance: full-text search with stemming (topic and tag matches rank highest), falling back to substring matching. Returns a snippet per memory; use get_memory for the full text. Expired memories are excluded by default.

Args: query: Search query — plain words, hyphenated names, IDs, or FTS5 syntax (e.g. "tags:aws", "datadog OR sentry") category: Filter by category (optional) importance: Filter by minimum importance: low, normal, high, critical (optional) limit: Maximum number of results (default: 10, max: 100) include_expired: Set to true to include expired memories (default: false) full_content: Set to true to return full content instead of snippets (default: false)

Input Schema

NameRequiredDescriptionDefault
limitNo
queryYes
categoryNo
importanceNo
full_contentNo
include_expiredNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations at all, the description carries the full burden and does well: it discloses the ranking model (topic and tag matches rank highest), the substring fallback path, the default exclusion of expired memories, and that snippets rather than full text are returned. Missing are read-only framing, pagination/result-cap behavior beyond 'limit max: 100', and whether results are ordered deterministically.

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 the mechanism and the sibling hand-off before the parameter block, and every line of the Args block corresponds to a real parameter. Slightly long, but nothing is padding; the structured Args list is easier to scan than prose would 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?

A six-parameter tool with an output schema, so return-value documentation is correctly omitted; the description still covers defaults, exclusion behavior, and fallback semantics. What's left unsaid is minor: ordering guarantees and whether the result cap interacts with the snippet size.

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

Parameters5/5

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

Schema coverage is 0% (only titles and defaults), so the description must compensate and it does for all six parameters: query accepts plain words, hyphenated names, IDs, or FTS5 syntax with a concrete example ('tags:aws', 'datadog OR sentry'); importance takes low/normal/high/critical; limit default 10 max 100; include_expired and full_content defaults stated. This adds real meaning the schema does not carry.

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 plus the retrieval mechanism: 'Search memories by relevance: full-text search with stemming ... falling back to substring matching.' It also explicitly distinguishes itself from get_memory ('use get_memory for the full text') and implicitly from list_memories by being relevance-ranked search.

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?

Gives an explicit alternative for the full-text case ('use get_memory for the full text') and states the default exclusion of expired memories with an override flag. It does not cover other plausible alternatives such as find_by_entity or list_memories/navigation, so the routing picture is clear but not exhaustive.

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