Skip to main content
Glama

search_memory

Read-onlyIdempotent

Find stored memories that answer a question.

Use this when the user asks about something that may already be recorded, or
refers back to an earlier conversation, decision, or document. Do not use it
to follow connections out from the memories it returns; use
`query_memory_graph` for that.

Read-only. Scope is decided by the server from the signed-in account and
reported in `searched_scope`.

Args:
    query: One self-contained sentence. Resolving referents from the
        conversation and keeping exact identifiers intact both help it rank.
    top_k: Max hits (1-50, clamped).
    mode: `"hybrid"` (default) or `"events"` — both return event hits.
        `"entities"` is no longer supported and returns an error; to look
        an entity up by name call `find_memories_by_entity`.
    principal: Restrict to content attributed to one user or team — a handle
        (email or team name) or a principal id, not a name to match. More
        than one match returns `principal_candidates` to re-call with.
    offset: How many top-ranked results to skip, for reading further down
        the same ranking. Defaults to 0, and is clamped to 200. A response
        that has more behind it names the continuing offset in
        `continuation`.

Returns:
    `{query, mode, hits, total, hint, searched_scope}`. `hint` is a
    connection map over all results (threads, entities, categories,
    clusters, available_channels). Event hits may carry
    `connections.sequential {prev, next}`.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNo`"hybrid"` (default) or `"events"` — both return event hits. `"entities"` is no longer supported and returns an error; to look an entity up by name call `find_memories_by_entity`.hybrid
queryYesOne self-contained sentence. Resolving referents from the conversation and keeping exact identifiers intact both help it rank.
top_kNoMax hits (1-50, clamped).
offsetNoHow many top-ranked results to skip, for reading further down the same ranking. Defaults to 0, and is clamped to 200. A response that has more behind it names the continuing offset in `continuation`.
principalNoRestrict to content attributed to one user or team — a handle (email or team name) or a principal id, not a name to match. More than one match returns `principal_candidates` to re-call with.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.