Skip to main content
Glama
shaynemeyer

obsidian-mcp

by shaynemeyer

obsidian_patch_note

Destructive

Insert Markdown at a heading, block reference, or frontmatter key in an Obsidian note, leaving other content unchanged. Append, prepend, or replace targeted sections for precise updates.

Instructions

Insert content at a specific heading, block reference, or frontmatter key.

This is the surgical option: it edits one section and leaves the rest of the note byte-for-byte unchanged. Read the note first to confirm the target exists — a missing heading or block ID is an error, not a silent no-op.

Args: params (PatchNoteInput): - path (str): Vault-relative path to an existing note - target_type (str): 'heading', 'block', or 'frontmatter' - target (str): Heading text ('::' separates nesting levels), block ID without '^', or frontmatter key - content (str): Markdown to insert, or the frontmatter value - operation (str): 'append', 'prepend', or 'replace'

Returns: str: JSON of the shape {"status": "ok", "action": "patched", "path": str, "backend": "rest"|"filesystem"} On failure: "Error: ", including when the target heading or block ID does not exist.

Examples: - Add today's entry under a Log heading -> target_type='heading', target='Log', operation='append' - Set a status field -> target_type='frontmatter', target='status', content='active', operation='replace'

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A5/5.0
Behavior5/5

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

Beyond the annotations (readOnlyHint=false, destructiveHint=true, idempotentHint=false), the description discloses the exact return format (JSON with status/action/path/backend), the error behavior ('Error: <actionable message>'), and the non-idempotent nature. It also clarifies that a missing target is an explicit error, not a silent no-op, adding meaningful context the annotations do not cover.

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 description is well-structured: a one-line purpose, then a clear breakdown of arguments, return value, and two concrete examples. Every sentence adds value, and the core purpose is front-loaded. Despite its length, it remains focused and avoids redundancy.

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?

Given the tool's complexity (multiple target types, operations, and failure modes), the description covers all necessary information: what it does, preconditions, exact return shape, error handling, and usage examples. The schema handles parameter validation, and the description complements it without omission.

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

Parameters5/5

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

The description explains each parameter in detail, including the format for 'target' (using '::' for nesting, block ID without '^', frontmatter key) and the meaning of 'operation' (append, prepend, replace). It adds examples for both heading and frontmatter use cases, going well beyond the schema's terse descriptions. Although the 'vault' parameter is omitted from the Args list, it is documented in the schema and is optional, so no meaningful gap exists.

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?

The description opens with a specific verb and resource: 'Insert content at a specific heading, block reference, or frontmatter key.' It further distinguishes itself as the 'surgical option' that edits one section while leaving the rest byte-for-byte unchanged, clearly separating it from sibling tools like obsidian_write_note and obsidian_append_to_note.

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?

The description provides explicit usage guidance: it instructs the agent to 'Read the note first to confirm the target exists' and warns that a missing heading or block ID is an error. It also positions the tool as the surgical alternative, implying when it is appropriate to use versus whole-note operations. Examples illustrate concrete scenarios.

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