Skip to main content
Glama

semantic_search

Search across episodic, semantic, and procedural memory layers using vector similarity and keyword fusion to retrieve relevant results ranked by fused score.

Instructions

Search across memory layers using vector similarity + keyword RRF fusion.

Retrieval pipeline (M5.8):
1. Embed the query.
2. Run vector similarity search on each requested layer.
3. Run keyword LIKE search on each layer.
4. Fuse results using Reciprocal Rank Fusion (RRF, k=60).
5. Return top_k deduplicated results ranked by fused score.

Args:
    query: Natural language search query.
    layers: Comma-separated layers to search: 'episodic', 'semantic', 'procedural'.
    top_k: Number of results to return (default 5).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes
layersNoepisodic,semantic,procedural
top_kNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

With no annotations, the description fully bears the responsibility of disclosing behavior. It details the entire retrieval pipeline in 5 steps, including embedding, vector search, keyword LIKE search, RRF fusion, and deduplication. This provides deep behavioral transparency beyond a simple 'search' statement.

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?

The description is well-structured with a summary sentence, numbered pipeline steps, and an Args list. It is concise yet thorough, with no irrelevant information.

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 the presence of an output schema, the description does not need to detail return values. It covers input parameters and the processing pipeline adequately. Minor omission: no mention of whether output is deduplicated or scored, but the pipeline steps imply it.

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?

Despite 0% schema description coverage, the Args section adds substantial meaning: 'query' is a natural language search query, 'layers' lists valid comma-separated values (episodic, semantic, procedural), and 'top_k' specifies default 5. This compensates for the lack of schema descriptions.

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 opening line 'Search across memory layers using vector similarity + keyword RRF fusion' clearly specifies the action (search), resource (memory layers), and method. This sufficiently distinguishes it from similar sibling tools like 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 Guidelines3/5

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

The description provides context about the fusion retrieval pipeline but does not explicitly state when to use this tool versus alternatives. There is no exclusionary guidance or mention of when not to use it.

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/SVerITG/Metis'

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