Skip to main content
Glama

Write memory

write_memory
DestructiveIdempotent

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. Changed1 schema field changed
    • changedInput schema / properties / metadata / description
      Previous value: -"Free-form metadata: dependencies, thread assignment, progress. Two keys have a defined shape and are validated: metadata.episode as {time, location, task, outcome} makes the entry findable by where and when through get_memory_context, where time is any ISO 8601 timestamp and is stored normalized to UTC; 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."New value: +"Free-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."
  2. Changed1 schema field changed
    • changedInput schema / properties / metadata / description
      Previous value: -"Graph metadata: dependencies, thread assignment, progress, etc."New value: +"Free-form metadata: dependencies, thread assignment, progress. Two keys have a defined shape and are validated: metadata.episode as {time, location, task, outcome} makes the entry findable by where and when through get_memory_context, where time is any ISO 8601 timestamp and is stored normalized to UTC; 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."
  3. Changed4 schema fields changed
    • addedInput schema / properties / is_archived
      Added value: +{
      +  "description": "Hide from normal search; false restores an archived entry",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / memory_at
      Added value: +{
      +  "description": "Memory time including timezone; defaults to save time",
      +  "format": "date-time",
      +  "type": "string"
      +}
    • changedInput schema / properties / value / description
      Previous value: -"Value to store"New value: +"JSON value to store"
    • removedInput schema / properties / value / type
      Removed value: -"object"
  4. Changed12 schema fields changed
    • changedInput schema / properties / description / description
      Previous value: -"Human-readable description of this memory"New value: +"Human-readable description"
    • changedInput schema / properties / key / description
      Previous value: -"Memory key (unique identifier)"New value: +"Memory key"
    • addedInput schema / properties / memory_type
      Added value: +{
      +  "description": "flat (default) or hierarchical for task graphs",
      +  "enum": [
      +    "flat",
      +    "hierarchical"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / metadata
      Added value: +{
      +  "description": "Graph metadata: dependencies, thread assignment, progress, etc.",
      +  "type": "object"
      +}
    • addedInput schema / properties / parent_key
      Added value: +{
      +  "description": "Parent memory key for hierarchical organization",
      +  "type": "string"
      +}
    • changedInput schema / properties / playbook_id / description
      Previous value: -"UUID of the playbook"New value: +"UUID or GUID of the target playbook"
    • addedInput schema / properties / priority
      Added value: +{
      +  "description": "Priority 1-100 (default: 50)",
      +  "type": "number"
      +}
    • addedInput schema / properties / status
      Added value: +{
      +  "description": "Task status (for hierarchical task tracking)",
      +  "enum": [
      +    "pending",
      +    "running",
      +    "completed",
      +    "failed",
      +    "blocked"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / summary
      Added value: +{
      +  "description": "Compact summary for context views",
      +  "type": "string"
      +}
    • changedInput schema / properties / tags / description
      Previous value: -"Tags for categorization and search"New value: +"Tags for categorization"
    • addedInput schema / properties / tier
      Added value: +{
      +  "description": "Memory tier (default: contextual)",
      +  "enum": [
      +    "working",
      +    "contextual",
      +    "longterm"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / properties / value / description
      Previous value: -"Value to store (any JSON object)"New value: +"Value to store"
  5. First observed

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.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.