Skip to main content
Glama

memory_read

Read-onlyIdempotent

Search long-term memory for user preferences, past decisions, project setup, people, or earlier context. The memory persists across sessions and across every AI tool the user has connected. It applies when an answer may depend on something from an earlier session or another tool; it is not needed for general world knowledge. Returns matches ranked by relevance (or newest-first with order_by: 'recency'); each result carries an id; after the answer, memory_feedback takes these ids to record which memories helped. A correction is a fresh memory_write. Without supersedes it is stored alongside the earlier memory, which stays as it was, unless it is too close to an existing memory, in which case the write is refused; with supersedes, the earlier memory is marked replaced, is hidden from reads when the account hides replaced memories, and include_history returns it. No MCP deletion tool is exposed; a user can permanently delete an individual personal memory through the REST API or with help from support.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "query": "<query>"
    },
    "name": "memory_read"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryYesNatural-language description of what you're looking for, e.g. 'database choice for the API' or 'user's preferred testing framework'.
sinceNoOnly memories created at/after this ISO-8601 instant (naive = UTC) — e.g. your last-seen watermark in a shared room.
top_kNoRequested number of results (default: 5, what this connector asks for when you omit it; the engine's own default of 10 never applies, because the field is always sent). ⚠️ Not a hard cap: association expansion can return MORE than this, and the relevance floor can return fewer — raising it does not reliably widen the result set. For a complete, exactly-bounded listing use memory_list_recent instead.
untilNoOnly memories created at/before this ISO-8601 instant.
domainNoRestrict the search to one domain namespace (e.g. 'project:acme'). Omitting it searches your OWN domains — it does NOT include shared rooms, which are separate stores: to search a room, pass its address here (e.g. 'xroom:room_01ABC'). Find room addresses with memory_list_rooms, or in `rooms_not_searched`, which an answer without `domain` carries when you have rooms.
order_byNo'relevance' (default) = ranking order. 'recency' = the matched set re-sorted newest-first. For a complete newest-first feed with no search at all, use memory_list_recent instead.
diversityNo0 (default) returns the matches as ranked. Above 0, a match that is a near-copy of one already picked gives its slot to the next distinct memory (maximal marginal relevance); 1 lets similarity alone decide after the first pick. It changes which memories come back, not their scores, and applies only when there are more matches than top_k and top_k is below 200.
exclude_authorNoDrop memories written by this author PRINCIPAL — the server-side identity. ⚠️ NOT USABLE FROM HERE YET: the principal is not shown in these results, so there is no value you can obtain through this tool, and a guess like 'me' silently matches nothing and filters nothing. Only pass it if your system knows the exact principal from elsewhere (e.g. the REST API).
include_historyNoAlso return memories that were replaced by a later write; each one is marked with the id that replaced it. History is returned in the domain where the replaced memory is stored. This makes replaced memories eligible to appear under normal ranking and top_k; it is not a promise of the complete history.

Output Schema

NameRequiredDescriptionDefault
itemsYesMatching memories, ordered per order_by.
rooms_not_searchedNoPresent only on a call WITHOUT `domain`, when you have shared rooms or they could not be checked: rooms are separate stores that call did not search.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / include_history
      Added value: +{
      +  "description": "Also return memories that were replaced by a later write; each one is marked with the id that replaced it. History is returned in the domain where the replaced memory is stored. This makes replaced memories eligible to appear under normal ranking and top_k; it is not a promise of the complete history.",
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / items / items / properties / superseded_by
      Added value: +{
      +  "description": "Id of the memory that replaced this one. Present only on a replaced memory, which a read returns when include_history is true or when the account does not hide replaced memories.",
      +  "type": "string"
      +}
  2. Changed2 schema fields changed
    • changedInput schema / properties / domain / description
      Previous value: -"Restrict the search to one domain namespace (e.g. 'project:acme'). Omitting it searches your OWN domains — it does NOT include shared rooms, which are separate stores: to search a room, pass its address here (e.g. 'xroom:room_01ABC'). Find room addresses with memory_list_rooms."New value: +"Restrict the search to one domain namespace (e.g. 'project:acme'). Omitting it searches your OWN domains — it does NOT include shared rooms, which are separate stores: to search a room, pass its address here (e.g. 'xroom:room_01ABC'). Find room addresses with memory_list_rooms, or in `rooms_not_searched`, which an answer without `domain` carries when you have rooms."
    • addedOutput schema / properties / rooms_not_searched
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "Present only on a call WITHOUT `domain`, when you have shared rooms or they could not be checked: rooms are separate stores that call did not search.",
      +  "properties": {
      +    "note": {
      +      "description": "The same disclosure the text ends with.",
      +      "type": "string"
      +    },
      +    "rooms": {
      +      "description": "The live rooms this call did not search; present only when state is 'live'. A row missing room_id, address or role is omitted here and still named in `note`.",
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "address": {
      +            "description": "Domain address (xroom:<id>); pass as `domain` on read/write.",
      +            "type": "string"
      +          },
      +          "archived": {
      +            "description": "True if archived (owned rooms only).",
      +            "type": "boolean"
      +          },
      +          "name": {
      +            "description": "The room name.",
      +            "type": "string"
      +          },
      +          "role": {
      +            "description": "'owner' or 'member'.",
      +            "type": "string"
      +          },
      +          "room_id": {
      +            "description": "The room's id (room_...).",
      +            "type": "string"
      +          },
      +          "scope": {
      +            "description": "'read' or 'read_write'.",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "room_id",
      +          "address",
      +          "role",
      +          "archived"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "state": {
      +      "description": "'live': the rooms listed can be read by passing an address as `domain`. 'archived-only': every room you have is archived and refuses reads. 'unknown': the room list could not be checked, so whether any room went unsearched is not known.",
      +      "enum": [
      +        "live",
      +        "archived-only",
      +        "unknown"
      +      ],
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "state",
      +    "note"
      +  ],
      +  "type": "object"
      +}
  3. Changed2 schema fields changed
    • removedInput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
    • removedOutput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
  4. Changed1 schema field changed
    • addedInput schema / properties / diversity
      Added value: +{
      +  "description": "0 (default) returns the matches as ranked. Above 0, a match that is a near-copy of one already picked gives its slot to the next distinct memory (maximal marginal relevance); 1 lets similarity alone decide after the first pick. It changes which memories come back, not their scores, and applies only when there are more matches than top_k and top_k is below 200.",
      +  "maximum": 1,
      +  "minimum": 0,
      +  "type": "number"
      +}
  5. Changed1 schema field changed
    • changedInput schema / properties / exclude_author / description
      Previous value: -"Drop memories written by this author PRINCIPAL — the server-side identity. ⚠️ NOT USABLE FROM HERE YET: the principal is not shown in these results, so there is no value you can obtain through this tool, and a guess like 'me' silently matches nothing and filters nothing. Only pass it if your system knows the exact principal from elsewhere (e.g. the REST API). A self-exclusion shortcut is planned."New value: +"Drop memories written by this author PRINCIPAL — the server-side identity. ⚠️ NOT USABLE FROM HERE YET: the principal is not shown in these results, so there is no value you can obtain through this tool, and a guess like 'me' silently matches nothing and filters nothing. Only pass it if your system knows the exact principal from elsewhere (e.g. the REST API)."
  6. Changed11 schema fields changed
    • removedInput schema / additionalProperties
      Removed value: -false
    • changedInput schema / properties / domain / description
      Previous value: -"Restrict recall to a single namespace, e.g. 'project:x' (default: all)."New value: +"Restrict the search to one domain namespace (e.g. 'project:acme'). Omitting it searches your OWN domains — it does NOT include shared rooms, which are separate stores: to search a room, pass its address here (e.g. 'xroom:room_01ABC'). Find room addresses with memory_list_rooms."
    • removedInput schema / properties / domain / maxLength
      Removed value: -100
    • changedInput schema / properties / exclude_author / description
      Previous value: -"Drop memories written by this author PRINCIPAL (the server-side identity, not shown in these results). Useful when your system knows principals; a self-exclusion shortcut is planned server-side."New value: +"Drop memories written by this author PRINCIPAL — the server-side identity. ⚠️ NOT USABLE FROM HERE YET: the principal is not shown in these results, so there is no value you can obtain through this tool, and a guess like 'me' silently matches nothing and filters nothing. Only pass it if your system knows the exact principal from elsewhere (e.g. the REST API). A self-exclusion shortcut is planned."
    • changedInput schema / properties / order_by / description
      Previous value: -"'relevance' (default) keeps ranking order; 'recency' re-sorts the matched set newest-first. For a complete newest-first listing without a search, use memory_list_recent."New value: +"'relevance' (default) = ranking order. 'recency' = the matched set re-sorted newest-first. For a complete newest-first feed with no search at all, use memory_list_recent instead."
    • changedInput schema / properties / query / description
      Previous value: -"Natural-language query for saved memories. Do not include passwords, API keys, payment data, MFA codes, government IDs, or health records."New value: +"Natural-language description of what you're looking for, e.g. 'database choice for the API' or 'user's preferred testing framework'."
    • changedInput schema / properties / since / description
      Previous value: -"Only memories created at/after this ISO-8601 instant (naive = UTC) — e.g. a last-seen watermark in a shared room."New value: +"Only memories created at/after this ISO-8601 instant (naive = UTC) — e.g. your last-seen watermark in a shared room."
    • changedInput schema / properties / top_k / description
      Previous value: -"Maximum number of memories to return (1-50, default 5)."New value: +"Requested number of results (default: 5, what this connector asks for when you omit it; the engine's own default of 10 never applies, because the field is always sent). ⚠️ Not a hard cap: association expansion can return MORE than this, and the relevance floor can return fewer — raising it does not reliably widen the result set. For a complete, exactly-bounded listing use memory_list_recent instead."
    • changedInput schema / properties / top_k / maximum
      Previous value: -50New value: +500
    • removedOutput schema / properties / items / items / properties / memory_id / format
      Removed value: -"uuid"
    • removedOutput schema / properties / items / items / properties / memory_id / pattern
      Removed value: -"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
  7. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, and the description adds genuinely new context: memory persists across sessions and across every connected AI tool, results are relevance-ranked with ids, and replaced memories are hidden or surfaced via include_history. It also discloses the absence of an MCP deletion path and the supersedes refusal behavior, though that last part concerns writes rather than this read tool.

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?

Purpose and scope are front-loaded, and the sentences are dense with usable facts. It runs long, though, and the trailing material about supersedes, write refusal, and REST-API deletion describes other tools' behavior rather than this call, diluting focus.

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?

For a 9-parameter search tool with an output schema and full annotation coverage, an agent gets everything needed to call it correctly: scope, ranking options, domain/room semantics, and how results feed downstream tools. Return-value detail is properly left to the output schema.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3; the description still earns a bump by explaining cross-tool meaning the schema cannot — that returned ids feed memory_feedback, and that include_history relates to the supersedes replacement lifecycle. The remaining parameters (top_k, diversity, exclude_author) are already documented in more useful detail by the schema itself.

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?

Opens with a specific verb+resource ("Search long-term memory") and enumerates the content classes it covers (preferences, past decisions, project setup, people, earlier context). It is clearly separable from the named siblings memory_list_recent (bounded listing), memory_write (corrections), and memory_feedback (post-answer id reporting).

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?

Gives explicit when-to-use ("when an answer may depend on something from an earlier session or another tool") and when-not ("not needed for general world knowledge"). It also routes to alternatives by name: memory_list_recent for complete bounded listings, memory_list_rooms for room addresses, memory_write/supersedes for corrections, and memory_feedback for recording usefulness.

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.