Skip to main content
Glama

save_memory

Persist user preferences, facts, episodes, or skills as memories for future conversations, with automatic embedding and near-duplicate detection that merges or skips redundant saves.

Instructions

Save a new memory. Memories are persistent user preferences, facts, episodes, or skills that should be recalled in future conversations. Embeddings are generated automatically for semantic search. Delta-write is on by default: near-duplicate saves are skipped and similar existing memories absorb the new content instead of a new row being created (status in the response: saved | merged | skipped). Pass force_insert=true to bypass. Writes persist immediately; requires agent auth when the agent has a registered key.

Input Schema

NameRequiredDescriptionDefault
tagsNoTags for categorization
typeNoMemory type: preference, fact, episode, entity, or skillfact
layerNoMemory layer: L0 (raw), L1 (atom), L2 (scenario), L3 (persona). Auto-assigned if omitted.
api_keyNoAPI key for agent authentication (required if agent has a registered key)
contentYesThe content of the memory to save
agent_idNoID of the agent saving this memoryunknown
priorityNoPriority level: MUST, REFERENCE, or BACKGROUNDREFERENCE
namespaceNoNamespace for the memory (default: global)global
agent_typeNoType of the agent (e.g., coding-assistant)general-assistant
confidenceNoConfidence score (0.0 to 1.0)
visibilityNoSharing scope: "scoped" (default, namespace rules) or "shared" (team pool).
instructionNoOptional instruction format for the memory
skill_stepsNoSkill execution steps (only for type=skill)
force_insertNoForce insert, skipping delta-write dedup/merge. By default a save is checked against similar memories in the same namespace: near-duplicates are skipped, similar memories absorb the new content's residual (docs/DESIGN.md §17.1).
skill_triggerNoSkill trigger pattern (only for type=skill)
skill_verificationNoSkill verification criteria (only for type=skill)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior5/5

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

Annotations establish that this is a non-read-only, non-idempotent write, and the description adds substantial context beyond that: automatic embedding generation, near-duplicate skipping, merge-absorption semantics, the saved/merged/skipped response states, immediate persistence, and the registered-key auth requirement. This is exactly the behavioral detail an agent needs before calling a mutating tool.

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 front-loaded with the core purpose and then layers in the important default behavior and exceptions without wasted sentences. The delta-write explanation is dense but each sentence contributes actionable information.

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 16-parameter mutation tool with no output schema, the description covers the highest-risk behavioral details: dedup/merge behavior, force_insert bypass, immediate persistence, auth, and response status values. It does not describe the response shape beyond status, but given full schema coverage for parameters, it is largely complete.

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 all 16 parameters are already documented in the input schema, which sets the baseline at 3. The description mentions force_insert and auth in prose, but those meanings are also present in the schema, so it adds little parameter-level detail beyond the structured fields.

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 opens with a specific verb+resource ("Save a new memory") and immediately defines what a memory is (preferences, facts, episodes, skills), which clearly separates it from siblings like search_memory, delete_memory, and add_evidence. An agent can identify the tool's role 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 Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It clearly explains the default delta-write behavior and the exact condition for using force_insert=true, which is strong intra-tool guidance. It stops short of explicitly routing the agent between save_memory and related siblings such as add_evidence or extract_memories, so it is clear but not fully comparative.

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