Skip to main content
Glama

Edit note

bm_edit
Destructive

Edit existing Basic Memory notes by appending, prepending, replacing text or sections, and merging frontmatter metadata; use checksums to avoid overwriting a newer revision.

Instructions

Change part of an existing Basic Memory note. command: append or prepend content; find_replace find_text with content (exact text, which must occur expected_replacements times, default 1); replace_section, insert_before_section or insert_after_section for a section heading ('Decisions', 'Auth/Decisions', 'Decisions[1]', as bm_read takes it); set_metadata to merge metadata into the frontmatter without touching the body. metadata also merges with any other command. Pass expected_checksum (from bm_read) to edit only the revision you read. A missing note is an error; create notes with bm_write.

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": {
      "identifier": "<identifier>",
      "command": "<command>",
      "project": "<project>"
    },
    "name": "bm_edit"
  }
}

Input Schema

NameRequiredDescriptionDefault
commandYesThe edit.
contentNoThe text to add or the replacement. Not used by set_metadata.
projectYesRequired project name, 'workspace/project', or project external id. Discover projects with bm_project(command='list'). Paths are relative to this project; a qualified path must agree with it.
sectionNoThe heading for section commands: "Decisions", "Auth/Decisions" for one under "Auth", or "Decisions[1]" for the second of two.
metadataNoFrontmatter fields to set; other fields are kept.
find_textNoFor find_replace: the exact, case-sensitive text to replace.
identifierYesThe note or file: a file path ('notes/plan.md'), permalink, memory:// URL, exact title, external id, or '<project>/path'.
output_formatNotext
expected_checksumNoEdit only while the note is still this revision (from bm_read).
replace_subsectionsNoFor replace_section: true replaces the section's subsections too; false stops at the first subsection heading.
expected_replacementsNoFor find_replace: how many times find_text must occur.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changed
    • removedInput schema / properties / project / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / properties / project / default
      Removed value: -null
    • changedInput schema / properties / project / description
      Previous value: -"Project name, 'workspace/project', or project external id. Omit to use the default project."New value: +"Required project name, 'workspace/project', or project external id. Discover projects with bm_project(command='list'). Paths are relative to this project; a qualified path must agree with it."
    • addedInput schema / properties / project / minLength
      Added value: +1
    • addedInput schema / properties / project / type
      Added value: +"string"
    • changedInput schema / required
      Previous value: -[
      -  "identifier",
      -  "command"
      -]New value: +[
      +  "identifier",
      +  "command",
      +  "project"
      +]
    • changedOutput schema / properties / result / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": true,
      -    "type": "object"
      -  },
      -  {
      -    "type": "string"
      -  }
      -]New value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "additionalProperties": true,
      +    "type": "object"
      +  }
      +]
  2. Addedv0.24.1

TDQS

A4.6/5.0
Behavior4/5

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

Goes beyond the destructiveHint=true / idempotentHint=false annotations by disclosing that set_metadata and metadata merge rather than overwrite ('without touching the body'), that find_replace fails unless find_text occurs expected_replacements times, and that expected_checksum enables revision-guarded edits. It does not spell out irreversibility or that replaced section content is destroyed, which is the remaining gap given the destructive flag.

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?

Front-loads the core action, then groups per-command semantics and the safety/error clauses in a single dense paragraph. Nearly every clause carries distinct information; there is no 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 an 11-parameter mutation tool with an output schema (so return values need no explanation) and annotations covering the safety profile, the description covers command selection, concurrency, and the missing-note error. Minor omissions remain, such as content being unused by set_metadata as an explicit precondition or what a section command does when the heading is absent.

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 91%, so the baseline is 3; the description still adds value by tying each parameter to its command and by stating a rule the schema does not — that 'metadata also merges with any other command.' The section-heading syntax and expected_replacements default largely restate the schema text.

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+scope: 'Change part of an existing Basic Memory note.' It explicitly carves out the sibling boundary by stating 'A missing note is an error; create notes with bm_write,' so an agent can separate edit from create without opening either schema.

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?

Enumerates every command with the condition that selects it (append/prepend content, find_replace with expected_replacements, section commands for a heading, set_metadata for frontmatter only) plus the alternative tool for the create case. It also states the failure mode when the note does not exist, which is the main when-not.

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