Skip to main content
Glama

Save Memory

save_memory
Destructive

Persists important information for future sessions, including decisions, bug fixes, discoveries, and preferences, with topic-based deduplication and optional markdown backup.

Instructions

Save a memory for future sessions. MUST be called after: (1) architecture decisions — record what was chosen, why, and what was rejected, (2) bug fixes with root cause — record symptom, root cause, fix, and prevention, (3) important discoveries — record finding and its implications, (4) user preferences — record preference and reasoning. Use topic_key for cross-session dedup (same project+topic_key updates existing memory). By default also writes a local markdown backup.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hostNoOptional host identifier, e.g. codex-cli, claude-code, api, cli.
textYesMemory text content
filesNoList of related file paths
scopeNoMemory scope: 'project' (default, only this project) or 'global' (visible in all projects). Use 'global' only for explicitly cross-project preferences or knowledge.
titleNoOptional title
branchNoGit branch label. If omitted, the server auto-detects from the MCP process current working directory. Pass an explicit value to override (e.g. when the calling agent is not running inside the project's git checkout).
projectNoProject name
topic_keyNoStable topic identifier for cross-session dedup. Same project+topic_key updates existing memory instead of creating new one. Format: kebab-case descriptive key, e.g. 'fts5-search-strategy', 'auth-middleware-design'.
local_pathNoOptional local markdown path for backup copy. Relative paths are resolved from current working directory. The resolved path must fall within the remem data directory (REMEM_DATA_DIR); paths outside that boundary are rejected.
session_idNoOptional host session id. When provided, Stop summary promotion can suppress exact duplicate candidates from the same session.
memory_typeNoMemory type: decision, discovery, bugfix, architecture, preference. Defaults to 'discovery'.
claim_sourceNoOptional claim source label. Defaults to manual_save for MCP calls.
claim_enabledNoOverride the session claim toggle. Defaults to true; set false to preserve legacy save behavior without claim rows.
created_at_epochNoOptional override for the memory's creation timestamp (Unix epoch seconds). Use only for backfilling historical entries; defaults to now when omitted.
local_copy_enabledNoOverride the local markdown backup toggle. Default behavior (when omitted) is controlled by the server config.
acknowledge_patternNoExplicitly acknowledge an instruction-pattern match in direct save text after human review. Must match the detected pattern id, e.g. override_previous_instructions.
reference_time_epochNoExplicit episode/source event time (Unix epoch seconds) used to resolve relative dates. Preferred for historical backfills; created_at_epoch is used only when this is omitted.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes
scopeYes
branchNo
statusYes
projectYes
claim_idNo
upsertedYes
next_stepYes
operationYes
topic_keyNo
local_copyYes
local_pathNo
claim_errorNo
memory_typeYes
claim_statusYes
local_statusYes
created_at_epochYes
updated_at_epochYes
reference_time_epochYes
Behavior5/5

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

Annotations already mark destructiveHint=true and readOnlyHint=false; the description adds concrete behavioral context: using topic_key updates existing memory (overwrites) and by default writes a local markdown backup. This goes beyond the annotations and discloses side effects clearly. No contradiction.

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?

The description is dense but well-structured: opening purpose sentence, numbered trigger list, dedup note, and backup note. Every sentence adds value and the format is scannable, with no filler.

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?

Given 17 parameters, full schema coverage, and an output schema, the description appropriately focuses on core usage triggers, dedup semantics, and side effects. It does not enumerate every parameter nuance, which is correctly delegated to the schema, leaving only minor gaps for edge-case parameters.

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 baseline is 3. The description reinforces topic_key semantics (dedup and update behavior) but does not materially add meaning beyond what the schema already provides for the other 16 parameters.

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 clearly states the tool's action: 'Save a memory for future sessions' and lists four specific mandatory call scenarios (architecture decisions, bug fixes, discoveries, user preferences), which distinguishes it from sibling read tools like search and recall_user_context.

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?

Explicit 'MUST be called after' guidance enumerates exactly when to use this tool, and the context implies it is for writes versus sibling read tools. It also gives conditional usage for topic_key dedup and local backup, offering practical alternatives.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/majiayu000/remem'

If you have feedback or need assistance with the MCP directory API, please join our Discord server