Skip to main content
Glama

Save memory

memory_upsert
Destructive

Creates a memory for one entity (person, project, decision, topic...) or updates the memory with the same title. Replacing the body of an existing memory by id requires mode "replace". Use when the user shares a durable fact worth keeping.

Input Schema

NameRequiredDescriptionDefault
idNoExisting memory id to update. Omit to create or update by title.
bodyNoMarkdown body with ## sections; [[Title]] links to other memories.
modeNoSet to "replace" to overwrite the body of an existing memory id.
tagsNo
typeYesMemory type, e.g. person, project, decision, topic.
brainNoBrain id or name. Defaults to the active brain.
linksNo
titleYesMemory title; one entity per memory.
trustNoWhere the fact comes from: user, source or inferred.
conceptNoTopic (concept) name.
shallowNo
confirmedNo
confidenceNo
subconceptNo
supersedesNo
externalRefsNoSource links for the facts in this memory.
userConfirmedNo
contradictionAckNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already declare readOnly=false and destructive=true, so the bar is lower. The description adds genuinely useful behavior beyond them: title-based dedup/merge, the requirement to set mode='replace' to overwrite an existing body by id, and the fact that replacement is destructive to the existing body.

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?

Three tight sentences with zero filler, and the core upsert/mode behavior is front-loaded. Slightly denser phrasing could have surfaced the create-vs-update distinction even faster, but it is efficient overall.

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?

For an 18-parameter mutation tool with no output schema and 50% param coverage, the description covers the essential upsert/replace mechanics but omits the meaning of many optional flags. An agent can call the happy path correctly, but not fully exploit the tool's capabilities from the description alone.

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 description coverage is 50%, so half of the 18 parameters are undocumented in both schema and description. The description clarifies the critical interplay of id, mode, and title, but leaves notable params (shallow, confirmed, userConfirmed, contradictionAck, supersedes) entirely unexplained. Baseline 3 is appropriate given it only partially compensates for the coverage gap.

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?

States a specific verb+resource ('Creates a memory for one entity... or updates the memory with the same title') and explains the upsert semantics precisely, including what identifies an existing memory (title, or id). It does not name sibling tools like memory_append or memory_archive to distinguish itself, so it falls short of a 5.

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

Usage Guidelines3/5

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

Provides a clear usage condition ('Use when the user shares a durable fact worth keeping'), which is real guidance. However it gives no when-not, no prerequisites, and does not route the agent to alternatives such as memory_append or memory_archive when the intent differs.

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