Skip to main content
Glama

memory_write

Store and manage memory items with automatic contradiction detection and embedding support for semantic search. New content supersedes conflicting memories of same type and title.

Instructions

Creates a MemoryItem and optionally embeds it for semantic search. Contradiction detection is automatic — if new content conflicts with an existing memory of the same type/title, the old one is superseded. Use type='auto' to let the LLM decide the best category.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeYes
embedNo
scopeNoagent
titleNo
sourceNoagent
contentYes
user_idNo
variantNo
agent_idNo
databaseNo
metadataNo{}
model_idNo
valid_toNo
embed_textNo
importanceNo
refresh_onNo
valid_fromNo
change_agentNo
auto_classifyNo
refresh_reasonNo
conversation_idNo
Behavior3/5

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

With no annotations, the description bears the full burden of disclosure. It explains automatic contradiction detection and superseding, and optional embedding. However, it omits details about required permissions, rate limits, or the behavior of the many default parameters, which limits transparency.

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 sentences long, front-loading the core action and key features. Every sentence adds value with no redundancy or fluff.

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

Completeness2/5

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

Despite the tool having 21 parameters and no output schema or parameter descriptions, the description only covers the basic creation and automatic superseding. It fails to explain what a MemoryItem is, the return value, or how to use the many parameters, leaving significant gaps for an agent.

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

Parameters1/5

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

Schema description coverage is 0%, and the description only mentions the 'type' parameter (and hints at 'content' via context). None of the other 19 parameters (e.g., scope, importance, metadata) are explained, making it impossible for an agent to use them correctly without external knowledge.

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 clearly states that the tool creates a MemoryItem and optionally embeds it for semantic search. It also mentions automatic contradiction detection and superseding old memories. This distinguishes it from sibling tools like memory_get and memory_search, which are for retrieval, and memory_supersede for explicit superseding.

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?

The description provides guidance on when to use the tool (to create a memory) and suggests using type='auto' for automatic categorization. However, it does not explicitly state when not to use it or mention alternatives like memory_supersede for manual control, leaving some ambiguity.

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/skynetcmd/m3-memory'

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