Skip to main content
Glama

save_memory

Saves one durable fact, preference, or project decision so every connected AI tool can recall it in future sessions. Prevents losing context between tools and keeps knowledge shared.

Instructions

Save one durable fact, preference or decision so every AI tool can recall it later.

    Use when the user states something that will still matter in future sessions: a
    preference ("I prefer pytest"), a project decision ("we deploy on Fridays"), a fact
    about the stack, or a key decision made while finishing a task. Save one fact per call.

    Do NOT use for temporary task details, secrets (passwords, API keys, tokens), large
    text such as code or logs, or things already obvious from the code.

    Returns status "saved", "duplicate" (already known), or "needs_resolution": the fact
    may conflict with existing ones; then call resolve_memory with the pending id.
    

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": {
      "content": "<content>",
      "scope": "<scope>"
    },
    "name": "save_memory"
  }
}

Input Schema

NameRequiredDescriptionDefault
scopeYesThe project folder name (e.g. "ctxbook"), or "global" for facts about the user that apply everywhere.
contentYesOne short, self-contained fact, e.g. 'The orders API uses Postgres.'

Output Schema

NameRequiredDescriptionDefault
statusYes
messageYes
memory_idYesThe saved fact; the existing fact for a duplicate; the pending fact to pass to resolve_memory for needs_resolution.
candidatesNoExisting facts the new one may conflict with.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false and destructiveHint=false, and the description goes beyond them by disclosing the three return statuses and the required follow-up action for the conflict case, which is behavior an agent must branch on. It does not cover dedupe rules beyond the 'duplicate' status or any write-confirmation/permission expectations, so it falls short of full disclosure.

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?

Content is front-loaded: purpose first, then use cases, then exclusions, then return contract. Every sentence carries information, though the multi-line indented layout is more sprawling than needed for the amount of text.

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?

With an output schema present, the description is not obligated to explain return shapes, yet it still flags the actionable statuses, and parameters plus annotations are covered by structured fields. The only real gap is around write-time behavior such as conflict detection scope or confirmations, which is a minor omission for a two-parameter write tool.

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 scope and content are already well documented in the schema, which sets the baseline at 3. The description adds the cardinality constraint 'Save one fact per call' and the self-contained phrasing, which are genuinely useful but modest given the schema already carries the field semantics.

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 line states a specific verb and resource ('Save one durable fact, preference or decision') plus the durability scope ('so every AI tool can recall it later'). Sibling tools are implicitly distinguished through the 'Do NOT use' exclusions and the explicit hand-off to resolve_memory, so an agent can route without opening a sibling 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 when-to-use cases are enumerated (preference, project decision, stack fact, key decision) and matched with explicit when-not-to-use cases (temporary task details, secrets, large text, code-obvious facts). It also names the conditional alternative: call resolve_memory with the pending id when the status is 'needs_resolution'.

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