Skip to main content
Glama

Save a memory

memory_write

Records one durable fact: a decision, a stated preference, a constraint, a host or service detail, a convention. Content that names its subject and keeps the numbers, identifiers, paths, dates and the cause or reversal condition stays usable in six months, when a reader sees only the row. Each call stores one row; transient chatter or a file's contents stored here come back in every later search. The response can carry possible_conflicts, older facts close to the new one, and the new row is already stored either way. When one of them states the old version of the fact just written, a second call with the same content and supersedes set to that memory's id retires it in favour of the row the first call stored, which leaves one live row for the fact. The old row stays readable in memory_history. possible_conflicts can also list a different fact that only sounds similar. A row reads best as one fact in a few sentences. Several facts belong in several calls, and session narrative, reasoning and step-by-step history stay in the conversation. Content over 2000 characters is refused.

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>",
      "namespace": "<namespace>"
    },
    "name": "memory_write"
  }
}

Input Schema

NameRequiredDescriptionDefault
tagsNoShort lowercase labels used for filtering later.
shareNocompany shares the row with the person's company. The rows colleagues need there are ones the person asked to share and decisions, conventions or facts about a shared system. Absent, the row is theirs alone until they share it. Refused outside a company workspace, and for private notes.
contentYesThe durable fact, self-contained, so it still makes sense in six months with no surrounding conversation. A fact that names its subject and keeps its numbers, identifiers, paths, dates and the cause or reversal condition it turns on stays usable; the trail of how it came to be believed adds nothing a later reader needs.
namespaceYes'user:me' for facts about the person, 'project:<slug>' for one codebase, 'global' for facts true everywhere, 'personal:<slug>' such as 'personal:finance' for a private area of life. 'credentials:<slug>' is not writable here: those hold client-encrypted items.
supersedesNoid of a memory this one replaces, when correcting a fact that changed.
occurred_atNoWhen this fact became true in the world. Two forms are accepted: a date, `2026-03-01`, read as midnight UTC, or a full RFC 3339 instant, `2026-03-01T09:30:00Z`. A bare month or year has no form here, so "since March" leaves the argument absent rather than carrying a day nobody stated. The argument holds a time that was stated rather than worked out: by the user, as in "we moved to Postgres 16 on 4 June 2026", or by the fact itself naming the day an event happened, as in "the regulator approved it on 19 August 2026". A date inferred from context is a guess the store then reports as fact. A stated time left out is lost: the row then reads as true since the store heard it. By default a date within the last day is refused unless the fact's text states it, because the store already records when it heard the fact, so today's date alone fails the write. A future date is refused.
sensitivityNo'open' or 'private'. Raises the level above the namespace default and can never lower it, so passing 'open' for a namespace that classifies private changes nothing.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Goes well past the annotations: one row per call, the response may carry possible_conflicts and the new row is stored regardless, supersedes performs a soft retirement with the old row still readable in memory_history, and there are concrete refusals (content over 2000 characters, a same-day date not stated in the text, future dates, share outside a company workspace). destructiveHint=false is consistent because superseding retires rather than deletes.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose is front-loaded and most sentences carry real information, but the block is a single dense paragraph and the content-durability advice ("names its subject and keeps the numbers, identifiers, paths, dates") largely restates the schema's own content description. Several clauses are tangled ("which leaves one live row for the fact"), costing scanability for an agent skimming for the call shape.

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?

With no output schema, the description steps in to explain what the response may contain (possible_conflicts and older nearby facts) and that the write has already happened. Refusal conditions, the corrective workflow, granularity guidance, and where superseded rows go are all covered for a 7-parameter mutation tool.

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, but the description adds genuine meaning beyond it: the two-call supersedes workflow (repeat the identical content, pass the conflicting id) and the 2000-character ceiling on content, neither of which the schema states. It also warns that a possible_conflicts entry may be merely a similar-sounding fact, which clarifies when supersedes is and is not appropriate.

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 gives a specific verb and resource ("Records one durable fact") and enumerates the scope — decision, preference, constraint, host/service detail, convention. It also carves out what does not belong here (transient chatter, file contents, session narrative, step-by-step history) and names memory_history as where retired rows remain readable, so the row this tool owns is distinguishable from its siblings.

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 (durable facts, one per call, "several facts belong in several calls"), explicit when-not (transient chatter, file contents, session narrative, reasoning, history), and an explicit corrective path: a second call with the same content plus supersedes set to the conflicting id. The only mild gap is that it never says to check memory_search first, but that is not required to invoke correctly.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources