Skip to main content
Glama

Replace a note

memory_replace

Retire outdated notes by replacing them with a newer note while keeping the old ones recoverable. Preview the change, confirm with a single-use code, or undo a replacement.

Instructions

Retire outdated notes in favour of a newer one; they stay recoverable. Three actions. preview (old_ids, plus new_id or new_title and new_body): changes nothing and returns a warning and a code; show the warning to the person and wait for yes. confirm: pass that code with the same new_* values; the code works once, expires, and fails if any note changed since the preview. undo (id): bring a replaced note back. To change one note's text, use memory_save with id.

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": {
      "action": "<action>"
    },
    "name": "memory_replace"
  }
}

Input Schema

NameRequiredDescriptionDefault
idNoundo: the replaced note.
codeNoconfirm: the single-use code the preview returned.
actionYespreview, confirm or undo.
new_idNoAn existing note that takes their place. Or give new_title and new_body to create one instead.
old_idsNoIds of the out-of-date notes.
new_bodyNoText of that new note.
new_titleNoTitle of a new note to create in their place.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv1.7.0
    • addedInput schema / properties / action / description
      Added value: +"preview, confirm or undo."
    • addedInput schema / properties / code / description
      Added value: +"confirm: the single-use code the preview returned."
    • addedInput schema / properties / new_body / description
      Added value: +"Text of that new note."
    • changedInput schema / properties / new_id / description
      Previous value: -"An existing note that takes their place."New value: +"An existing note that takes their place. Or give new_title and new_body to create one instead."
    • addedInput schema / properties / new_title / description
      Added value: +"Title of a new note to create in their place."
    • addedInput schema / properties / old_ids / description
      Added value: +"Ids of the out-of-date notes."
  2. Addedv1.6.0

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so: preview is side-effect free, returns a warning plus a single-use code that expires and is invalidated if any note changed in the interim, effects are reversible via undo, and the agent must surface the warning and wait for a human yes. These are exactly the non-obvious behaviors an agent could not infer from 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?

The purpose and the recoverability guarantee are front-loaded, and the remainder is a tight action-by-action breakdown with no filler. The telegraphic fragments in the parentheticals trade grammar for density without losing meaning.

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 seven-parameter mutation tool with no annotations and no output schema, the description covers the decision-critical behavior and the human-in-the-loop gate. It leaves minor gaps: what confirm and undo return, and how long the code actually lives before expiring.

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 per-field meanings are already documented and the baseline is 3. The description goes beyond the schema by mapping parameters to actions (old_ids plus new_id or new_title+new_body for preview; code with the same new_* values for confirm; id for undo), which is the cross-parameter constraint the schema cannot express.

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 first clause states a specific verb and resource ('Retire outdated notes in favour of a newer one') plus the key property that they stay recoverable, then names the three actions. It also explicitly distinguishes itself from a sibling: 'To change one note's text, use memory_save with id.'

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?

Each of the three actions carries its own triggering condition and parameter set, and the preview→confirm→undo sequence is spelled out as a workflow. The exclusion for simple text edits routes the agent to memory_save, so both when-to-use and when-not-to-use are covered.

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