Skip to main content
Glama

Update Note

update_note
Destructive

Change an existing note's text, type, format, tags, or privacy flag in Gramps Web. Replace the whole body, edit a fragment, or append text.

Instructions

Change an existing note: its text, type, format, tags or private flag. text replaces the whole body. For a long note, replaceText with withText changes one fragment and appendText adds to the end: both work on the body as stored now and keep the rest of it, styling and links included. Pass only what changes; omitted arguments stay as they are. Link lists (…Handles, …Refs) follow linkMode: replace (default) sets the whole list, add appends, remove drops the given handles; in replace mode [] REMOVES every link of that kind, though the linked records themselves stay in the tree. Returns the handle and Gramps ID; a missing note returns a not-found message. Which records the note is attached to is stored on them (their noteHandles), not here. For a new note use create_note; to remove one, delete_object. Writes run one at a time and need a Gramps Web account allowed to edit the tree; a locked or rate-limited write fails with the delay to wait before retrying it.

Input Schema

NameRequiredDescriptionDefault
textNoNew text, replacing the whole body; changed text loses the styling and links of the old one, the same text keeps them. Omit to leave unchanged.
formatNoPlain or Html. Omit to leave unchanged.
handleYesThe note to change. Handle or Gramps ID (e.g. I0001), resolved automatically; find it with search or list_objects.
linkModeNoHow to apply all supplied link lists: replace (default) replaces each full list, and a link it keeps keeps its stored privacy, citations, notes and crop unless the call sends new values; add appends missing handles and preserves existing link metadata; remove removes all links matching supplied handles (reference metadata is ignored). Omitted lists stay unchanged; empty lists clear only in replace mode. Does not affect attributes, names, addresses or URLs. Use separate calls to add and remove, or replace to edit existing link metadata.replace
noteTypeNoNew note type. Omit to leave unchanged. Must be a standard Gramps type or a custom one the tree already uses; anything else is rejected with suggestions. List: get_reference(topic: "types").
withTextNoThe text to put in place of replaceText; an empty string deletes the fragment.
isPrivateNotrue makes the record private, false public. Omit to leave unchanged.
appendTextNoText to add at the end of the body, on a new line: a line break is put in between unless the body already ends with one, so start with a line break to leave an empty line. The rest of the body, styling and links included, is kept. Cannot be combined with text.
tagHandlesNoTags. Omit to keep; applied per linkMode. Handles, not Gramps IDs: JSON array ["h1","h2"], one handle, or a comma/semicolon/newline-separated string; entries may also be objects {"ref":"…"}.
replaceTextNoA fragment of the body to replace with withText, copied exactly as stored, spaces, line breaks and letter case included. It must occur once: include enough of the surrounding text to make it unique. The rest of the body, styling and links included, is kept. Applied before appendText; cannot be combined with text.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv2.5.1
    • addedInput schema / properties / appendText
      Added value: +{
      +  "default": null,
      +  "description": "Text to add at the end of the body, on a new line: a line break is put in between unless the body already ends with one, so start with a line break to leave an empty line. The rest of the body, styling and links included, is kept. Cannot be combined with text.",
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedInput schema / properties / replaceText
      Added value: +{
      +  "default": null,
      +  "description": "A fragment of the body to replace with withText, copied exactly as stored, spaces, line breaks and letter case included. It must occur once: include enough of the surrounding text to make it unique. The rest of the body, styling and links included, is kept. Applied before appendText; cannot be combined with text.",
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedInput schema / properties / withText
      Added value: +{
      +  "default": null,
      +  "description": "The text to put in place of replaceText; an empty string deletes the fragment.",
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
  2. Changed2 schema fields changedv2.3.1
    • changedInput schema / properties / linkMode / description
      Previous value: -"How to apply all supplied link lists: replace (default) replaces each full list; add appends missing handles and preserves existing link metadata; remove removes all links matching supplied handles (reference metadata is ignored). Omitted lists stay unchanged; empty lists clear only in replace mode. Does not affect attributes, names, addresses or URLs. Use separate calls to add and remove, or replace to edit existing link metadata."New value: +"How to apply all supplied link lists: replace (default) replaces each full list, and a link it keeps keeps its stored privacy, citations, notes and crop unless the call sends new values; add appends missing handles and preserves existing link metadata; remove removes all links matching supplied handles (reference metadata is ignored). Omitted lists stay unchanged; empty lists clear only in replace mode. Does not affect attributes, names, addresses or URLs. Use separate calls to add and remove, or replace to edit existing link metadata."
    • changedInput schema / properties / text / description
      Previous value: -"New text, replacing the whole body. Omit to leave unchanged."New value: +"New text, replacing the whole body; changed text loses the styling and links of the old one, the same text keeps them. Omit to leave unchanged."
  3. Changed5 schema fields changedv2.3.0
    • changedInput schema / properties / handle / description
      Previous value: -"Note handle. Handle or Gramps ID (e.g. I0001). Handles are opaque strings from the API. Gramps IDs (like I0001, F0023) are auto-resolved to handles. Find handles with search() or list_objects()."New value: +"The note to change. Handle or Gramps ID (e.g. I0001), resolved automatically; find it with search or list_objects."
    • changedInput schema / properties / isPrivate / description
      Previous value: -"Private flag. Omit to leave unchanged."New value: +"true makes the record private, false public. Omit to leave unchanged."
    • changedInput schema / properties / noteType / description
      Previous value: -"Note type. Omit to leave unchanged. Type values are validated by the server; see gramps://types resource or call get_reference(topic: \"types\") for available values."New value: +"New note type. Omit to leave unchanged. Must be a standard Gramps type or a custom one the tree already uses; anything else is rejected with suggestions. List: get_reference(topic: \"types\")."
    • changedInput schema / properties / tagHandles / description
      Previous value: -"Linked tags. Omit to leave unchanged. For link lists, linkMode controls replace/add/remove; [] clears in replace mode and does nothing in add/remove. Other lists always use replacement. Handles: JSON array [\"h1\",\"h2\"], a single handle as a plain string, comma/semicolon/newline-separated list, or a JSON-array string. Array entries may be strings or objects {\"ref\":\"…\"} / {\"handle\":\"…\"}."New value: +"Tags. Omit to keep; applied per linkMode. Handles, not Gramps IDs: JSON array [\"h1\",\"h2\"], one handle, or a comma/semicolon/newline-separated string; entries may also be objects {\"ref\":\"…\"}."
    • changedInput schema / properties / text / description
      Previous value: -"Body text. Omit to leave unchanged."New value: +"New text, replacing the whole body. Omit to leave unchanged."
  4. First observedv2.2.0

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true and idempotentHint=false, but the description adds substantial behavior beyond them: writes run one at a time, auth requirement for editing, lock/rate-limit failure mode with retry delay, return value (handle + Gramps ID) and not-found behavior, and the critical '[] in replace mode REMOVES every link of that kind while linked records stay in the tree'. It also clarifies that attachment records live on the referencing object, not the note.

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 core action, then systems of behavior, then sibling routing, then operational caveats. It is long (8+ sentences) and dense, but nearly every sentence carries non-redundant information for a 10-parameter mutation tool; minor trimming of linkMode restatement is possible.

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?

No output schema exists, and the description compensates by stating the return value and the not-found case. Combined with auth, concurrency, rate-limit and link-mode semantics, an agent has everything needed to invoke this destructive update correctly.

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, but the description adds cross-parameter semantics the schema documents only piecemeal: replaceText is applied before appendText, the three body-editing params are mutually exclusive, omitted args are left unchanged, and empty link lists only clear in replace mode. This ties the 10 parameters together rather than restating them.

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 ('Change an existing note') and enumerates the changeable fields (text, type, format, tags, private flag). It also explicitly names the sibling boundaries: 'For a new note use create_note; to remove one, delete_object.' An agent can distinguish this from create_note/update_* siblings without opening any 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?

Gives explicit when-to-use routing: use create_note for a new note, delete_object for removal, replaceText/appendText instead of text for long notes, and only pass changed arguments. It also states the operational precondition (Gramps Web account allowed to edit the tree) and the retry behavior on locked/rate-limited writes.

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