Skip to main content
Glama

Replace a note's body

replace_note_body

Rewrite a note's entire markdown body while preserving its frontmatter, ideal for deliberate reorganizations or full content replacements.

Instructions

Rewrite a note's entire body (frontmatter preserved). Prefer append_note for additions and edit_note for changing existing text; use this only for deliberate rewrites/reorganizations.

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": {
      "ref": "<ref>",
      "body": "<body>"
    },
    "name": "replace_note_body"
  }
}

Input Schema

NameRequiredDescriptionDefault
refYesNote path, title, or alias
bodyYesNew markdown body

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.4.0
    • removedInput schema / additionalProperties
      Removed value: -false
  2. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/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 disclose the key trait: the entire body is replaced while frontmatter survives, which signals that existing body content is destroyed. It falls short of stating irreversibility, backup/version behavior, or what happens if the note does not exist, which matters for a full-overwrite operation.

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?

Two short sentences with the destructive scope stated first and the sibling routing second. Every clause carries information; nothing is redundant with the title.

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 two-parameter overwrite tool with no annotations and no output schema, the description covers the essentials: what is replaced, what is preserved, and when to choose alternatives. Minor gaps remain around missing-note behavior and confirmation of the returned result.

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

Parameters3/5

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

Schema coverage is 100%, so 'ref' (path, title, or alias) and 'body' (new markdown body) are already documented in the schema. The description only implies that body replaces the whole markdown content and adds no format or edge-case guidance beyond that, so the baseline applies.

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?

Names a specific verb (rewrite) and resource (a note's entire body) and immediately qualifies scope with '(frontmatter preserved)'. It explicitly distinguishes itself from the two most likely confusable siblings, append_note and edit_note, so an agent can select it without opening 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 both a positive condition ('deliberate rewrites/reorganizations') and negative routing ('Prefer append_note for additions and edit_note for changing existing text'). The agent is told exactly which alternative to pick for adjacent tasks.

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