Skip to main content
Glama

store_memory

Store a new user fact, preference, or strategy for the agent's long-term memory, enabling persistent context across sessions.

Instructions

Store a new memory about the user. Use when you learn a new fact, preference, instruction, past failure, or successful strategy. Does not conflict with any memory returned by recall_memory.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
api_keyNoAgent API key (starts with 'ym_'). Required for agent-scoped memory. If omitted, stored as 'user' with shared visibility.
contentYesThe fact, preference, failure, or strategy to remember.
user_idNoUser identifier (default: 'root').
categoryNoMemory category — controls decay rate: 'fact' — user preferences, identity, stable knowledge (default, ~24 day survival) 'assumption' — inferred beliefs, uncertain context (~19 days) 'failure' — what went wrong in a past task, environment-specific errors (~11 days, decays fast) 'strategy' — what worked well in a past task, approach patterns (~38 days, decays slow) Use 'failure' when storing e.g. 'OAuth failed for client X due to wrong redirect URI'. Use 'strategy' when storing e.g. 'Using pagination fixed the timeout on large DB queries'.
created_atNoISO8601 timestamp to use as the memory's creation time. Overrides the default (now). Useful for backfilling historical memories.
importanceNoYou MUST decide this. How important is this memory? (0.0–1.0) 0.9–1.0 — core identity, permanent preferences (e.g. 'Sachit uses Python') 0.7–0.8 — strong preferences, recurring patterns 0.5 — regular facts, project decisions 0.2–0.3 — transient context, one-off notes from this session
visibilityNoWho can recall this memory: 'shared' (any agent, default) or 'private' (only this agent).
context_pathsNoFile or directory paths this memory is associated with (e.g. ['src/services/', 'pyproject.toml']). Used for spatial relevance boosting during retrieval.
Behavior3/5

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

No annotations provided, so description carries full burden. It adds a behavioral assurance (no conflict with recall_memory) but lacks details on error handling, side effects, or persistence guarantees. The schema provides some behavioral info like decay rates and importance ranges, but description itself is minimal.

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?

Two sentences, front-loaded with purpose, no extraneous information. Every sentence adds value.

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?

For a simple store operation with 8 well-documented parameters and no output schema, the description is adequate. It covers when to use and a behavioral distinction. Could mention return value or failure modes, but overall complete enough.

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 each parameter already has a detailed description. The tool description does not add meaning beyond the schema. Baseline 3 is appropriate.

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?

Description clearly states the tool stores a new memory about the user and specifies concrete use cases (fact, preference, instruction, past failure, strategy). It also distinguishes from sibling recall_memory by noting no conflict.

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?

Explicitly states when to use ('Use when you learn...'), and clarifies no conflict with recall_memory. However, it does not mention when not to use or provide alternatives among siblings like memory_search 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/sachitrafa/cognitive-ai-memory'

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