Skip to main content
Glama

semantic_search

Search stored memories using natural language queries. Retrieves results by meaning via embeddings, and reinforces returned memories by marking them as seen.

Instructions

Meaning-based search via the backend's /memory/query (embeddings + salience + recency + links). Good for questions phrased in your own words. Only meaningful when health_check shows a real embedding provider (openai, gemini, ollama); with 'synthetic' results are random. The backend marks every returned memory as seen and raises its salience slightly, so it also acts as reinforcement.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kNo
queryYes
sectorNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A3.7/5.0
Behavior4/5

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

With no annotations, the description carries the full burden, and it delivers two non-obvious behavioral facts: the tool mutates state ('marks every returned memory as seen and raises its salience slightly, so it also acts as reinforcement') and degrades to random results without a real embedding provider. Auth needs, rate limits, and result ordering are still unstated.

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?

Three dense sentences, with the purpose and the provider caveat front-loaded; every sentence adds information. The parenthetical mechanism list is slightly cluttered but not wasteful.

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?

An output schema exists, so return values need no explanation, and the description covers purpose, suitability, a prerequisite, and side effects. The remaining gap is the un-explained k and sector parameters, which leaves an agent guessing at result count and scoping.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% for three parameters (query, k, sector), yet the description explains none of them — k's default count and sector's filtering role are entirely undocumented. 'Questions phrased in your own words' loosely gestures at query, but the description fails to compensate for the coverage gap.

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 states a specific verb+resource ('Meaning-based search') plus the mechanism (embeddings + salience + recency + links) and the query style it suits ('questions phrased in your own words'). This implicitly contrasts with the lexical sibling search_memories, but it never names the sibling, so an agent must still infer the routing.

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 gives a clear condition for use ('Good for questions phrased in your own words') and a strong prerequisite gate via health_check ('Only meaningful when health_check shows a real embedding provider ... with synthetic results are random'). It does not, however, explicitly say to use search_memories instead for keyword/exact queries.

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