Skip to main content
Glama

Edit part of a hand-written note

brain_edit
Destructive

Modify part of an existing note by replacing exact text, swapping a section's content, or appending markdown, without rewriting the whole file.

Instructions

Change part of a note under Notes/ or Captures/ without rewriting it. Give exactly one of: old_text + new_text (old_text must occur exactly once; new_text may be empty), section + content (replaces everything under that heading up to the next heading of the same or higher level; the heading itself stays), or append. Generated notes and the memory file cannot be edited. The reply lists existing notes the new text names without linking.

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": {
      "note": "<note>"
    },
    "name": "brain_edit"
  }
}

Input Schema

NameRequiredDescriptionDefault
noteYesNote id (vault path), title or [[wikilink]]
appendNoMarkdown to add at the end of the note
contentNoNew text for that section
sectionNoHeading text of the section to replace, without the # marks
new_textNo
old_textNoExact text to replace; must occur exactly once

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

A4.5/5.0
Behavior5/5

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

Goes well beyond the destructiveHint=true annotation: it explains that old_text must occur exactly once, that new_text may be empty, that section replacement spans up to the next same-or-higher heading while the heading itself survives, and that generated notes/memory are off limits. It even discloses return behavior (the reply lists existing notes the new text names without linking).

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 tight sentences: scope first, then the three mutually exclusive modes, then the exclusions and reply note. No redundancy and nothing buried.

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?

Six parameters with one required, no output schema, and the description covers modes, exclusions, and return summary well. Minor gaps remain: what happens when old_text matches zero or multiple times (error vs no-op) and whether the target note must already exist.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema documents 83% of parameters, but the critical mutual-exclusivity rule ('Give exactly one of...') exists nowhere in the schema, and neither does the section boundary semantics or the permission for an empty new_text. These are exactly the constraints an agent needs to avoid a wrong invocation.

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?

States a specific verb and resource ('Change part of a note') plus a hard scope restriction (only under Notes/ or Captures/), and the phrase 'without rewriting it' implicitly separates it from brain_write. It never names a sibling, so the differentiation is inferable rather than explicit.

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?

Gives crisp positive selection rules ('Give exactly one of: old_text + new_text, section + content, or append') and negative ones ('Generated notes and the memory file cannot be edited'). It stops short of routing to alternatives, e.g. pointing at brain_write for full rewrites or brain_read to inspect before editing.

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