Skip to main content
Glama
chinwe

compound-memory

memory_write

Store durable facts, decisions, insights, and skills with keys, validity windows, and project scopes so agents reuse context and avoid stale or conflicting entries.

Instructions

Write a memory. type: episode|fact|insight|skill|decision; source: writing agent id; ns: '_shared' or 'agent-'. key: stable id for fact/insight/decision (enables conflict review). Write only stable facts (preferences, conventions, environment constraints, pitfalls), not session-temporary details; volatile status notes (in-progress work, remaining todos) either carry valid_until or stay out — a stale status memory is worse than none; prefer reusing an existing key over a new entry. valid_from/valid_until: optional ISO dates (YYYY-MM-DD) marking the fact's validity window — once valid_until has passed, the memory is excluded from search results but still readable via memory_get. project: optional lowercase-slug scope tag (lowercase alphanumeric segments joined by dashes) for workspace-specific memories — tagged memories are hidden from searches that do not pass the same project, while untagged (global) memories stay visible everywhere; declare your workspace project per the host usage rules and pass it on every write/search in that workspace. Returns the stored memory; conflict: true means a different version with the same key exists and a review entry was queued.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nsNo_shared
keyNo
typeYes
linksNo
sourceYes
contentYes
projectNo
valid_fromNo
valid_untilNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.3

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses conflict handling ("conflict: true means a different version with the same key exists and a review entry was queued"), the post-expiry lifecycle (excluded from search but readable via memory_get), and project-based visibility scoping. It stops short of stating auth requirements, rate limits, or upsert/idempotency semantics for repeat writes.

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-loaded with the core action, then grouped by parameter and lifecycle concern; nearly every sentence adds usable information. It is dense and semicolon-packed, which costs a little readability, but there is no obvious 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 a 9-parameter mutation tool with no annotations and no output schema, the description covers scope, conflict behavior, temporal validity, and project isolation, plus the return value. The remaining gaps are the undocumented links parameter and content semantics, which are minor but real.

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 description coverage is 0%, so the description must compensate and largely does: it defines type values (episode|fact|insight|skill|decision), ns values ('_shared' or 'agent-<name>'), key semantics (stable id enabling conflict review), valid_from/valid_until format (ISO YYYY-MM-DD) and behavior, and project format (lowercase-slug) and visibility effect. Only links and content are left undocumented beyond their names.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Opens with a specific verb+resource ("Write a memory") and immediately enumerates the memory types, which tells an agent exactly what this tool stores. It does not name a sibling explicitly, so an agent must infer that this is the write path versus memory_search/memory_get, keeping it just below a 5.

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 explicit when-and-when-not guidance: write stable facts (preferences, conventions, constraints, pitfalls) and not session-temporary details, with a stated rationale ("a stale status memory is worse than none"). It also directs the agent to reuse an existing key over creating a new entry and explains the valid_until escape hatch, leaving little to inference.

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