Skip to main content
Glama

Write memory

write_memory
DestructiveIdempotent

Create or update a playbook memory entry by key, preserving prior versions for history. Optionally set timestamp, archive, tier, or propose changes for review.

Instructions

Create or update a memory by key; previous contents are saved automatically and readable with get_memory_history. memory_at is optional and defaults to this save's time; supply an ISO timestamp to preserve an earlier time. is_archived=true hides the entry from normal search/context; false restores it. Tier controls context priority independently of archiving. Requires memory:write or full permission; with memory:propose the write is saved as a proposal (status pending_review) that changes nothing until the owner or an editor approves it. Pass playbook_id as the UUID or GUID of the playbook this call should target.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYesMemory key
tagsNoTags for categorization
tierNoMemory tier (default: contextual)
valueYesJSON value to store
statusNoTask status (for hierarchical task tracking)
summaryNoCompact summary for context views
metadataNoFree-form metadata: dependencies, thread assignment, progress. Two keys have a defined shape and are validated: metadata.episode as {location, task, outcome} makes the entry findable by where through get_memory_context, while when it happened is memory_at; and metadata.recording holds demonstration references in the same shape a skill uses, as a list of {provider, ref, fidelity, role, segments}. Everything else is stored untouched.
priorityNoPriority 1-100 (default: 50)
memory_atNoMemory time including timezone; defaults to save time
parent_keyNoParent memory key for hierarchical organization
descriptionNoHuman-readable description
is_archivedNoHide from normal search; false restores an archived entry
memory_typeNoflat (default) or hierarchical for task graphs
playbook_idYesUUID or GUID of the target playbook

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already declare the write/idempotent/destructive profile, and the description adds substantial context beyond them: automatic versioning readable via get_memory_history, the memory:write vs memory:propose permission model, and that a proposal stays pending_review and changes nothing until approved. This is exactly the extra behavioral detail an agent needs for a mutating tool.

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 verb+resource and versioning behavior, then param and permission details. Mostly every sentence earns its place, though the is_archived clause largely repeats the schema description and the final playbook_id sentence restates the schema's UUID/GUID wording.

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?

Covers the complex parts well for a 14-param tool: auth/permission model, versioning, proposal workflow, and archiving. With no output schema, it stops short of saying what the call returns (e.g., the stored key or entry), which is the remaining gap.

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: memory_at defaults to save time and accepts an ISO timestamp to backdate, is_archived toggles visibility, and tier controls context priority independently of archiving. These clarify interactions between parameters rather than restating schema text.

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?

States a specific verb+resource ('Create or update a memory by key') and immediately distinguishes it from the read side by naming get_memory_history for version history. An agent can tell it apart from read_memory, delete_memory, and archive_memories without opening a schema.

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?

Gives clear conditional context: is_archived for hiding/restoring, memory:propose for proposal-mode writes, and playbook_id for targeting. However it never explicitly routes between the sibling mutation tools (archive_memories, promote_memory, consolidate_memories), leaving that comparison to inference.

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