Skip to main content
Glama

Store a memory

zenbrain_store

Store a memory into long-term memory so it survives the conversation. Routing is automatic: steps become procedures, emotional content episodes, and high-confidence content cores.

Instructions

Write something into long-term memory so it survives this conversation. Routing is automatic by default: steps or instructions become a procedure; content with an emotional weight above 0.5 (detected, or set via emotionalWeight) becomes an episode; a confidence above 0.9 makes it a pinned core memory; anything else becomes a semantic fact. Set type only when you want to override that. Every call adds a new memory, except that storing the same core memory again updates it; the content is also kept in working memory while the server runs. Returns the id of the stored memory. If it may already be stored, check with zenbrain_recall first: storing it again adds a duplicate.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeNoRouting hint. 'auto' (default) decides from the content.
stepsNoOrdered steps of a procedure. Optional: without them the steps are taken from the content (numbered or bulleted lines, otherwise every line).
toolsNoTools a procedure uses.
sourceNoWhere this came from, e.g. 'user', 'ai', 'import'.
contentYesThe memory to store, in plain language.
contextNoContext domain, e.g. 'work', 'personal', 'learning'.
outcomeNoWhat the procedure achieves.
confidenceNoHow certain this is (0–1). Above 0.9 routes to core memory.
emotionalWeightNoEmotional significance (0–1). Detected from the content when omitted. Above 0.5 routes to episodic memory.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesIdentifier of the stored memory.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.4.9
    • changedInput schema / properties / steps / description
      Previous value: -"Ordered steps. Required when type is 'procedure'."New value: +"Ordered steps of a procedure. Optional: without them the steps are taken from the content (numbered or bulleted lines, otherwise every line)."
  2. Changed1 schema field changedv0.1.7
    • changedInput schema / properties / emotionalWeight / description
      Previous value: -"Emotional significance (0–1). Detected from the content when omitted."New value: +"Emotional significance (0–1). Detected from the content when omitted. Above 0.5 routes to episodic memory."
  3. First observedv0.1.5

TDQS

A4.8/5.0
Behavior5/5

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

Annotations declare a non-read-only, non-idempotent write, and the description goes well beyond that: it discloses that every call creates a new memory except duplicate core memories (which update), that content is mirrored into working memory while the server runs, that duplicates are possible, and what the call returns. These are exactly the mutation/dedup traits annotations cannot express.

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?

Front-loads the core purpose, then routing, then the dedup caveat and return value. Dense and mostly waste-free, though the routing sentence is long and re-states thresholds the schema already carries.

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?

For a 9-parameter write tool with an output schema, the description covers the decision logic, mutation semantics, dedup risk, and return value. Nothing an agent needs to call it correctly is missing.

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?

Schema coverage is 100%, so baseline is 3. The description adds value by tying parameters into composite routing logic (the interaction of `type`, `confidence`, and `emotionalWeight`) and by clarifying that `type` is an override rather than a requirement — the schema documents the thresholds individually but not the routing precedence.

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?

States a specific verb and resource ('Write something into long-term memory') and immediately distinguishes itself from the read-side sibling by naming zenbrain_recall as the dedup check. An agent can tell what this tool does without opening the schema.

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 routing rules ('steps or instructions become a procedure; emotional weight above 0.5 becomes an episode; confidence above 0.9 becomes core'), an explicit override condition for `type`, and a when-to-use-otherwise instruction ('If it may already be stored, check with zenbrain_recall first'). This is a near-complete decision procedure.

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