Skip to main content
Glama

Search memory by meaning (where enabled)

search_memory
Read-onlyIdempotent

Searches notes by meaning when memory_status reports semantic: true; else it returns no hits and says why (semantic-unavailable or semantic-rebuilding), so use search_text or get_context. rankedBy "session_date" (the default) is newest first, so hits[0] is the latest, not necessarily the best; "score" is best match first. Judge hits by score (higher is closer), not position. A conversation's hits on one date are one hit, opening with its date (its header alone is no hit); a time phrase in it is resolved below, counted from that session. A hit without session_date comes last; a fact's hit has no notePath. There is no evidence object when this deployment has no evidence model configured and the pass is not switched off: no second pass runs, and the hits are the whole result. When there is one, its items come first, outside rankedBy, with reason "evidence", and its state is "ok", "off", "not-applied" or "failed". Facts saved with remember are added outside rankedBy, within top_k; a writerConflict line on one means it replaced another agent's value. index.stale: the semantic index lags saved facts. A "replaced" hit's correction is listed before it (by: its id, source: who saved it). A relevance object says whether anything on file closely matches the query: relevant is true only when the closest match is among the hits, and when it is false the hits are only the nearest ones, so do not present them as an answer unless one clearly answers it. When relevant is true and the closest match is a remembered fact that top_k left no room to list, relevance.fact names it (subject, predicate, object, scope); you can answer from it, and the hits are still at most top_k in all.

Input Schema

NameRequiredDescriptionDefault
queryYesNatural language query
scopeNoMemory scope: "global" (default) or scope:<slug> / project:<slug>
top_kNoMax matches (default 50), not counting the short statements the session expansion adds to them
include_historyNoAlso return superseded (corrected) memory events, labelled as historical. Default false: only current memory.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / top_k / description
      Previous value: -"Max matches (default 20), not counting the short statements the session expansion adds to them"New value: +"Max matches (default 50), not counting the short statements the session expansion adds to them"
  2. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already establish readOnlyHint, idempotentHint, and destructiveHint=false, but the description adds substantial behavioral context beyond them: fallback behavior, ranking semantics, session-date ordering versus score ordering, evidence-pass conditions, writerConflict handling, index.stale, replaced-hit ordering, and relevance interpretation. This is unusually rich disclosure and does not contradict the read-only annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with its purpose and fallback condition, but it then becomes a dense single paragraph covering many output and edge-case details. Most of the content is useful because there is no output schema, but the lack of structure and the long semicolon-chained clauses make it harder to scan than it should be.

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 that the tool has no output schema and several non-obvious result behaviors, the description is complete enough to interpret hits, evidence objects, relevance objects, replaced facts, and stale indexes. It covers the operational conditions and output caveats an agent would otherwise have no way to know.

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 description coverage is 100%, so the schema already documents query, scope, top_k, and include_history. The description adds some interpretation, especially around top_k not counting short statements added by session expansion, but it also references rankedBy "session_date" even though rankedBy is not an input parameter in the schema, which slightly muddies parameter semantics rather than clarifying them.

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 states a specific verb and resource: it searches notes by meaning, and explicitly distinguishes this from sibling fallbacks search_text and get_context when semantic search is unavailable. An agent can tell what this tool does and what it does not do without opening the schema.

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?

It gives an explicit precondition, memory_status reports semantic: true, and explicitly routes the agent elsewhere when that condition fails: use search_text or get_context. The unavailable states semantic-unavailable and semantic-rebuilding are named, so there is little inference required.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.