Skip to main content
Glama

Write a memory node

memory_write

Persist facts, decisions, or session state as a memory node in the multi-graph store. Select episodic, semantic, or procedural level and attach entities or causal edges for structured recall.

Instructions

Insert one node into the multi-graph memory store (episodic/semantic/procedural) and optionally add causal or entity edges. Use to remember facts, decisions, or session state the host should own. Do not use for reusable task plans — that is plan_cache_put. Mutating and not idempotent: each call creates a new item_id. Gated by plan quota. Nodes with importance >= 0.8 are what memory_consolidate later promotes. Auth: tool policy gate; no network I/O.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
levelNoMemory level: episodic, semantic, or procedural. Default episodic.episodic
contentYesPlaintext body stored as the memory node.
agent_idNoOptional agent owner used for later filtered reads.
entitiesNoEntity names to index. If omitted, capitalized tokens are extracted.
metadataNoOptional JSON metadata attached to the node.
importanceNoSalience 0–1. Values >= 0.8 are eligible for memory_consolidate.
session_idNoOptional session scope used for later filtered reads.
causal_parentNoExisting node id to link as a causal parent.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed8 schema fields changedv0.5.0
    • addedInput schema / properties / agent_id / description
      Added value: +"Optional agent owner used for later filtered reads."
    • addedInput schema / properties / causal_parent / description
      Added value: +"Existing node id to link as a causal parent."
    • addedInput schema / properties / content / description
      Added value: +"Plaintext body stored as the memory node."
    • addedInput schema / properties / entities / description
      Added value: +"Entity names to index. If omitted, capitalized tokens are extracted."
    • addedInput schema / properties / importance / description
      Added value: +"Salience 0–1. Values >= 0.8 are eligible for memory_consolidate."
    • addedInput schema / properties / level / description
      Added value: +"Memory level: episodic, semantic, or procedural. Default episodic."
    • addedInput schema / properties / metadata / description
      Added value: +"Optional JSON metadata attached to the node."
    • addedInput schema / properties / session_id / description
      Added value: +"Optional session scope used for later filtered reads."
  2. First observedv0.4.0

TDQS

A4.9/5.0
Behavior5/5

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

Even though annotations already mark readOnly=false and idempotent=false, the description adds 'Mutating and not idempotent: each call creates a new item_id', 'Gated by plan quota', and the consolidation threshold for importance >= 0.8. It also discloses auth via tool policy gate and no network I/O, going beyond what annotations convey.

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?

The description is dense but every sentence adds information: operation, use case, exclusion, idempotency, quota, importance threshold, and auth/network behavior. It is front-loaded with the core action and there is no redundant padding.

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

Completeness5/5

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

For a mutation tool with 8 parameters and an output schema, the description covers purpose, use vs alternatives, side effects, quotas, auth, and downstream consolidation behavior. Nothing an agent needs to decide whether and how to call it is left out.

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. The description adds value by framing entities and causal_parent as 'edges' and by explaining that importance >= 0.8 nodes are later promoted by memory_consolidate, which gives parameters behavioral meaning beyond their schema descriptions.

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?

Description opens with a specific verb+resource: 'Insert one node into the multi-graph memory store' and clarifies the memory types (episodic/semantic/procedural) and optional edges. It distinguishes itself from siblings by explicitly not being plan_cache_put and by context of remembering facts/decisions/session state.

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

Usage Guidelines5/5

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

States exactly when to use ('Use to remember facts, decisions, or session state the host should own') and when not to ('Do not use for reusable task plans'), naming plan_cache_put as the alternative. This gives an agent an unambiguous selection rule.

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