Skip to main content
Glama

memory_update

Destructive

Update memory metadata (tags, type, custom fields) in place without recreating entries, preserving content, embeddings, and timestamps; create versioned updates for content changes.

Instructions

Update memory metadata without recreating the entire memory entry.

                This provides efficient metadata updates while preserving the original
                memory content, embeddings, and optionally timestamps.
                
                Examples:
                # Add tags to a memory
                {
                    "content_hash": "abc123...",
                    "updates": {
                        "tags": ["important", "reference", "new-tag"]
                    }
                }
                
                # Update memory type and custom metadata
                {
                    "content_hash": "abc123...",
                    "updates": {
                        "memory_type": "reminder",
                        "metadata": {
                            "priority": "high",
                            "due_date": "2024-01-15"
                        }
                    }
                }
                
                # Update custom fields directly
                {
                    "content_hash": "abc123...",
                    "updates": {
                        "priority": "urgent",
                        "status": "active"
                    }
                }

                # Create a new version with updated content (sqlite_vec and milvus)
                {
                    "content_hash": "abc123...",
                    "updates": {
                        "content": "Corrected memory content",
                        "reason": "Fix outdated command"
                    },
                    "versioned": true
                }

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": {
      "content_hash": "<content_hash>",
      "updates": "<updates>"
    },
    "name": "memory_update"
  }
}

Input Schema

NameRequiredDescriptionDefault
updatesYesDictionary of fields to update. With versioned=true only content, tags, memory_type and reason take effect.
versionedNoWhen true, creates a new memory version instead of overwriting and marks the old one as superseded. Requires content in updates. Supported backends: sqlite_vec, milvus. Unsupported backends return an error.
content_hashYesThe content hash of the memory to update.
preserve_timestampsNoIn-place updates only. When true (default), the original created_at is kept. When false, created_at/updated_at may be supplied via updates. Ignored with versioned=true.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.0.1

TDQS

A4.4/5.0
Behavior4/5

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

Annotations only supply destructiveHint=true, so the description carries most of the burden and does well: it explains that versioned=true supersedes the old version, that only certain fields take effect in that mode, that unsupported backends (everything except sqlite_vec and milvus) error out, and how metadata is merged versus inherited. It stops short of describing the response or what happens to embeddings on a versioned update.

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?

Purpose and preservation guarantee are front-loaded, then each example illustrates a genuinely distinct mode rather than repeating itself. It runs long, and the 'Update custom fields directly' example overlaps with the metadata example, which is the one place a sentence could be cut.

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?

For a 4-parameter, nested-object mutation with no output schema, the definition covers the safety-relevant behavior (superseding, backend support, field applicability per mode) that an agent needs before calling it. Nothing critical about invocation correctness is missing.

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 would be 3, but the examples add real meaning beyond the schema by showing composed payloads (array vs comma-separated tags, metadata merge, direct custom fields alongside versioned content). The description still doesn't restate the versioned/in-place field-dropping rule, leaving that to the schema.

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 opening sentence gives a specific verb and resource ('Update memory metadata') and immediately scopes it against the obvious alternative ('without recreating the entire memory entry'), plus states what is preserved: content, embeddings, optionally timestamps. An agent can distinguish this from memory_store 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?

The four examples clearly delineate the modes: tag replacement, type/metadata updates, direct custom-field updates, and versioned content changes with a reason. That is strong when-to-use guidance, but it never states when NOT to use this tool (e.g. when memory_delete or memory_store is more appropriate).

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