Skip to main content
Glama

memory_update

Destructive

Updates an existing memory entry by ID, applying only the fields you change, recording an audit snapshot, and checking the expected version to avoid overwriting concurrent edits.

Instructions

更新一条记忆(只传需要修改的字段;HTTP 模式必须传 project);用户级记忆可从任意项目视图按 id 更新。修改会记录审计快照;内容失效优先用 memory_archive 归档而不是删除。

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

Input Schema

NameRequiredDescriptionDefault
idYes
kindNo
tagsNo
scopeNo跨作用域迁移:user=移入用户级 / project=上提为项目通用 / device=限定本设备 / agent=限定本工具
titleNo
pinnedNo
statusNo
contentNo
projectNo项目名或 id。省略时从当前工作目录自动解析
evidenceNo证据链:这条结论从哪来的(最多 12 条)。有外部事实依据时务必填写,日后别人能据此复核
topic_keyNo
importanceNo
expected_versionNo乐观并发:传你读到的 memory.version。若期间已被别人修改,报 REVISION_CONFLICT(附当前版本),避免用旧内容覆盖并发改动

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.4

TDQS

A3.9/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false and destructiveHint=true, so the mutation risk is disclosed structurally. The description adds genuinely new behavior: an audit snapshot is recorded on every modification, and HTTP-mode calls have an extra required field. It does not repeat that this is a mutation, and the archive-over-delete advice is a useful mitigation of the destructive hint rather than a contradiction of it. Return shape and conflict behavior are left to the schema.

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 compact sentences, each carrying distinct information: update semantics, scope/project rules, and side effects plus the archive alternative. The most load-bearing constraint (partial fields, HTTP-mode project) is front-loaded in parentheses with zero filler.

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?

For a 13-parameter mutation tool with no output schema, the description covers the operation's scope, the conditional required field, the audit-snapshot side effect, and the preferred alternative for retiring content. Concurrency handling is left entirely to the expected_version schema entry, which is acceptable since that field is well documented in the schema. A note on what happens to unspecified fields would make it complete.

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 description coverage is only 31% across 13 parameters, so the description must carry weight, and it does for the two most error-prone ones: it clarifies that only changed fields need to be passed (the schema marks just id as required) and that project becomes mandatory in HTTP mode despite the schema saying it is auto-resolved from the working directory. The remaining fields (kind, tags, status, topic_key, importance) get no added meaning, leaving a real 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?

The description states a specific verb and resource ("更新一条记忆") and immediately adds the partial-update semantics that characterize the operation. The closing clause routes the agent to memory_archive for invalid content, which further separates this tool from a create/archive sibling. It stops short of contrasting with memory_write, the closest sibling, so it 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 Guidelines4/5

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

It gives concrete when-to-use rules: pass only the fields being changed, pass project when in HTTP mode, and user-level memories can be updated by id from any project view. It also names an explicit alternative with its condition ("内容失效优先用 memory_archive 归档而不是删除"). No explicit when-not-to-use case against memory_write or status change exists, so it falls just short of the top band.

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