Skip to main content
Glama

save_memory

Idempotent

Create or update atomic project facts in SQLite, automatically superseding outdated entries and syncing Markdown scope exports.

Instructions

Create or supersede an atomic memory (<= 25 words) in SQLite and synchronize Markdown scope exports. Saving to an existing (scope, subject) slot or passing replaces_id automatically marks the prior active memory as 'superseded', while identical content is a safe idempotent no-op. Providing repo-relative anchor_files links the memory to Git push webhooks so commits touching those files automatically flag it [STALE]. Use save_memory to add or update facts and rules; use deprecate_memory to archive obsolete facts without replacement, revalidate_memories to clear [STALE] flags when facts remain valid, or distill_memories for bulk cleanup.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "scope": "<scope>",
      "category": "<category>",
      "content": "<content>"
    },
    "name": "save_memory"
  }
}

Input Schema

NameRequiredDescriptionDefault
scopeYesProject, repository, or directory name (e.g., 'homelab', 'ticketera', 'global').
contentYesAtomic memory statement. STRICT LIMIT: MUST be <= 25 words. Omit filler words.
subjectNoDeterministic slot key (e.g., 'app-port', 'db-stack'). Saving with an existing (scope, subject) automatically supersedes the old fact.
categoryYesMemory classification: 'rule' (guardrails), 'fact' (architecture/ports), 'preference' (style), 'episodic' (temporary 14d notes).
replaces_idNoOptional explicit memory ID to supersede.
anchor_filesNoRepo-relative file paths (e.g., ['docker-compose.yml']). Git commits touching these files auto-flag this memory as [STALE].

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.8.3

TDQS

A4.8/5.0
Behavior5/5

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

Annotations declare idempotentHint=true and readOnlyHint=false, and the description substantiates both: identical content is an explicit no-op, while saving to an occupied (scope, subject) marks the prior memory 'superseded' — a non-destructive but state-changing consequence not encoded in annotations. It also discloses the hidden coupling between anchor_files and Git push webhooks that auto-flag [STALE], which the agent could not infer from structured fields alone.

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?

Four sentences, front-loaded with the operation and the <=25-word constraint, then behavior, then routing. Dense but each sentence carries distinct information; the word-limit restatement duplicates the schema slightly.

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?

An output schema exists and annotations cover safety/idempotency, so the description's job is behavior and routing — both are fully addressed, including the supersede lifecycle and the webhook staleness mechanism. Nothing an agent needs to invoke this 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 the baseline is 3; the description earns above that by explaining the cross-parameter interaction — that an existing (scope, subject) slot and an explicit replaces_id are alternative paths to the same supersede behavior. It does not add format or syntax guidance beyond the schema, so not a 5.

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 states a specific verb+resource pair (create/supersede an atomic memory) plus the storage substrate and a side effect (Markdown scope export sync). The supersede-vs-create duality is spelled out, so an agent knows this single tool both inserts and replaces.

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?

The last sentence explicitly routes the agent: use save_memory for facts/rules, deprecate_memory to archive without replacement, revalidate_memories to clear [STALE], distill_memories for bulk cleanup. It names three sibling alternatives and the condition that selects each.

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