Skip to main content
Glama

query_memory

Retrieve relevant observations from past sessions with a progressive three-layer search: fast filtering, expansion of high-confidence hits, and chronological context.

Instructions

Adaptive auto-expanding retriever for memory. REPLACES search_memory.

AUTOMATIC TRIGGERS - Call this when:

  • You need to search for observations from past sessions

  • You want to retrieve context about a specific topic from memory

This tool automatically performs a 3-layer progressive retrieval in a single step. It runs a fast search, expands high-confidence hits into full observations, and provides chronological context for the periphery.

PARAMETERS:

  • query: Search query

  • limit: Max results to fetch internally (default: 20)

  • filters: Optional filters like {"tool_name": "web_search", "session_id": "..."}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
queryYes
filtersNo
Behavior4/5

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

There are no annotations, so the description carries the behavioral burden. It discloses meaningful behavior: automatic 3-layer progressive retrieval, fast search, expansion of high-confidence hits, and chronological context for the periphery. It does not explicitly state the absence of side effects or describe the exact output shape, but it is far from opaque.

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?

The description is well-structured with trigger bullets, a short algorithm explanation, and a parameter list. It is readable and front-loads the key replacement fact. Some minor redundancy exists between the opening phrase and the later algorithm description.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the absence of an output schema, the description leaves the return format only vaguely implied ('expands...', 'provides chronological context'). It also does not help the agent choose among several closely related memory/retrieval siblings beyond search_memory. Triggers and parameters are covered, making it adequate but not 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. It does: 'limit' is clarified as an internal fetch limit, and 'filters' comes with a concrete example. 'query' is only restated as 'Search query', so not every parameter gets equally substantive semantics.

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 clearly labels the tool as an auto-expanding retriever for memory and states its function: searching observations from past sessions and retrieving context on a topic. It also distinguishes itself from a sibling by explicitly declaring it 'REPLACES search_memory'.

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?

It provides explicit automatic trigger conditions ('Call this when...') for the two main use cases. It also alerts the agent that this tool replaces search_memory, which gives clear selection guidance for that sibling, though it does not contrast with other related memory/retrieval tools.

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/Vedant9500/OpenLMlib'

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