Skip to main content
Glama

memory_write

Idempotent

Append explicit project records—decisions, evidence, outcomes, plans, and reviewed lessons—to Project Memory's local SQLite history. Append-only writes preserve prior entries, and request keys make retries idempotent.

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. progress updates state or next_action with a reason and expected_version while preserving scope and evidence; use plan only for an intentional plan revision. 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. skill_import stores a package without activation. skill_selection and map require actor and evidence; agent-authored changes remain proposed. Read their schema first.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYes
operationYes
session_idNo
receipt_idsNo
request_keyYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.5.0-beta.9
    • changedInput schema / properties / operation / enum
      Previous value: -[
      -  "start",
      -  "source",
      -  "document",
      -  "record",
      -  "reconcile",
      -  "approve_requirements",
      -  "sync",
      -  "plan",
      -  "sprint",
      -  "review",
      -  "checkpoint"
      -]New value: +[
      +  "start",
      +  "source",
      +  "document",
      +  "record",
      +  "reconcile",
      +  "approve_requirements",
      +  "sync",
      +  "plan",
      +  "sprint",
      +  "review",
      +  "progress",
      +  "checkpoint",
      +  "skill_import",
      +  "skill_selection",
      +  "map"
      +]
  2. First observed

TDQS

A3.9/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: append-only semantics ('never overwrite history'), idempotency via request_key, the fact that lessons remain proposed until a separate lesson_review, that receipt_ids only supply mechanical host evidence and cannot supply interpretation, and that plan does not prove execution or authorize host tools. The annotations already declare idempotentHint=true and destructiveHint=false, and the description reinforces and elaborates these traits rather than contradicting them.

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 information-dense and front-loaded with the most important invariant ('Append explicit records; never overwrite history'), but it is a long single paragraph covering 15 operations. Every sentence adds information, yet the lack of structure (no bullets or per-operation separation) makes it harder for an agent to parse quickly. It is appropriately sized for the complexity but poorly structured.

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?

Given the tool's complexity (15 operations, nested data object, no output schema), the description covers the key behavioral contracts: idempotency, append-only semantics, expected_version usage, decision evidence requirements, and the plan/sprint atomicity. It does not describe return values, but there is no output schema and the description's focus on preconditions and side effects is the more critical information for an agent deciding to call this 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 description coverage is 0%, so the description carries the full burden of explaining parameters. It explains request_key's idempotency role, the meaning of subject omission for document, expected_version for optimistic concurrency, and the payload requirements for decisions (uncertainty, alternatives). It does not explain every parameter (e.g., session_id, receipt_ids are only partially covered), but for a 5-parameter tool with nested objects, the description compensates well.

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?

The description opens with a clear verb and resource ('Append explicit records; never overwrite history') and enumerates the distinct operations (sync, start, document, source, record, reconcile, etc.), which distinguishes it from the read-oriented siblings memory_get and memory_context. However, the description is a dense list of many operations rather than a single crisp statement, so it is clear but not maximally focused.

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 gives explicit when-to-use guidance for several operations: 'use plan only for an intentional plan revision', 'read direction first' for approve_requirements, 'read their schema first' for plan/sprint and skill_selection/map, and 'Bundle it as data.checkpoint on a plan or record write to avoid another call.' It does not systematically state when to avoid memory_write in favor of memory_get or memory_context, but the read/write distinction is implied by the append-only framing and sibling names.

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