Skip to main content
Glama

write_memory

Persist validated Markdown memories to whitelisted files with atomic replacement and optional SHA-256 conflict checks, preventing stale or invalid notes across sessions.

Instructions

以模板校验、原子替换和可选哈希并发控制写入白名单 Markdown 记忆。

Input Schema

NameRequiredDescriptionDefault
nameYes
contentYes
allow_createNo
expected_sha256No

Output Schema

NameRequiredDescriptionDefault
okYes
dataYes
metaYes
errorNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

B3.2/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It does disclose meaningful behavior: writes are template-validated, atomic, restricted to a whitelist, and support optimistic concurrency via an optional hash. It does not say whether an existing entry is overwritten or destroyed, what happens on template/whitelist/hash failure, or whether permissions are needed.

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?

A single dense clause that front-loads the action and then lists the three mechanisms without filler. It is compact, though its density borders on cryptic for a non-Chinese-reading agent, and there is no second sentence clarifying the write target or failure behavior.

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

Completeness3/5

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

The output schema means return values do not need explanation, and atomicity/concurrency are covered. But for a mutation tool with no annotations and 0% schema coverage, the description leaves material gaps: what the template is, what counts as whitelisted, overwrite semantics, and the meaning of allow_create.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description must compensate for four undocumented parameters. It adds real meaning to expected_sha256 by framing it as optional hash-based concurrency control and implies that name is constrained by the whitelist and content by a template, but allow_create (default false, a significant gate) and the name/content format are not explained.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb (写入/write) plus the resource and scope (白名单 Markdown 记忆, whitelisted Markdown memory), and the mechanisms (template validation, atomic replacement, hash concurrency) make it clearly distinct from the read-only sibling read_memory. It stops short of naming read_memory or explaining how memory entries relate, so this is clear but not fully differentiated.

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

Usage Guidelines2/5

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

There is no guidance about when to use this tool versus read_memory, or when writing versus creating, and no stated prerequisites such as reading first and supplying expected_sha256. The whitelist mention implies a constraint on names, but no agent-oriented instructions for choosing this tool.

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