Skip to main content
Glama

Save a memory

rhebok_save_memory

Stores a lesson, fact or episode as a durable memory so later sessions recall it. Use it when the user corrects you, states a preference, or asks you to remember a rule.

Instructions

Save a memory that later sessions see: a lesson (a correction or a rule the user gave you), a fact (something durable about the user or their setup) or an episode (what happened and what was decided).

Use it when the user corrects you, states a preference, or asks you to remember something. Do not use it for what their notes already say, which rhebok_search_knowledge finds, or for details that matter only in this conversation. To see what is saved, use rhebok_list_memories; to remove a memory, use rhebok_delete_memory.

Parameters: write text as the rule or fact itself, in one to three sentences that make sense with no conversation around them, for example "Never commit with the personal email; use the noreply address." scope defaults to the current project; pass "global" only for a rule the user means everywhere. Leave confidence at 80, and use 100 only when the user stated the rule outright; a memory you save below the configured floor (80 by default) is refused.

Behavior: the text is sent to the configured embedding server, so a save fails while that server is unreachable; the memory itself stays on this machine. A memory almost the same as one of the same kind (cosine similarity 0.94 or more by default) replaces it, and the replaced memory is deleted with no undo. Lessons appear at the start of every session in their project; every kind can be retrieved on later prompts.

Returns: status saved, replaced, duplicate or rejected; the memory's id, which rhebok_delete_memory takes; the id and title of a memory it replaced; and reason when nothing was saved.

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": {
      "kind": "<kind>",
      "text": "<text>"
    },
    "name": "rhebok_save_memory"
  }
}

Input Schema

NameRequiredDescriptionDefault
kindYes"lesson" (a rule the user taught you), "fact" (something durable about the user or their setup) or "episode" (what happened, with the decision and why).
textYesOne to three sentences, 10 to 2000 characters, in the user's own intent.
scopeNo"global" for a rule that applies everywhere, or an absolute project path. Omit to scope to the current project.
titleNoOptional short title. Defaults to the first sentence.
confidenceNo0-100. Use 100 only when the user said it explicitly; the default is 80.

Output Schema

NameRequiredDescriptionDefault
idYesThe saved memory's id, or for a duplicate the id of the memory that already says it. Null when rejected.
kindYesThe memory's kind. Null when `kind` was not lesson, fact or episode.
reasonYesWhy nothing was saved, when status is "rejected".
statusYes"saved" and "replaced" wrote the memory; "duplicate" wrote nothing because the same memory already exists; "rejected" wrote nothing, see `reason`.
replacedYesThe near-duplicate this save replaced, when status is "replaced".

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.2.4

TDQS

A4.6/5.0
Behavior4/5

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

Discloses behavior far beyond the annotations: dependency on a configured embedding server and the failure mode when it is unreachable, on-machine storage, near-duplicate replacement at cosine similarity 0.94, and that the replaced memory is deleted with no undo. The one wrinkle is that this replace-and-delete side effect sits awkwardly against destructiveHint=false, so the agent gets two conflicting signals about whether a save can destroy existing data.

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?

Front-loads purpose, then when-to-use, then labeled Parameters/Behavior/Returns blocks, so an agent can stop reading at whichever level it needs. Some content (defaults for `scope` and `confidence`, the Returns list) repeats the input and output schemas, which costs a little density.

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?

Covers the gaps an agent would otherwise hit on a five-parameter write tool: defaulting rules, the rejection floor, the duplicate-replacement clause, failure conditions, and the status vocabulary that comes back. With an output schema present, the short Returns summary is enough and nothing material is left unspecified.

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 already 100%, so the baseline is 3; the description earns above that by giving a concrete model sentence for `text`, steering `scope` toward 'global only for a rule the user means everywhere', and warning that a `confidence` below the configured floor (80 by default) is refused — a runtime consequence the schema does not state.

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?

States a specific verb and resource ('Save a memory that later sessions see') and immediately enumerates the three kinds it accepts — lesson, fact, episode — with a one-line gloss for each. That framing lets an agent distinguish it from rhebok_search_knowledge and rhebok_list_memories without opening any 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?

Gives positive triggers ('the user corrects you, states a preference, or asks you to remember something'), explicit exclusions ('what their notes already say, which rhebok_search_knowledge finds', 'details that matter only in this conversation'), and routes to the two adjacent siblings for inspecting and removing memories.

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