Skip to main content
Glama
thoreinstein

obsidian-mcp

by thoreinstein

obsidian_replace_section

Replace the body text under a specified heading in an Obsidian note while keeping the heading line intact. Use it to update one section without rewriting the whole file.

Instructions

Replace the body under a heading (up to the next heading of equal/higher level, or EOF). The heading line itself is preserved.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contentYesNew section body (replaces everything between heading and next same/higher-level heading)
headingYesHeading text to find (e.g. "Status")
file_pathYesRelative path to the note
vault_pathNoOptional vault path override

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.3/5.0
Behavior3/5

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

With no annotations, the description carries full behavioral burden. It usefully discloses that the heading line is preserved and that replacement runs to the next same/higher-level heading or EOF, but it omits important mutation details: what happens if the heading is missing, if multiple headings match, whether the file must already exist, and whether the heading is created.

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?

The definition is a single efficient sentence with the scope constraint front-loaded and the guaranteed preserved heading called out second. Every clause carries information and nothing is wasted.

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 mutation tool with no annotations and no output schema, the description covers core replacement semantics but leaves meaningful gaps around failure modes, heading-match uniqueness, and whether missing headings or files are handled. It is adequate but not complete for an agent to call it confidently in edge cases.

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 description coverage is 100%, so the schema already documents all four parameters, including vault_path as an optional override. The description adds no parameter-level detail beyond what the schema states, so the baseline of 3 is appropriate.

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 gives a specific verb ('Replace') and resource ('the body under a heading'), and defines the exact scope with the next same/higher-level heading or EOF boundary. It implicitly separates this from insertion/replacement siblings by defining what gets overwritten, but it never names or contrasts them explicitly, so an agent must infer the distinction from sibling names alone.

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

Usage Guidelines2/5

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

There is no guidance on when to use this tool versus siblings such as obsidian_insert_at_heading, obsidian_replace_in_note, or obsidian_append_note. It states what the tool does but not the conditions or prerequisites that should select it over alternatives.

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