Skip to main content
Glama

mem_save

Save a project convention, decision, gotcha, or glossary term as persistent memory that survives across AI sessions, using type, slug, body, and scope to organize knowledge by visibility and topic for deduplication and updates.

Instructions

Save a piece of knowledge as a persistent memory that survives across AI sessions.

USE THIS WHEN you discover something worth remembering for future sessions:

  • A project convention (how things are done here)

  • An architectural decision and its rationale

  • A gotcha or non-obvious behavior that surprised you

  • A domain term and what it means in this codebase

DO NOT USE for failed approaches → use mem_tried instead (better structure). For reactive code discoveries during exploration, prefer a compact gotcha via mem_save.

PARAMETERS: type — convention | decision | gotcha | architecture | glossary | attempt slug — short kebab-case id (e.g. 'flyway-no-modify-existing') body — Markdown content with the full knowledge scope — team (shared with all devs) | personal (private) | module (component-scoped) paths — anchor to source files for staleness detection (STRONGLY recommended) topic — stable key for upsert: if a memory with same topic+scope exists, update it in-place

RETURNS: { id, scope, file_path, action: 'created'|'updated', warning?, invalid_paths? } WARNING: if paths point to non-existent files, they will be immediately stale after hivelore sync. DEDUP: identical body content within the same scope is rejected — use mem_update to modify.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bodyYesMarkdown body of the memory
slugYesShort human-readable identifier — becomes part of the filename
tagsNoTags for filtering
typeYesKind of memory being saved. Use 'skill' for reusable procedures/playbooks agents should follow for recurring tasks (feedforward harness guide). Use 'attempt' for failed approaches (auto-validated). Use 'session_recap' via mem_session_end instead.
pathsNoAnchor paths (file paths this memory references)
scopeNoVisibility scope: personal | team | module. When omitted, falls back to defaultScope in haive.config.json (default: personal).
topicNoStable key for this memory. If a memory with the same topic already exists in this scope, it is updated in-place (revision_count++). Use for knowledge that evolves over time.
authorNoAuthor handle or email
commitNoAnchor commit SHA (for staleness detection later)
domainNoDomain (e.g. transactions, billing)
moduleNoModule name (required when scope=module)
symbolsNoAnchor symbols (function/class names this memory references)
activationNoOnly for type='skill'. Progressive-disclosure triggers: the skill is surfaced ONLY when a keyword matches the task or a glob matches the edited files (or always=true). Omit to keep the skill always-eligible.
Behavior4/5

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

With no annotations provided, the description fully carries the transparency burden. It discloses upsert semantics via 'topic', dedup rejection for identical body content, a warning about immediately stale paths, and the return object shape. This is strong for a mutating tool, though it does not mention permission requirements.

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?

Well-structured with clear section labels (USE THIS WHEN, PARAMETERS, RETURNS, WARNING, DEDUP). The description is front-loaded with a one-sentence purpose, and each block adds necessary operational detail without redundancy.

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?

Given 13 parameters and no output schema, the description compensates by specifying the return object, warning about stale paths, explaining dedup rejection, and clarifying scope semantics. The activation object is documented in the schema, so its absence from the description is acceptable.

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?

The schema already provides 100% parameter descriptions, but the description adds meaningful semantics: slug format with a kebab-case example, scope audience definitions, topic's in-place update behavior, and a strong recommendation for paths. It omits minor parameters like tags/author, but the schema covers them adequately.

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 'Save a piece of knowledge as a persistent memory that survives across AI sessions,' a specific verb+object that clearly states what the tool does. It distinguishes itself from siblings by explicitly naming mem_tried as the alternative for failed approaches.

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?

Provides a dedicated 'USE THIS WHEN' list (project conventions, architectural decisions, gotchas, domain terms) and a 'DO NOT USE' section pointing to mem_tried as the preferred alternative. It also gives situational advice for reactive code discoveries, making the decision boundary explicit.

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/Doucs91/hivelore'

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