Skip to main content
Glama

memory_read

Read-onlyIdempotent

Search long-term memory for user preferences, past decisions, project setup, people, or earlier session context. Returns relevance-ranked matches with IDs for feedback.

Instructions

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 (Claude, ChatGPT, Cursor, VS Code). 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 wrong or stale memory is corrected by writing a fresh one with memory_write, not by deleting it.

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 server 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).

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 changedv0.16.0
    • 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"
      +}
  2. Changed2 schema fields changedv0.15.3
    • removedInput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
    • removedOutput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
  3. Changed1 schema field changedv0.15.0
    • 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"
      +}
  4. Changed1 schema field changedv0.14.2
    • 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)."
  5. Changed3 schema fields changedv0.11.0
    • changedInput schema / properties / top_k / description
      Previous value: -"Requested number of results (default: 5). ⚠️ 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."New value: +"Requested number of results (default: 5, what this server 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
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "items": {
      +      "description": "Matching memories, ordered per order_by.",
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "author": {
      +            "description": "Sanitized AGENT identity of the writer (never the human principal) — attribution in shared rooms.",
      +            "type": "string"
      +          },
      +          "content": {
      +            "description": "Stored memory content.",
      +            "type": "string"
      +          },
      +          "created_at": {
      +            "description": "UTC creation instant, ISO-8601; absent on legacy memories without a timestamp.",
      +            "type": "string"
      +          },
      +          "domain": {
      +            "description": "User-defined memory namespace or domain.",
      +            "type": "string"
      +          },
      +          "memory_id": {
      +            "description": "Identifier needed to rate or manage this saved memory.",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "memory_id",
      +          "content",
      +          "domain"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "required": [
      +    "items"
      +  ],
      +  "type": "object"
      +}
  6. Changed3 schema fields changedv0.8.1
    • changedInput schema / properties / domain / description
      Previous value: -"Restrict the search to one domain namespace (e.g. 'project:acme'); omit to search across all domains."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."
    • 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 (e.g. via the REST API); 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 / top_k / description
      Previous value: -"Max results to return (default: 5)"New value: +"Requested number of results (default: 5). ⚠️ 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."
  7. Changed4 schema fields changedv0.7.0
    • addedInput schema / properties / exclude_author
      Added value: +{
      +  "description": "Drop memories written by this author PRINCIPAL (the server-side identity, not shown in these results). Useful when your system knows principals (e.g. via the REST API); a self-exclusion shortcut is planned server-side.",
      +  "maxLength": 200,
      +  "type": "string"
      +}
    • addedInput schema / properties / order_by
      Added value: +{
      +  "description": "'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.",
      +  "enum": [
      +    "relevance",
      +    "recency"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / since
      Added value: +{
      +  "description": "Only memories created at/after this ISO-8601 instant (naive = UTC) — e.g. your last-seen watermark in a shared room.",
      +  "maxLength": 40,
      +  "type": "string"
      +}
    • addedInput schema / properties / until
      Added value: +{
      +  "description": "Only memories created at/before this ISO-8601 instant.",
      +  "maxLength": 40,
      +  "type": "string"
      +}
  8. First observedv0.3.7

TDQS

A4.5/5.0
Behavior5/5

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

Beyond readOnly/idempotent/non-destructive annotations, it discloses that memory persists across sessions and across other AI tools, that results are ranked with an alternative newest-first ordering, that each result carries an id consumed by memory_feedback, and that stale entries are superseded by writing rather than deleting. That is genuine behavioral context an agent cannot get from the annotations.

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?

Front-loaded with purpose and trigger, then workflow semantics; every sentence carries information. It is on the long side for a search tool, and the cross-tool enumeration (Claude, ChatGPT, Cursor, VS Code) is decorative rather than decision-relevant.

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?

Output schema exists, so return-shape explanation is unnecessary and the description correctly spends its words on when to call, the feedback loop, and correction semantics. The one behavior it omits is that a query without `domain` silently excludes shared rooms, which is a real usage trap, though the schema does cover it.

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 coverage is 100% and the schema already documents query, domain, top_k caveats, since/until, diversity and exclude_author, so the baseline applies. The description only restates that order_by: 'recency' produces newest-first ordering, which the schema says too; it adds no parameter meaning the schema lacks.

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?

States a specific verb (search) and resource (long-term memory) plus the content classes it covers (preferences, decisions, project setup, people, earlier context). It explicitly distinguishes itself from siblings, naming memory_list_recent for exhaustive listing and memory_write/memory_feedback for the other memory operations.

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 an explicit trigger ('applies when an answer may depend on something from an earlier session or another tool') and an explicit exclusion ('not needed for general world knowledge'). It also routes to alternatives for adjacent jobs: memory_feedback to record usefulness, memory_write to correct a stale memory, memory_list_recent for a complete bound.

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