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. 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.9/5.0
Behavior5/5

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

Goes well beyond the annotations: states that replacement overwrites the entire text, that prior versions remain restorable from file history, that missing folders are auto-created, that new files under a team folder are scoped to that team, and that ifMatch causes refusal on stale reads. Annotations already flag destructive/idempotent, and the description supplies the operational consequences.

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?

Dense but every sentence carries a distinct fact: scope, exclusion, overwrite consequence, folder creation, team scoping, concurrency, and return value. Overwrite semantics are front-loaded ahead of the secondary details.

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?

No output schema exists, and the description supplies the response shape ("Saved <path>"). For a destructive three-parameter write tool, the concurrency, recovery, and path-creation behaviors are all covered.

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 meaning by explaining that path folders need not exist and the team-folder creation rule, and by restating the ifMatch refusal condition in behavioral terms. No format or syntax detail beyond that, so not a 5.

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 and resource ("Create or replace one memory file with the full text given") and immediately scopes it against the append case. An agent can distinguish this from memory_append without opening either schema.

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?

Explicitly says when to use it (new file or complete rewrite) and when not to ("not for adding a few lines to the end of a file"), which implicitly routes the agent to the append sibling. Adds a conditional mode via ifMatch for concurrent-edit protection.

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