Skip to main content
Glama

memory_add

Save facts, preferences, decisions, and notes to persistent local memory. Call proactively to retain project conventions and user context across sessions.

Instructions

Save a fact, preference, decision, or note to persistent local memory. Call this PROACTIVELY whenever the user shares something worth remembering across sessions — project conventions, tool choices, personal preferences, decisions made, error fixes and their causes. Worth saving: decisions and their reasons, preferences, conventions, gotchas, approaches tried and abandoned. Not worth saving: one-off task details or anything re-derivable from the code. Do not wait to be asked. For facts you infer yourself rather than the user stating, propose them first and save only on approval. Keep each memory to one self-contained statement; attach aliases when the parameter is available. If a note tells you the user's own wording was already stored verbatim this turn, that statement is already saved: do not retry it in a rewording — save only what that text does not contain, or use memory_supersede on the given id. Default scope is the current project; use the personal scope for facts about the user that apply across all projects.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tagsNoOptional tags for filtering.
typeNoCategory of memory. Default: fact.
scopeNoMemory scope. `project` = tied to this repo. `personal` = global across all your projects. `user` is a deprecated alias of `personal`. Default: project.
sourceNoWhere this memory came from. Default: tool. Pass 'inference' for agent-proposed captures (V2-DESIGN §3.5).
aliasesNoOptional: alternate phrasings of this fact — synonyms, another way a question might be worded, equivalents in the user's other language (e.g. 节假日 for 'public holidays'). They are indexed with the memory so differently-worded questions still match. Only used when the install has capture aliases enabled (init default). Send at most 4; extras and blanks are dropped silently, never an error.
contentYesThe fact to remember. One idea per memory.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations present, the description carries the full burden and does disclose substantial behavior: proactive capture, approval gating for inferred facts, single-idea-per-memory constraint, alias attachment, current-project default scope, and a duplicate-suppression rule for reworded retries. It does not describe the return value or how conflicts/errors surface, which keeps it short of a 5.

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?

The definition is long but front-loaded: purpose first, then save/skip criteria, then edge cases (inference approval, dedup, scope). Most sentences carry operational guidance rather than filler. It is dense enough that a small amount of tightening is possible, but nothing is padding.

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 6-parameter, annotation-free write tool with no output schema, the description covers purpose, usage policy, dedup mechanics, and scope semantics thoroughly. The remaining gap is return/confirmation behavior and what a saved memory looks like, which is only partially inferable from the mention of a 'given id'.

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 the baseline is 3, but the description adds genuine meaning beyond the schema: it explains the scope decision ('Default scope is the current project; use the personal scope for facts about the user that apply across all projects') and the intent of aliases ('alternate phrasings... so differently-worded questions still match'). It does not clarify the 'when the parameter is available' gating or the source flag beyond what the schema states.

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 opening sentence gives a specific verb (Save) and resource (a fact, preference, decision, or note to persistent local memory), so the agent knows exactly what this tool writes. It also names a sibling, memory_supersede, giving negative differentiation against the update path. This is far beyond a restatement of the name.

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?

It gives explicit when-to-use ('Call this PROACTIVELY whenever the user shares something worth remembering'), what to save vs. skip, when to propose rather than save ('For facts you infer yourself... propose them first and save only on approval'), and a dedup rule with the alternative tool ('use memory_supersede on the given id'). All of the routing conditions an agent needs are stated, not implied.

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