obsidian-mcp-server
Version:
MCP server for Obsidian vaults — read, write, search, and surgically edit notes, tags, and frontmatter via the Local REST API plugin. STDIO or Streamable HTTP.
22 lines (14 loc) • 1.78 kB
Markdown
---
summary: "Section extractor and outgoing-link parser respect fenced code blocks and inline code — markdown-about-markdown notes stop yielding false-positive headings, block refs, and links. Adds `ambiguous_path` to the typed-error contract."
breaking: false
security: false
---
# 3.1.9 — 2026-05-11
## Fixed
- **`extractSection`** — heading and block scans now skip lines inside fenced code blocks. A note documenting `# heading` or `paragraph ^abc` inside a ` ```markdown ` fence no longer false-matches as a real section, and slicing no longer terminates early on a fenced `#` header. Tilde fences (`~~~`) get the same treatment; unclosed fences extend to EOF.
- **`obsidian_get_note` `includeLinks`** — `parseOutgoingLinks` blanks fenced code blocks and inline code spans before regex extraction, so `` `[[example]]` `` and fenced wikilink/markdown-link samples stop appearing in `outgoingLinks`.
## Added
- **`computeFenceMask(lines, from?)`** — exported from `services/obsidian/section-extractor.ts`. Returns a `boolean[]` marking lines inside CommonMark fenced code blocks (matching opener char and length, no info string on close). Shared by the extractor and the outgoing-link parser.
- **`ambiguous_path`** — new `errors[]` entry on `obsidian_get_note` and `obsidian_open_in_ui` (`JsonRpcErrorCode.Conflict`). Fires when `withCaseFallback` detects multiple files in the parent directory whose names differ only in case. Recovery: retry with one of the exact paths in `data.matches`.
## Changed
- **`withCaseFallback` (`_shared/suggest-paths.ts`)** — the conflict thrown on multiple case-insensitive matches now carries `reason: 'ambiguous_path'` and spreads `ctx.recoveryFor('ambiguous_path')` so the contract recovery hint mirrors onto the wire.