Skip to main content
Glama

Write a memory file

memory_write
DestructiveIdempotent

Create or replace one UTF-8 text file in private agent memory. Use an optional ETag check to prevent overwriting a file that changed since it was read.

Instructions

Create or replace one file in your memory (UTF-8 text, up to 10 MB). Paths are plain segments of letters, digits, _ . - separated by '/'. journal/ is not writable here: use journal_append.

Input Schema

NameRequiredDescriptionDefault
pathYese.g. 'projects/keephaven.md'
contentYesthe whole new content of the file
if_matchNoetag from memory_read; the write fails if the file changed since

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare idempotentHint=true and destructiveHint=true, so the safety profile is covered, and 'create or replace' is consistent with it. The description adds real constraints beyond annotations: UTF-8 text, 10 MB cap, and the journal/ write restriction. It does not say whether intermediate directories are created or what the call returns (e.g. an etag for later if_match).

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?

Three short sentences, front-loaded with the action and scope, then size/type limits, then the sibling exclusion. Every clause carries information the agent needs; nothing is redundant with the title.

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?

With no output schema, the description avoids needing to explain return values, and it covers the write scope, size limit, path syntax, and the journal carve-out. The remaining gap is that it never hints at what a successful write returns, which matters because if_match depends on an etag from memory_read.

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 already 100%, so the baseline is 3. The description still earns a bump by specifying path construction rules (allowed characters and '/' separation) that the schema only illustrates with an example. It adds nothing on if_match, which the schema already explains.

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 file in your memory') and immediately bounds it to a single file. It also names the sibling it is not (journal_append) and the condition that selects that sibling, so an agent can distinguish it without opening the 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?

Gives an explicit exclusion with the correct alternative: 'journal/ is not writable here: use journal_append.' That is clear routing guidance, but it only covers the journal case; there is no guidance on when to use memory_write versus memory_delete or on when concurrency control (if_match) matters.

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