Skip to main content
Glama

memory_edit

Idempotent

Edit a memory. Provide only what changes; omitted fields untouched.

Modes:

  1. Content replace (content [+topics/macro_topics]): full rewrite, re-embeds. Do it the instant the user corrects a memory ("actually...").

  2. Metadata patch (topics/type/expiry, no content): type/expiry alone do not re-embed, a topics or macro_topics change always does (in every mode -- the topic prefix is stored as part of the passage). To add or drop one tag use add_topics/remove_topics (add_macro_topics/remove_macro_topics); topics/macro_topics replace the whole list.

  3. Task surgery: toggle=[0,2] flips checkboxes; set_status pending/active/blocked/review/done ("done" -> task_done); set_summary replaces "## Summary"; add_steps/remove_steps/edit_step. Step-op indices are pre-call state.

  4. Output capture (output): attach a durable finding. Atomic, front-loaded, same quality as memory_add. GOOD "OAuth2 callback uses PKCE S256 -- prevents code interception without client secret" BAD "looked at the code, found interesting auth stuff" Over-length is rejected, not truncated. Many findings -> memory_add directly.

Combine rules: content combines ONLY with set_status (its sole partner) toggle + set_status + set_summary + step-ops set_status + toggle + set_summary + step-ops + content set_summary + toggle + set_status + step-ops step-ops + toggle + set_status + set_summary output attaches to any toggle/set_status update

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": {
      "memory_id": "<memory_id>"
    },
    "name": "memory_edit"
  }
}

Input Schema

NameRequiredDescriptionDefault
refNoParent task/ticket id -> merged into topics. e.g. "a1b2c3d4".
typeNoNew type: fact/preference/decision/path/task/task_done/result
outputNoDurable finding on this update -> linked fact memory (inherits task topics). Atomic, front-loaded. Over-length rejected. Many findings -> memory_add.
signalNoAlso signal recipient (email, agent, "owner") with this memory_id. Needs a SHARED collection ("me"/personal rejected).
toggleNo0-based checkbox indices to flip. e.g. [0,2]. See Combine rules.
topicsNoNew topics (REPLACES all). Search words, lowercase.
contentNoNew memory text — plain prose only, never a serialized object (re-embeds). topics, macro_topics and type are separate parameters; put them there, never inside this text.
artifactNoCommit SHA or filename -> merged into topics. e.g. "f4e5d6c".
add_stepsNoAppend checklist items (milestones). Re-embeds.
edit_stepNoRewrite a step's text, preserving checkbox state. Re-embeds.
ephemeralNoSet time-bound (auto-expires in 90 days)
memory_idYesID of memory to edit
add_topicsNoTopics to add; the rest stay.
collectionNoCollection for signal routing (only with signal param).
expires_atNoYYYY-MM-DD, or "never". Overrides ephemeral.
set_statusNoTask status. "done" auto-sets type=task_done (reverting reverts); type follows status. See Combine rules.
set_summaryNoReplace the task's "## Summary" block ("" clears). Re-embeds. Not type="summary" (that is memory_consolidate).
macro_topicsNoNew macro_topics (REPLACES all). 1-3 lowercase.
remove_stepsNoRemove steps by 0-based index (pre-call state). Re-embeds.
remove_topicsNoTopics to drop; the rest stay. At least one must remain.
add_macro_topicsNomacro_topics to add; the rest stay.
remove_macro_topicsNomacro_topics to drop; the rest stay.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare idempotent/non-destructive, so the description earns credit for adding real behavior: which operations trigger re-embedding (and that a topics change re-embeds in every mode, because the topic prefix lives in the passage), that "done" auto-mutates type and reverting reverts it, that step indices are pre-call state, and that over-length output is rejected rather than truncated.

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?

Front-loaded with the patch rule, then cleanly sectioned into Modes and Combine rules, with a useful GOOD/BAD example for output quality. The combine rules are restated five times (once per participating field) instead of as a single matrix, which is mild redundancy but aids lookup rather than hurting it.

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 22-parameter mutating tool with a nested edit_step object and no output schema, the description covers mode selection, legal field combinations, re-embed side effects, and failure behavior (over-length rejection). The only omission is the response payload, and with no output schema declared that is not a blocking gap.

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 is 3; the description goes past it by supplying the mode groupings and the combine-rules matrix, which tells the agent which of the 22 parameters may legally coexist in one call — information absent from the schema. It does not restate each parameter's syntax, but it does not need to.

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?

Opens with a specific verb+resource ("Edit a memory") and immediately pins the patch semantics: "Provide only what changes; omitted fields untouched." It also routes away from siblings by naming memory_add for bulk findings and distinguishing tag-append (add_topics) from list replacement (topics).

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

Usage Guidelines5/5

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

Four numbered modes give explicit when-to-use triggers, including a strong one ("Do it the instant the user corrects a memory"). It also states when NOT to use this path ("To add or drop one tag use add_topics/remove_topics"; "Many findings -> memory_add directly"), which is exactly the routing guidance an agent needs.

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