Skip to main content
Glama

memory_hybrid_search

Merge keyword and vector search results with reciprocal rank fusion, retrieving more accurate memories than either method alone. Narrow results using tags, dates, filters, and adjustable semantic weight.

Instructions

Perform a hybrid search combining keyword (FTS) and semantic (vector) search.

Uses Reciprocal Rank Fusion (RRF) to merge results from both search methods, providing better results than either method alone.

Returns compact previews by default. Use content_mode="full" for complete content. Use memory_get to fetch full content for specific IDs.

Args: query: Search query text semantic_weight: Weight for semantic results (0-1). Higher values favor semantic similarity. Keyword weight = 1 - semantic_weight. Default: 0.6 (60% semantic, 40% keyword) top_k: Maximum number of results (legacy name; default 10 if neither limit nor top_k) limit: Alias for top_k — preferred name; honored so callers matching memory_list work min_score: Minimum combined score threshold (default: 0.0) metadata_filters: Optional metadata filters date_from: Optional date filter (ISO format or relative like "7d", "1m", "1y") date_to: Optional date filter (ISO format or relative) tags_any: Match memories with ANY of these tags (OR logic) tags_all: Match memories with ALL of these tags (AND logic) tags_none: Exclude memories with ANY of these tags (NOT logic) content_mode: "preview" (default) returns truncated content_preview; "full" returns complete content preview_chars: Max chars for preview (default: 300, ignored when content_mode="full") fields: Optional list of fields to return. Include "score" to keep {memory, score} envelope; omit "score" for flat list of memory dicts. follow: Lineage mode. Default active (excludes superseded memories). latest / full_history as documented on memory_list; all is the explicit unfiltered forensic escape hatch. Omitting follow is NOT unfiltered — it means the safe default.

Returns: Dictionary with count and list of results, each containing score and memory

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
queryYes
top_kNo
fieldsNo
followNo
date_toNo
tags_allNo
tags_anyNo
date_fromNo
min_scoreNo
tags_noneNo
content_modeNopreview
preview_charsNo
semantic_weightNo
metadata_filtersNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Install Server

TDQS

A4.7/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It does an outstanding job: explains the RRF algorithm, default content mode, preview behavior, the follow parameter's lineage logic, and the fields parameter's effect on output envelope. Minor deduction for not explicitly stating whether the operation is read-only (though clearly implied).

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 clear sections for behavior details, Args, and Returns. It front-loads the core purpose and algorithm. Some minor verbosity in the 'follow' description with inline references to other tools, but this is justified for clarity given the tool's complexity.

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

Completeness5/5

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

Given the tool's high complexity (15 params, nested objects, hybrid algorithm), the description is remarkably complete. It addresses search behavior, return formats, filtering options, and alternate tools. The output schema exists, so return value explanation is sufficient.

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 description coverage is 0%, so the description must fully compensate for all 15 parameters. It does: every parameter gets a clear explanation, including defaults, relationships (semantic_weight vs 1 - semantic_weight), aliases (limit vs top_k), and behavioral nuances (follow default is not unfiltered). Goes far beyond what the schema provides.

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 states the verb 'Perform a hybrid search' and specifies the resources involved (keyword FTS and semantic vector search). It distinguishes itself from sibling tools by explaining the hybrid nature and RRF merging, making it clear what unique value this tool provides.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides excellent usage guidance, explaining when to use this tool (when better results are needed than either method alone) and when to use alternatives (memory_get for full content retrieval). It also clarifies parameter relationships, like the semantic_weight vs keyword weight balance.

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

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/agentic-box/memora'

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