Skip to main content
Glama

storeMemory

Persist a self-contained memory (decision, fact, warning, or summary) to local SQLite for retrieval in future sessions.

Instructions

Persist a single memory unit to the local SQLite store. Accepts decisions, facts, architectural choices, warnings, and session summaries. NOT idempotent — each call creates a new record even with identical content. Writes to disk immediately.

WHEN TO CALL: After any significant decision, discovery, or conclusion that should be available in a future session. Good candidates: technology choices, non-obvious constraints, bug root-causes, architectural decisions, key facts about the codebase.

WHEN NOT TO CALL: For trivial observations, transient state, or content that duplicates what was just retrieved. Do not store entire files or full conversation transcripts.

kind categories: 'decision', 'fact', 'summary', 'warning', 'architecture'. Write content to be self-contained — it must be useful without any surrounding conversation context. importance 1-10 (10 = most critical); directly affects retrieval ranking in future sessions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
memoryIdYesCaller-supplied unique UUID for this memory (e.g. crypto.randomUUID()). Used for deduplication and for later retrieval by ID via getMemory.
sessionIdYesIdentifier for the current session. Used to group memories by session for diagnostics. Use a consistent ID within a single session.
sourceAdapterYesName of the adapter or host creating this memory (e.g. 'claude-code', 'cursor', 'generic'). Used for provenance tracking.
kindYesCategory of this memory. Recommended values: 'decision', 'fact', 'summary', 'warning', 'architecture'. Any non-empty string is valid.
contentYesThe memory text. Must be self-contained and specific — written so it is useful without surrounding conversation context. Avoid vague phrases like 'the user decided to...'.
importanceYesInteger 1-10 indicating criticality (10 = most important). Directly affects ranking in future retrieveMemories calls. Use 8-10 for decisions that must not be forgotten; 3-5 for useful but non-critical facts.
redactionEnabledNoIf true, PII is stripped from content before storage. Omit to use the project-level redaction setting from config.json.
Behavior5/5

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

The description discloses behavioral details beyond annotations: it confirms non-idempotence, states immediate disk write, explains that importance affects future retrieval ranking, and clarifies that each call creates a new record even with identical content. Annotations only provide hints; the description adds substantial context.

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 well-structured with a clear lead sentence, separate usage sections, and parameter guidance. It is concise with no redundant information, front-loading the key purpose and behavior.

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?

The description covers purpose, usage guidelines, parameter semantics, and key behavioral traits. However, it lacks information about what happens with duplicate memoryIds (e.g., error or overwrite) and does not describe the return value. Given no output schema, these details would improve completeness.

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?

Although the input schema already has 100% coverage with descriptions, the tool description adds extra value by explaining the recommended values for 'kind', stressing self-contained 'content', and giving importance value ranges with examples. This enhances the agent's understanding beyond the 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?

The description clearly states the tool's action ('Persist a single memory unit'), the resource ('local SQLite store'), and distinguishes it from sibling 'batchStoreMemory' by emphasizing it stores a single unit. It also mentions non-idempotent behavior, adding specificity.

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 'WHEN TO CALL' and 'WHEN NOT TO CALL' sections provide clear guidance on appropriate use cases and explicitly list good candidates and what to avoid. This effectively helps the agent decide when to invoke this tool over 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/catfish-1234/sessionmem'

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