Skip to main content
Glama

update_section

Update specific sections of an Obsidian note by replacing, appending, prepending, or deleting content under a heading, and optionally create missing headings.

Instructions

Replace, append to, prepend to, or delete the content under a heading (replace/delete cover everything down to the next heading of the same or higher level, sub-headings included). With create_if_missing the heading is added (at the end, or under parent_heading).

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": {
      "file": "<file>",
      "heading": "<heading>"
    },
    "name": "update_section"
  }
}

Input Schema

NameRequiredDescriptionDefault
fileYesNote path ("Folder/Note.md"), path without .md, note name, alias, or [[wikilink]]
modeNoDefault replace. delete removes the heading and its content.
levelNoLevel for a new heading (default 2)
vaultNoVault name, id or folder path (see list_vaults). Default: OBSIDIAN_VAULT or the vault open in Obsidian.
contentNo
headingYesHeading text or "Parent > Child"
create_if_missingNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3/5.0
Behavior1/5

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

The description says delete 'removes the heading and its content' and that replace/delete 'cover everything down to the next heading of the same or higher level, sub-headings included' — i.e. substantial content is destroyed, and replace is the default mode. The annotations declare destructiveHint=false, which under MCP semantics means only additive updates, so the description directly contradicts the structured safety signal. An agent trusting the annotation would badly underestimate the blast radius of the default call.

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?

Two dense sentences that lead with the operation set and then qualify the two behaviors most likely to surprise (replace/delete scope, create_if_missing placement). No filler, though the parenthetical about sub-headings is packed tightly enough that it takes a second read.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 7-parameter mutation tool with no output schema, the core destructive scope is well covered, but key behaviors are missing: what happens when the heading is not found and create_if_missing is false (error vs silent no-op), the content requirement per mode, and whether the call reports back what changed. The dangling parent_heading reference adds ambiguity rather than resolving it.

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 71%, and the description does add real meaning for the mode scope and for create_if_missing's placement behavior. But it leaves `content` (undocumented in both schema and description) unaddressed — it never says content is required for append/prepend/replace but not for delete — and it references a 'parent_heading' that does not exist in the schema, where nesting is instead encoded in `heading` as 'Parent > Child'.

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?

The description names a specific resource (the content under a heading) and enumerates the exact operations (replace/append/prepend/delete), so an agent can immediately tell this is a section-level editor rather than a whole-note or block-level one. It stops short of naming the closest siblings (update_block, read_section, move_section), so the differentiation is inferred rather than stated.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The four modes effectively imply the use cases, and the scope note for replace/delete tells the agent when the operation is broader than it might expect. However, there is no explicit when-not guidance, no mention of what to use instead for block-level edits or whole-note rewrites, and no statement of prerequisites such as the heading already existing unless create_if_missing is set.

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

Deploy Server

Other Tools