Skip to main content
Glama

Edit a note

edit_note
Destructive

Replace one exact piece of a note's text. old_text must appear exactly once in the current note; include enough surrounding text to make it unique. To rewrite the whole note, pass its full current text (from fetch) as old_text. Example: old_text "- [ ] milk", new_text "- [x] milk" ticks off milk. The note keeps its place in the list; if it should also go back to the top, call rescue_note after. If old_text isn't found, fetch the current text and copy the exact passage to replace. If it matches more than once, include more of the surrounding text.

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_id": "<note_id>",
      "old_text": "<old_text>",
      "new_text": "<new_text>"
    },
    "name": "edit_note"
  }
}

Input Schema

NameRequiredDescriptionDefault
note_idYesThe note's ID (a UUID) from search, list_notes or fetch.
new_textYesWhat it becomes. Empty removes it.
old_textYesExact text to replace, copied from the note.

Output Schema

NameRequiredDescriptionDefault
noteYes
outcomeYesunchanged: the note was already like that, so nothing was written.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, readOnlyHint=false and idempotentHint=false, but the description adds real behavior: the uniqueness precondition on old_text, what happens on zero matches vs multiple matches, and that the note keeps its list position unless rescue_note is called. It does not spell out that the replaced text is unrecoverable, which is the one remaining gap for a destructive edit.

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-loaded with the core rule, then conditional branches (whole-note rewrite, reordering, error recovery), each in one short sentence, with a concrete checkbox example that earns its place. No filler.

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 3-required-param destructive mutation with an output schema, the description covers preconditions, failure handling, and side effects on note ordering. Return values are covered by the output schema, so nothing an agent needs to invoke it correctly is missing.

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, and the description still adds meaning by imposing the exact-once matching constraint on old_text and explaining how to widen it with surrounding context. It also explains the whole-note case for old_text, which the schema note alone does not convey.

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?

States a specific verb+resource ('Replace one exact piece of a note's text') and scopes it to a substring replacement, which cleanly separates it from add_note, append_to_note and fetch without needing their schemas.

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?

Gives explicit when-to-use rules (exact single match required), the whole-note rewrite path, the escalation to rescue_note when the note should also return to the top, and the fallback of re-fetching when old_text is missing or ambiguous. Alternatives are named rather than implied.

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