Skip to main content
Glama

Store Memory

store_memory

Store important information as memory in single or batch mode for future recall. Use after decisions, pattern discovery, or bug fixes to persist context, reasoning, and outcomes.

Instructions

Store memory in one of two modes — single-memory (set top-level content) or batch (set memories: [...] for up to 500). Use this to persist important information for future recall.

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 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({ memories: [{ content: "...", tags: ["import"] }, { content: "...", tags: ["import"] }] }) // Batch

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contentNoSingle-memory mode (XOR with `memories`). The memory content to store. Be specific: include context, reasoning, and outcome.
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.
tagsNoSingle-memory mode. Tags to categorize the memory (e.g., ["project-name", "bug-fix", "auth"])
importanceNoSingle-memory mode. Importance: 0.9+ critical decisions, 0.7-0.9 patterns/bugs, 0.5-0.7 minor notes
embeddingNoSingle-memory mode only. Optional embedding vector for semantic search (auto-generated if omitted). Not supported in batch mode.
metadataNoSingle-memory mode. Optional structured metadata (e.g., { files_modified: ["auth.ts"], error_type: "timeout" })
timestampNoSingle-memory mode. Optional ISO timestamp (defaults to now)
typeNoSingle-memory mode. Memory type for classification
confidenceNoSingle-memory mode. Classification confidence (0-1, default 0.9 when type provided)
idNoSingle-memory mode only. Custom memory ID (auto-generated if omitted). Not supported in batch mode.
t_validNoSingle-memory mode only. ISO 8601 timestamp when the memory becomes valid. Not supported in batch mode.
t_invalidNoSingle-memory mode only. ISO 8601 timestamp when the memory expires. Not supported in batch mode.
updated_atNoSingle-memory mode. ISO 8601 last-updated timestamp
last_accessedNoSingle-memory mode. ISO 8601 last-accessed timestamp

Output Schema

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

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

Annotations indicate read/write and non-destructive. Description adds content size limits (target 150-300, max 500 auto-summarized, hard 2000 rejected), mode restrictions, and persistence intent. No contradiction with annotations.

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?

Well-structured with sections for modes, usage guidelines, content size, and examples. Front-loaded with purpose. Every sentence provides useful information; no waste.

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?

Given 14 parameters, 100% schema coverage, and presence of output schema, the description is complete. It covers modes, when to use, content constraints, and examples. No gaps for a store operation.

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%. Description adds mode-specific guidance, content size rules, examples, and restrictions (e.g., batch mode lacks id/embedding). Adds significant value beyond schema.

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?

Clearly states 'Store memory' with two modes (single/batch), defines the resource, and distinguishes from sibling tools like delete_memory and recall_memory. Specific verb+resource+scope.

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?

Explicitly lists when to use (e.g., after decisions, patterns, bugs, preferences) and when to use batch mode (bulk ingestion). Provides clear context and excludes 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/verygoodplugins/mcp-automem'

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