Skip to main content
Glama

memory_write

Idempotent

Append project decisions, evidence, outcomes, and lessons to local SQLite memory without overwriting prior history. Retries stay idempotent via request keys.

Instructions

Append explicit records; never overwrite history. request_key makes retries idempotent. Operations: sync (optional limit, offset) refreshes previously selected Markdown; start (title, objective, task_type, criterion, subject); document (absolute path; omit subject to retain its existing subject, otherwise a new document defaults to general; optional review_after) captures local Markdown verbatim; source (source_key, title, summary, body, origin, subject, optional review_after); record (episode_id, kind, payload, expected_version, actor, evidence, optional decision_id, supersedes, links); reconcile (receipt_id, resolution, reason, evidence). approve_requirements appends an explicitly approved direction revision (requirements, reason, actor, evidence, expected_version); read direction first. Record payload fields are available through memory_get schema. Decisions require evidence, uncertainty and alternatives; session_id binds the decision to subsequent actual tools. Lessons remain proposed until a separate lesson_review. receipt_ids attaches mechanical host evidence; it cannot supply missing interpretation. plan and sprint create an episode and its plan atomically or revise an existing plan at expected_version; read their schema first. A plan preserves scope and next action; it does not prove execution or authorise host tools. checkpoint explicitly assesses observed prompt IDs; read schema id checkpoint. Bundle it as data.checkpoint on a plan or record write to avoid another call. review requests a bounded read-only host check (episode_id, role outcome/intent/recovery, optional retry). Complete outcomes start a check when configured; Done requires its current pass. Wait without repeated model calls using project-memory review --wait CHECK_ID.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYes
operationYes
session_idNo
receipt_idsNo
request_keyYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.5.0-beta.8
    • addedInput schema / properties / data / properties / subject / description
      Added value: +"For document refresh, omit this field to retain the recorded subject."
    • changedInput schema / properties / operation / enum
      Previous value: -[
      -  "start",
      -  "source",
      -  "document",
      -  "record",
      -  "reconcile",
      -  "approve_requirements"
      -]New value: +[
      +  "start",
      +  "source",
      +  "document",
      +  "record",
      +  "reconcile",
      +  "approve_requirements",
      +  "sync",
      +  "plan",
      +  "sprint",
      +  "review",
      +  "checkpoint"
      +]
  2. First observedv0.5.0-beta.1

TDQS

A4.2/5.0
Behavior4/5

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

The description adds substantial behavioral context beyond the annotations: the append-only invariant, idempotency of request_key (consistent with idempotentHint=true), 'Lessons remain proposed until a separate lesson_review', 'A plan preserves scope and next action; it does not prove execution or authorise host tools', and 'receipt_ids attaches mechanical host evidence; it cannot supply missing interpretation'. These are genuine disclosures an agent needs that the annotations do not carry. No contradiction with annotations found.

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 description is a single dense wall of text covering 11 operations with no bullets, headers, or grouping. Every sentence carries information, and the core invariant is front-loaded, but the lack of structure makes it significantly harder to parse than it should be for a tool of this complexity. It is verbose rather than concise.

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 tool with 11 operations, nested payload objects, and no output schema, the description attempts to cover every operation with its key constraints and preconditions. It is reasonably complete — an agent has enough to call each operation correctly. The completeness is limited only by the readability problems noted above, not by missing information.

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?

With 0% schema description coverage, the description must compensate for parameter meaning, and it does so substantially through operation prose: it explains expected_version (optimistic concurrency), the subject-omission rule for document refresh, absolute path requirement, that session_id binds the decision to subsequent tools, and the role of request_key. The main weakness is that this meaning is embedded in a dense prose block rather than mapped parameter-by-parameter, making it harder for an agent to retrieve.

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 'Append explicit records; never overwrite history' states a specific verb, resource, and invariant with total clarity. The tool is implicitly differentiated from the read-oriented siblings memory_get and memory_context, and the enumerated operations (sync, start, document, source, record, reconcile, etc.) leave no doubt about what the tool does.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit when-to-use guidance throughout: 'read direction first' for approve_requirements, 'read their schema first' for plan/sprint, 'read schema id checkpoint' for checkpoint, and advice to bundle checkpoint as data.checkpoint to avoid an extra call. It also tells the agent to wait using 'project-memory review --wait CHECK_ID' rather than polling. It lacks an explicit statement of when NOT to use this tool in favor of a sibling, though the read/write split with memory_get is strongly implied.

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

Deploy Server

Other Tools