Skip to main content
Glama

Update Section

update_section
DestructiveIdempotent

Replace only a specific section's body while preserving its heading, so you can update one part of an Obsidian note without rewriting the whole file.

Instructions

Replace the body of a specific section (everything between a heading and the next heading at any level). The heading line itself is preserved. section is a heading path: 'Tasks', 'Project A/Status', etc. - case-insensitive and whitespace-tolerant. Use this instead of rewriting the whole file when you only need to update one section.

Input Schema

NameRequiredDescriptionDefault
pathYesVault-relative path to the note (e.g., 'folder/note.md'). Extension required.
newBodyYesReplacement body content. The heading line itself is kept intact.
sectionYesHeading path identifying the section to replace (e.g., 'Tasks' or 'Daily/Today').

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv4.1.1
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / newBody / maxLength
      Added value: +1000000
  2. Addedv2.0.0
  3. Removedv1.9.0
  4. Addedv1.8.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, idempotentHint=true and readOnlyHint=false. The description adds real value on top: it defines precisely what is destroyed (the body span between headings) and what survives (the heading line itself), which is exactly the context an agent needs before an overwrite. It does not cover error behavior when the section is absent or any confirmation/undo semantics.

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 sentences, each earning its place: what is replaced, what is preserved, how to specify the section, and why not to use the alternative. The core destructive scope is front-loaded in the first sentence.

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 three-parameter destructive mutation with annotations and no output schema, this covers scope, parameter format, and the main alternative. Minor gap: no indication of what happens if the heading path doesn't resolve to an existing section, which matters for an overwrite tool.

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 the schema already documents all three parameters, making 3 the baseline. The description does add one useful detail beyond the schema: 'section' paths are case-insensitive and whitespace-tolerant, plus concrete path examples. The newBody explanation largely restates the schema's own note that the heading line is kept intact.

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 ('Replace the body of a specific section') and pins down the exact boundary: everything between a heading and the next heading at any level, with the heading line preserved. It clearly separates itself from whole-file rewriting but does not name closer siblings such as insert_at_section or replace_in_note, leaving the agent to infer the difference.

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?

Explicitly says when to use it: 'Use this instead of rewriting the whole file when you only need to update one section.' That gives a clear selection rule against full-file rewrite. It stops short of stating the inverse conditions (e.g., to add content use append_to_note/insert_at_section, or what to do when the section is missing).

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