Skip to main content
Glama

retrieve_memory

Search stored memories to find similar workflows and failure patterns for a new task. Use natural language queries to retrieve relevant past work.

Instructions

Semantic search over stored memories to find similar workflows and patterns.

Use this to discover relevant past work when facing a new task. Returns both similar workflows and common failure patterns that match the query.

Side effects: Reads from the semantic memory store built by build_memory. Use build_memory first to ensure the index is up-to-date.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of events to scan for similarity (default 5000).
queryYesSearch query string describing the problem or goal. Use natural language; the semantic retriever handles embedding.
top_kNoNumber of top results to return (default 5, max 50).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

With no annotations, description takes full burden. States side effect: 'Reads from the semantic memory store built by build_memory,' clarifying it's a read-only operation and identifying dependency. No mention of auth or rate limits, but the simple read nature reduces concern.

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?

Four sentences with no redundant text. Main purpose announced first, followed by usage guidance, side effects, and prerequisite. Every sentence adds value.

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 presence of output schema and simple search tool behavior, description adequately covers purpose, usage, and side effects. Does not detail return format but output schema handles that. Lacks mention of pagination or timeouts, but not critical for this 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 has 100% coverage, so baseline is 3. Description adds context that query uses natural language and embedding is handled, providing some value beyond schema. However, it does not add critical new information for each parameter.

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?

Clearly states 'Semantic search over stored memories' with specific verb and resource. Differentiates from sibling tools by focusing on semantic retrieval of similar workflows and patterns, which is distinct from creating tasks or listing events.

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?

Provides clear usage context: 'Use this to discover relevant past work when facing a new task.' Also gives a prerequisite: 'Use build_memory first to ensure the index is up-to-date.' Does not explicitly state when not to use or name alternatives, but the context is sufficient.

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/Mustafa-Ali-Ertugrul/allbrain-mcp'

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