Skip to main content
Glama

memory_write

Destructive

Create or modify permanent memory records by applying exact all-or-nothing edits or full replacements, with base revision checks to maintain consistency.

Instructions

Create or modify permanent memory. Summary is a stable one-line description of what a memory covers. Patch applies exact all-or-nothing edits; replace overwrites the complete summary and body. Existing memories require a current base revision.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYes
commitYes
memoryYes
changedYes
sync_statusYes
index_statusYes

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed4 schema fields changedv0.1.1
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / oneOf
      Added value: +[
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "action": {
      +        "const": "create"
      +      },
      +      "body": {
      +        "type": "string"
      +      },
      +      "project": {
      +        "type": "string"
      +      },
      +      "summary": {
      +        "type": "string"
      +      },
      +      "title": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "action",
      +      "title",
      +      "summary",
      +      "body"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "action": {
      +        "const": "patch"
      +      },
      +      "base_revision": {
      +        "type": "string"
      +      },
      +      "edits": {
      +        "items": {
      +          "additionalProperties": false,
      +          "properties": {
      +            "new_text": {
      +              "type": "string"
      +            },
      +            "old_text": {
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "old_text",
      +            "new_text"
      +          ],
      +          "type": "object"
      +        },
      +        "minItems": 1,
      +        "type": "array"
      +      },
      +      "memory_id": {
      +        "type": "string"
      +      },
      +      "summary": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "action",
      +      "memory_id",
      +      "base_revision",
      +      "edits"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "action": {
      +        "const": "replace"
      +      },
      +      "base_revision": {
      +        "type": "string"
      +      },
      +      "body": {
      +        "type": "string"
      +      },
      +      "memory_id": {
      +        "type": "string"
      +      },
      +      "summary": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "action",
      +      "memory_id",
      +      "base_revision",
      +      "summary",
      +      "body"
      +    ],
      +    "type": "object"
      +  }
      +]
    • removedInput schema / properties
      Removed value: -{
      -  "action": {
      -    "enum": [
      -      "create",
      -      "patch",
      -      "replace"
      -    ],
      -    "type": "string"
      -  },
      -  "base_revision": {
      -    "type": "string"
      -  },
      -  "body": {
      -    "type": "string"
      -  },
      -  "edits": {
      -    "items": {
      -      "additionalProperties": false,
      -      "properties": {
      -        "new_text": {
      -          "type": "string"
      -        },
      -        "old_text": {
      -          "type": "string"
      -        }
      -      },
      -      "required": [
      -        "old_text",
      -        "new_text"
      -      ],
      -      "type": "object"
      -    },
      -    "minItems": 1,
      -    "type": "array"
      -  },
      -  "memory_id": {
      -    "type": "string"
      -  },
      -  "project": {
      -    "type": "string"
      -  },
      -  "summary": {
      -    "type": "string"
      -  },
      -  "title": {
      -    "type": "string"
      -  }
      -}
    • removedInput schema / required
      Removed value: -[
      -  "action"
      -]
  2. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

Beyond the annotations (destructiveHint=true, readOnlyHint=false), the description discloses valuable behavioral details: patch is all-or-nothing, replace overwrites the complete summary/body, and existing memories require a current base revision, implying optimistic concurrency. This does not contradict any annotation.

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 three dense sentences with no filler. The purpose is front-loaded, and each sentence addresses a distinct aspect: overall behavior, summary semantics, and modifications semantics.

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?

The description covers the key operational facts an agent needs: the three modes, the summary convention, patch atomicity, and the base-revision requirement. Since an output schema exists, return-value details are not needed here. A minor gap is not pointing agents to memory_read to retrieve the current base revision.

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?

The description adds meaning beyond the schema by defining summary as a 'stable one-line description', explaining the exact semantics of patch and replace, and mentioning the base revision requirement. This is useful context that the bare schema types do not convey, though title and project are left to the schema.

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?

The description states a specific action ('Create or modify') on a clear resource ('permanent memory') and further differentiates the three operational modes: create, patch, and replace. This makes the tool unmistakably the write counterpart to memory_read and memory_delete.

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 description provides internal guidance on when to use patch vs replace and notes the base-revision prerequisite for modifying existing memories. However, it does not explicitly mention memory_read or memory_delete or state when to prefer this tool over those siblings.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/scarletkc/Perenna'

If you have feedback or need assistance with the MCP directory API, please join our Discord server