Skip to main content
Glama

memory_write

Stores durable long-term memories across sessions and connected AI tools, preserving preferences, decisions, and facts for future recall. Use it for lasting context, not transient chatter or sensitive credentials.

Instructions

Store a long-term memory that persists across sessions and across every AI tool the user has connected to Mnemoverse. Suited to durable information: a stated preference, a decision, a fact about people, roles or project setup, a lesson learned; transient chatter that only matters this turn does not belong here. Never store passwords, API keys, payment data, MFA codes, government IDs, or health records. Behavior: outside shared rooms, a novelty gate refuses a write the embedder cannot tell apart from a memory already stored in the same domain, so the result tells you whether the memory was stored or refused. Write content as a self-contained statement that still makes sense when recalled out of context. To correct a memory you have checked is outdated, pass its memory_id in supersedes.

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": {
      "content": "<content>"
    },
    "name": "memory_write"
  }
}

Input Schema

NameRequiredDescriptionDefault
domainNoNamespace to organize memories (e.g. 'engineering', 'user:alice', 'project:acme'). Matched byte-for-byte — a leading space, a different case, or an invisible character opens a SEPARATE, permanent store, so reuse an exact name from memory_stats rather than retyping one. To write into a shared room, pass its address here instead (e.g. 'xroom:room_01ABC'). Find room addresses with memory_list_rooms.
contentYesThe memory to store as a self-contained statement, e.g. 'User prefers TypeScript strict mode' or 'Decided to deploy the API on Cloudflare Workers (2026-06)'.
conceptsNoKey concepts for linking related memories (e.g. ['deploy', 'friday', 'staging'])
supersedesNoPass the memory_id values of memories this write corrects or replaces. Use only for memories you have checked are outdated or wrong; the replaced memories stay recoverable with include_history. Not supported in shared rooms (xroom: domains). 1 to 32 distinct ids.

Output Schema

NameRequiredDescriptionDefault
reasonNoThe memory service's own explanation of this outcome, quoted as sent — when stored is false this is the ONLY statement of WHY, e.g. "Below importance threshold (0.047 < 0.1)". Ordinary text is preserved exactly; only control, bidi, zero-width, and repeated-whitespace characters are normalized before display, and the value is capped at 400 characters. Absent when the service sent no explanation, or when nothing remains after that normalization.
storedYesWhether the memory passed the novelty gate and was stored.
memory_idYesIdentifier of the stored memory, or null when it was not stored.
importanceNoNovelty score for this write (0-1): how much it adds over the nearest memories already saved in the same domain. Outside shared rooms, a write that scores below the service's importance threshold is not stored, and `reason` says why when the service sends one. The score is approximate and can read lower for non-English text. It is not a verdict on whether the memory was worth keeping. Absent when the service sent no score.
supersededNoThe memory_id values this write replaced, in request order. Present only when the write replaced at least one memory.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.18.1
    • addedInput schema / properties / supersedes
      Added value: +{
      +  "description": "Pass the memory_id values of memories this write corrects or replaces. Use only for memories you have checked are outdated or wrong; the replaced memories stay recoverable with include_history. Not supported in shared rooms (xroom: domains). 1 to 32 distinct ids.",
      +  "items": {
      +    "minLength": 1,
      +    "type": "string"
      +  },
      +  "maxItems": 32,
      +  "minItems": 1,
      +  "type": "array"
      +}
    • addedOutput schema / properties / superseded
      Added value: +{
      +  "description": "The memory_id values this write replaced, in request order. Present only when the write replaced at least one memory.",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
  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.14.2
    • changedOutput schema / properties / importance / description
      Previous value: -"Novelty score for this write (0-1): how much it adds over the nearest memories already saved in the same domain. A first-generation metric UNDER ACTIVE DEVELOPMENT and known to be unreliable — the same content has measured ~0.08 in Russian against ~0.55 in English, so it under-reads non-English text. It is not a verdict on whether the memory was worth keeping. Absent when the service sent no score."New value: +"Novelty score for this write (0-1): how much it adds over the nearest memories already saved in the same domain. Outside shared rooms, a write that scores below the service's importance threshold is not stored, and `reason` says why when the service sends one. The score is approximate and can read lower for non-English text. It is not a verdict on whether the memory was worth keeping. Absent when the service sent no score."
  4. Changed3 schema fields changedv0.11.0
    • addedInput schema / properties / concepts / maxItems
      Added value: +256
    • addedInput schema / properties / domain / maxLength
      Added value: +100
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "importance": {
      +      "description": "Novelty score for this write (0-1): how much it adds over the nearest memories already saved in the same domain. A first-generation metric UNDER ACTIVE DEVELOPMENT and known to be unreliable — the same content has measured ~0.08 in Russian against ~0.55 in English, so it under-reads non-English text. It is not a verdict on whether the memory was worth keeping. Absent when the service sent no score.",
      +      "type": "number"
      +    },
      +    "memory_id": {
      +      "description": "Identifier of the stored memory, or null when it was not stored.",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "reason": {
      +      "description": "The memory service's own explanation of this outcome, quoted as sent — when stored is false this is the ONLY statement of WHY, e.g. \"Below importance threshold (0.047 < 0.1)\". Ordinary text is preserved exactly; only control, bidi, zero-width, and repeated-whitespace characters are normalized before display, and the value is capped at 400 characters. Absent when the service sent no explanation, or when nothing remains after that normalization.",
      +      "type": "string"
      +    },
      +    "stored": {
      +      "description": "Whether the memory passed the novelty gate and was stored.",
      +      "type": "boolean"
      +    }
      +  },
      +  "required": [
      +    "stored",
      +    "memory_id"
      +  ],
      +  "type": "object"
      +}
  5. Changed1 schema field changedv0.10.0
    • changedInput schema / properties / domain / description
      Previous value: -"Namespace to organize memories (e.g. 'engineering', 'user:alice', 'project:acme')"New value: +"Namespace to organize memories (e.g. 'engineering', 'user:alice', 'project:acme'). Matched byte-for-byte — a leading space, a different case, or an invisible character opens a SEPARATE, permanent store, so reuse an exact name from memory_stats rather than retyping one. To write into a shared room, pass its address here instead (e.g. 'xroom:room_01ABC'). Find room addresses with memory_list_rooms."
  6. First observedv0.3.7

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the annotations (which only declare it is a non-read, non-destructive, non-idempotent, closed-world write), the description discloses the novelty gate that can refuse a write and that the result reports stored-vs-refused, plus a hard prohibition list on sensitive data. That is exactly the behavioral context annotations cannot convey.

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

Conciseness5/5

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

Front-loaded with purpose, then suitability, then prohibitions, then behavior, then the two non-obvious parameter rules. Every sentence carries a distinct constraint; nothing repeats the schema or annotations.

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 4-parameter write tool with a full output schema, the description covers the risky parts: what should not be stored, the refusal gate, and how to supersede. Return-value details are correctly left to the output schema while still noting the stored/refused distinction.

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 baseline is 3; the description still adds real meaning by prescribing that `content` be a self-contained statement meaningful out of context and by framing `supersedes` as the correction path for checked-outdated memories.

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 and resource ('Store a long-term memory') plus scope ('persists across sessions and across every AI tool the user has connected'), which cleanly separates it from read/list siblings like memory_read and memory_list_recent.

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?

Gives explicit when-to-use ('a stated preference, a decision, a fact about people, roles or project setup, a lesson learned') and when-not ('transient chatter that only matters this turn does not belong here'), plus a correction path via `supersedes`. It does not name an alternative destination for the transient-chatter case, which is the only gap.

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