Skip to main content
Glama

Write a memory file

memory_write
DestructiveIdempotent

Create or replace one memory file with the full text given. Meant for a new file or a complete rewrite, not for adding a few lines to the end of a file. Replacing overwrites the whole text; recent versions stay restorable from the file's history in the dashboard. Folders in the path need not exist. A new file under a team's folder is created in that team. With ifMatch the write is refused when the file changed since it was read. When a note replaces an older one, add superseded_by: to the old file's frontmatter: search then lists it after the current one. Answers "Saved ". Docs: https://only-mcp.com/docs/what-is-onlymcp#what-sits-behind-the-one-address

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "path": "<path>",
      "content": "<content>"
    },
    "name": "memory_write"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesPath of the memory file.
contentYesThe full new content.
ifMatchNoThe updatedAt memory_read answered in _meta. The write is refused when the file changed since.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / ifMatch
      Added value: +{
      +  "description": "The updatedAt memory_read answered in _meta. The write is refused when the file changed since.",
      +  "type": "string"
      +}
  2. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already flag a destructive, idempotent, non-read-only write, and the description goes well beyond them: it warns that replacing overwrites the entire text, states prior versions remain restorable from the file's history, notes that missing folders in the path are created, describes team-folder attribution, and explains the ifMatch refusal condition. It even discloses the response text ("Saved <path>").

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?

The key constraint (full replacement, not append) is front-loaded and every sentence carries information. It is dense but slightly crowded, packing the superseded_by convention and a docs URL into the same paragraph as the core semantics.

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 destructive 3-parameter write with no output schema, the description covers overwrite scope, recoverability, path creation, concurrency safety, and the return value. Nothing an agent needs in order to call this correctly is missing.

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 real meaning: path implicitly creates missing folders and resolves team ownership, content must be the full text (not an edit), and ifMatch is tied to the updatedAt value returned by memory_read. That is more than the schema's one-line parameter notes.

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?

"Create or replace one memory file with the full text given" states a specific verb pair and resource, and the next sentence delimits it from the append-style sibling by describing the excluded behavior. An agent can distinguish this from memory_append/memory_read without opening another 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?

It explicitly says when to use it (a new file or a complete rewrite) and when not to (adding a few lines to the end of a file), plus a conditional usage rule for ifMatch and a convention for superseding an older note. It stops short of naming memory_append as the other tool, so the routing is functional rather than explicit.

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