Skip to main content
Glama

Write memory

memory_write

Persist durable project facts—decisions, incident root causes, preferences, references, and snippets—across sessions. Rejects near-duplicates to keep stored memory accurate.

Instructions

Persist one durable fact. Use for: non-trivial fixes and their root cause (kind=incident), architectural choices and why (decision), stable project facts (fact), how the user wants to be worked with (preference), external URLs/dashboards/tickets (reference), reusable code patterns (snippet). Do NOT store what the repo or git history already records. Near-duplicates are rejected with the existing id — update or supersede that instead.

Input Schema

NameRequiredDescriptionDefault
bodyYesThe fact itself. For incident/decision include the why and how to apply it. Use absolute dates, never 'yesterday'.
kindYes
tagsNo
forceNoWrite even if a near-duplicate exists.
titleYesOne line, specific enough to recognise later.
sourceNoFile path, URL, or session reference.
projectYesProject slug, e.g. 'my-app', 'api', 'website', 'tools', or 'global' for cross-project knowledge.
importanceNoDefault 3.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior4/5

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

Goes well beyond the annotations by disclosing the de-duplication contract: near-duplicates are rejected and the existing id is returned, which is non-obvious write behavior an agent must anticipate. It stops short of stating what a successful write returns or how the write interacts with later memory_search, so it is strong but not exhaustive.

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?

Four sentences, all load-bearing: purpose first, then the taxonomy, then the exclusion rule, then the duplicate-handling consequence. No restatement of the name or title and no filler.

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?

For an 8-parameter write tool with no output schema, the description covers the highest-risk ambiguity (what belongs here, what happens on duplicates) and the schema carries the rest. Minor gap: the `force` override is documented only in the schema, so the agent must combine both sources to understand bypassing the duplicate check.

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 75%, and the description compensates by giving each `kind` enum value a concrete meaning tied to a real situation, which the bare enum list in the schema does not. It does not explain `force`, `importance`, or `tags` beyond what the schema already says, so it adds meaning but not for every parameter.

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?

"Persist one durable fact" is a precise verb+resource, and the following sentence enumerates exactly which classes of knowledge qualify (incident, decision, fact, preference, reference, snippet). This makes it immediately distinguishable from memory_update, memory_supersede, and memory_search among the 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 list, an explicit negative rule ("Do NOT store what the repo or git history already records"), and explicit routing to alternatives when a near-duplicate is rejected ("update or supersede that instead"). Both the inclusion and exclusion criteria are stated, not inferred.

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