Skip to main content
Glama

Store Memory

store_memory

Store important information, decisions, patterns, and preferences for future recall. Supports single memories or batch imports of up to 500 memories, with options to correct or supersede existing memories.

Instructions

Store memory in one of two modes — single-memory (set top-level content) or batch (set memories: [...] for up to 500).

Mode 1 — Single (default): pass top-level content plus any optional fields (tags, importance, metadata, type, confidence, embedding, t_valid, t_invalid, id, etc.).

Mode 1b — Supersede/correct: pass top-level content plus supersedes_memory_id. The server stores the replacement, marks the old memory invalid with t_invalid=now, merges supersede metadata, and associates old → new with INVALIDATED_BY (default) or EVOLVED_INTO.

Mode 2 — Batch: pass memories: [{ content, tags?, importance?, metadata?, timestamp?, type?, confidence? }, ...] to store up to 500 memories in one request. Faster for bulk ingestion (imports, benchmark seeding). Batch mode does NOT accept id, embedding, t_valid, or t_invalid per-item — use single mode for those.

Content size guidelines (per item):

  • Target: 150-300 characters (one meaningful paragraph)

  • Maximum: 500 characters (auto-summarized if exceeded)

  • Hard limit: 2000 characters (rejected)

  • Format: "Brief title. Context and details. Impact/outcome."

When to use:

  • After making a decision: store the reasoning and outcome

  • When discovering a pattern: store the pattern and where it applies

  • After fixing a bug: store the root cause and solution

  • When learning user preferences: store what they prefer and why

  • For bulk ingestion (imports, seeding): use batch mode

Examples:

  • store_memory({ content: "Chose PostgreSQL over MongoDB for user service. Need ACID for transactions.", tags: ["architecture", "database"], importance: 0.9 })

  • store_memory({ content: "User prefers early returns over nested conditionals.", tags: ["code-style"], importance: 0.7 })

  • store_memory({ content: "User now prefers SQLite for small local tools.", supersedes_memory_id: "old-id", supersede_reason: "Correction from user" })

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNoSingle-memory mode only. Custom memory ID (auto-generated if omitted). Not supported in batch mode.
tagsNoSingle-memory mode. Tags to categorize the memory (e.g., ["project-name", "bug-fix", "auth"])
typeNoSingle-memory mode. Memory type for classification
contentNoSingle-memory mode (XOR with `memories`). The memory content to store. Be specific: include context, reasoning, and outcome.
t_validNoSingle-memory mode only. ISO 8601 timestamp when the memory becomes valid. Not supported in batch mode.
memoriesNoBatch mode (XOR with `content`). Up to 500 memory objects to store in one call. Each item supports content (required), tags, importance, timestamp, type, confidence, metadata. Batch mode does NOT support `id`, `embedding`, `t_valid`, or `t_invalid` per-item — use single-memory mode for those.
metadataNoSingle-memory mode. Optional structured metadata (e.g., { files_modified: ["auth.ts"], error_type: "timeout" })
embeddingNoSingle-memory mode only. Optional embedding vector for semantic search (auto-generated if omitted). Not supported in batch mode.
t_invalidNoSingle-memory mode only. ISO 8601 timestamp when the memory expires. Not supported in batch mode.
timestampNoSingle-memory mode. Optional ISO timestamp (defaults to now)
confidenceNoSingle-memory mode. Classification confidence (0-1, default 0.9 when type provided)
importanceNoSingle-memory mode. Importance: 0.9+ critical decisions, 0.7-0.9 patterns/bugs, 0.5-0.7 minor notes
updated_atNoSingle-memory mode. ISO 8601 last-updated timestamp
last_accessedNoSingle-memory mode. ISO 8601 last-accessed timestamp
supersede_reasonNoSingle-memory supersede mode. Optional reason stored on the old memory's metadata.
supersede_relationNoSingle-memory supersede mode. Relationship to create from old memory to new memory.INVALIDATED_BY
supersedes_memory_idNoSingle-memory supersede mode. Existing memory ID that this new memory replaces or corrects.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
qdrantNoBatch-mode result: Qdrant indexing summary from the server.
storedNoBatch-mode result: number of memories stored.
messageYesConfirmation message
memory_idNoSingle-mode result: unique ID of the stored memory (use for associations)
enrichmentNoBatch-mode result: enrichment status from the server.
memory_idsNoBatch-mode result: IDs of the stored memories.
query_time_msNoBatch-mode result: server-reported execution time in milliseconds.
association_createdNoSupersede-mode result: whether old → new association was created.
superseded_memory_idNoSupersede-mode result: ID of the old memory marked invalid.
Behavior5/5

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

Discloses supersede behavior (marks old invalid, merges metadata, creates relation), content size limits, batch mode restrictions, and mode-specific parameter constraints. Adds significant value beyond minimal 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?

Well-structured with sections for modes, guidelines, when to use, and examples. Slightly verbose but not wasteful. Could be tightened by removing some redundant parameter descriptions already in schema.

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?

Covers all modes, parameter constraints, and use cases. With 17 parameters and nested objects, the description is thorough. Output schema exists so return values are not needed.

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

Parameters5/5

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

Schema coverage is 100%, but the description adds crucial context: content size guidelines (150-300 chars targeting), importance values (0.9+ critical), and supersede parameter explanations. Provides examples that clarify usage.

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 'Store memory' and distinguishes between single and batch modes. It differentiates from siblings (associate, delete, recall, update) by being the creation tool.

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?

Provides explicit 'When to use' scenarios (decisions, patterns, bugs, preferences, bulk ingestion). However, it doesn't explicitly state when to use alternatives like recall_memory or update_memory.

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/verygoodplugins/mcp-automem'

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