Skip to main content
Glama

search_memory

Retrieve relevant memories by comparing the semantic similarity of a natural language query to stored content, using cosine similarity.

Instructions

Search long-term memory using semantic similarity. The query is embedded locally and compared against all stored memories using cosine similarity.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of results to return (default: 5)
queryYesNatural language search query describing what you're looking for
thresholdNoMinimum similarity score threshold, 0-1 (default: 0.3)
Behavior3/5

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

With no annotations, the description carries the full load. It reveals that queries are embedded locally and compared via cosine similarity, giving algorithmic insight. However, it does not disclose how results are ordered, performance implications, or any side effects (expected to be read-only).

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?

Two concise sentences, front-loaded with purpose and key detail. Every sentence adds value without redundancy.

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?

Given 3 parameters, no output schema, and no annotations, the description adequately explains the search method. Missing details like result ordering (by similarity) are minor. Overall complete for its simplicity.

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 baseline is 3. The description adds context about the query being natural language and threshold as minimum similarity, but this largely mirrors the schema. No additional semantics beyond the schema's descriptions.

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 clearly states the action is to search long-term memory using semantic similarity, which distinguishes it from sibling tools that search by tags, type, or date range. However, it does not explicitly differentiate from tools like 'get_all_memories' or 'memory_stats', leaving some ambiguity.

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?

The description implies use when semantic similarity search is needed, but provides no explicit guidance on when not to use this tool or alternatives. Sibling tools cover other search methods, but no exclusions or comparisons are mentioned.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/MarcelRoozekrans/LongtermMemory-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server