Skip to main content
Glama

AgentPlaybooks

Write memory

write_memory
DestructiveIdempotent

Create or update a memory by key; previous contents are saved automatically and readable with get_memory_history.

Input 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 observed

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and idempotentHint=true; the description adds the crucial mitigating fact that previous contents are saved automatically and retrievable via get_memory_history. That materially changes how an agent should weigh the destructive hint, which is real value beyond structured fields.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single sentence that front-loads the upsert semantics and ends with the recovery path. Nothing is wasted and nothing is buried.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 14-parameter tool with nested metadata and no output schema, the description covers only the core upsert and history behavior. It says nothing about hierarchical task tracking, archiving/restoration, or tier semantics, leaving the schema to carry the entire burden.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the rich parameter set (tier, status, metadata, memory_type, is_archived, etc.) is fully documented in the schema. The description itself explains none of these semantics, so the baseline 3 applies.

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?

States a specific verb pair (create or update) plus the resource (memory) and the keying rule ('by key'). This clearly separates it from read_memory and search_memory, though it never names those siblings explicitly.

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

Usage Guidelines3/5

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

The upsert-by-key phrasing implies when to use it for writes, and pointing at get_memory_history gives one concrete follow-up alternative. There is no explicit guidance on when not to use it (e.g., vs update_persona or write_canvas) or on how to choose a tier.

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.

Resources