obsidian-mcp-server 3.5.5 → 3.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/AGENTS.md +4 -2
  2. package/CLAUDE.md +4 -2
  3. package/README.md +8 -8
  4. package/changelog/3.6.x/3.6.0.md +31 -0
  5. package/dist/mcp-server/tools/definitions/_shared/schemas.d.ts.map +1 -1
  6. package/dist/mcp-server/tools/definitions/_shared/schemas.js +1 -1
  7. package/dist/mcp-server/tools/definitions/_shared/schemas.js.map +1 -1
  8. package/dist/mcp-server/tools/definitions/index.d.ts +36 -0
  9. package/dist/mcp-server/tools/definitions/index.d.ts.map +1 -1
  10. package/dist/mcp-server/tools/definitions/obsidian-append-to-note.tool.d.ts +12 -0
  11. package/dist/mcp-server/tools/definitions/obsidian-append-to-note.tool.d.ts.map +1 -1
  12. package/dist/mcp-server/tools/definitions/obsidian-append-to-note.tool.js +15 -2
  13. package/dist/mcp-server/tools/definitions/obsidian-append-to-note.tool.js.map +1 -1
  14. package/dist/mcp-server/tools/definitions/obsidian-manage-tags.tool.d.ts +3 -2
  15. package/dist/mcp-server/tools/definitions/obsidian-manage-tags.tool.d.ts.map +1 -1
  16. package/dist/mcp-server/tools/definitions/obsidian-manage-tags.tool.js +4 -3
  17. package/dist/mcp-server/tools/definitions/obsidian-manage-tags.tool.js.map +1 -1
  18. package/dist/mcp-server/tools/definitions/obsidian-patch-note.tool.d.ts +15 -2
  19. package/dist/mcp-server/tools/definitions/obsidian-patch-note.tool.d.ts.map +1 -1
  20. package/dist/mcp-server/tools/definitions/obsidian-patch-note.tool.js +18 -4
  21. package/dist/mcp-server/tools/definitions/obsidian-patch-note.tool.js.map +1 -1
  22. package/dist/mcp-server/tools/definitions/obsidian-write-note.tool.d.ts +12 -0
  23. package/dist/mcp-server/tools/definitions/obsidian-write-note.tool.d.ts.map +1 -1
  24. package/dist/mcp-server/tools/definitions/obsidian-write-note.tool.js +23 -10
  25. package/dist/mcp-server/tools/definitions/obsidian-write-note.tool.js.map +1 -1
  26. package/dist/services/obsidian/frontmatter-ops.d.ts +4 -3
  27. package/dist/services/obsidian/frontmatter-ops.d.ts.map +1 -1
  28. package/dist/services/obsidian/frontmatter-ops.js +379 -114
  29. package/dist/services/obsidian/frontmatter-ops.js.map +1 -1
  30. package/dist/services/obsidian/markdown-blocks.d.ts +39 -0
  31. package/dist/services/obsidian/markdown-blocks.d.ts.map +1 -0
  32. package/dist/services/obsidian/markdown-blocks.js +611 -0
  33. package/dist/services/obsidian/markdown-blocks.js.map +1 -0
  34. package/dist/services/obsidian/obsidian-service.d.ts +9 -7
  35. package/dist/services/obsidian/obsidian-service.d.ts.map +1 -1
  36. package/dist/services/obsidian/obsidian-service.js +308 -111
  37. package/dist/services/obsidian/obsidian-service.js.map +1 -1
  38. package/dist/services/obsidian/patch-instruction.d.ts +141 -0
  39. package/dist/services/obsidian/patch-instruction.d.ts.map +1 -0
  40. package/dist/services/obsidian/patch-instruction.js +217 -0
  41. package/dist/services/obsidian/patch-instruction.js.map +1 -0
  42. package/dist/services/obsidian/section-extractor.d.ts +97 -24
  43. package/dist/services/obsidian/section-extractor.d.ts.map +1 -1
  44. package/dist/services/obsidian/section-extractor.js +295 -58
  45. package/dist/services/obsidian/section-extractor.js.map +1 -1
  46. package/dist/services/obsidian/types.d.ts +12 -5
  47. package/dist/services/obsidian/types.d.ts.map +1 -1
  48. package/manifest.json +1 -1
  49. package/package.json +2 -1
  50. package/server.json +3 -3
package/AGENTS.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # Agent Protocol
2
2
 
3
3
  **Server:** obsidian-mcp-server
4
- **Version:** 3.5.5
4
+ **Version:** 3.6.0
5
5
  **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.13.6`
6
6
  **Engines:** Bun ≥1.4.0, Node ≥24.0.0
7
7
  **MCP SDK:** `@modelcontextprotocol/server` ^2.0.0
@@ -266,7 +266,9 @@ src/
266
266
  services/
267
267
  obsidian/
268
268
  obsidian-service.ts # Local REST API client (init/accessor pattern)
269
- frontmatter-ops.ts # YAML frontmatter parse/serialize/edit helpers
269
+ frontmatter-ops.ts # YAML frontmatter parse/serialize/edit helpers + inline tag reader
270
+ markdown-blocks.ts # Block structure (code, HTML, math, tables) for inline tag detection
271
+ patch-instruction.ts # markdown-patch 1.x headers / 2.0 instructions, format negotiation, 2.0 map flattening
270
272
  section-extractor.ts # Heading/block/frontmatter section extraction
271
273
  types.ts # Domain types (NoteJson, NoteTarget, etc.)
272
274
  mcp-server/
package/CLAUDE.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # Agent Protocol
2
2
 
3
3
  **Server:** obsidian-mcp-server
4
- **Version:** 3.5.5
4
+ **Version:** 3.6.0
5
5
  **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.13.6`
6
6
  **Engines:** Bun ≥1.4.0, Node ≥24.0.0
7
7
  **MCP SDK:** `@modelcontextprotocol/server` ^2.0.0
@@ -266,7 +266,9 @@ src/
266
266
  services/
267
267
  obsidian/
268
268
  obsidian-service.ts # Local REST API client (init/accessor pattern)
269
- frontmatter-ops.ts # YAML frontmatter parse/serialize/edit helpers
269
+ frontmatter-ops.ts # YAML frontmatter parse/serialize/edit helpers + inline tag reader
270
+ markdown-blocks.ts # Block structure (code, HTML, math, tables) for inline tag detection
271
+ patch-instruction.ts # markdown-patch 1.x headers / 2.0 instructions, format negotiation, 2.0 map flattening
270
272
  section-extractor.ts # Heading/block/frontmatter section extraction
271
273
  types.ts # Domain types (NoteJson, NoteTarget, etc.)
272
274
  mcp-server/
package/README.md CHANGED
@@ -7,7 +7,7 @@
7
7
 
8
8
  <div align="center">
9
9
 
10
- [![Version](https://img.shields.io/badge/Version-3.5.5-blue.svg?style=flat-square)](./CHANGELOG.md) [![License](https://img.shields.io/badge/License-Apache%202.0-orange.svg?style=flat-square)](./LICENSE) [![Docker](https://img.shields.io/badge/Docker-ghcr.io-2496ED?style=flat-square&logo=docker&logoColor=white)](https://github.com/users/cyanheads/packages/container/package/obsidian-mcp-server) [![MCP SDK](https://img.shields.io/badge/MCP%20SDK-^2.0.0-green.svg?style=flat-square)](https://modelcontextprotocol.io/) [![npm](https://img.shields.io/npm/v/obsidian-mcp-server?style=flat-square&logo=npm&logoColor=white)](https://www.npmjs.com/package/obsidian-mcp-server) [![TypeScript](https://img.shields.io/badge/TypeScript-^7.0.2-3178C6.svg?style=flat-square)](https://www.typescriptlang.org/) [![Bun](https://img.shields.io/badge/Bun-v1.4.0%2B-blueviolet.svg?style=flat-square)](https://bun.sh/)
10
+ [![Version](https://img.shields.io/badge/Version-3.6.0-blue.svg?style=flat-square)](./CHANGELOG.md) [![License](https://img.shields.io/badge/License-Apache%202.0-orange.svg?style=flat-square)](./LICENSE) [![Docker](https://img.shields.io/badge/Docker-ghcr.io-2496ED?style=flat-square&logo=docker&logoColor=white)](https://github.com/users/cyanheads/packages/container/package/obsidian-mcp-server) [![MCP SDK](https://img.shields.io/badge/MCP%20SDK-^2.0.0-green.svg?style=flat-square)](https://modelcontextprotocol.io/) [![npm](https://img.shields.io/npm/v/obsidian-mcp-server?style=flat-square&logo=npm&logoColor=white)](https://www.npmjs.com/package/obsidian-mcp-server) [![TypeScript](https://img.shields.io/badge/TypeScript-^7.0.2-3178C6.svg?style=flat-square)](https://www.typescriptlang.org/) [![Bun](https://img.shields.io/badge/Bun-v1.4.0%2B-blueviolet.svg?style=flat-square)](https://bun.sh/)
11
11
 
12
12
  </div>
13
13
 
@@ -60,7 +60,7 @@ Vault-note and tag data are also reachable via tools — `obsidian_get_note` for
60
60
 
61
61
  - `format: "content" | "full" | "document-map" | "section"` selects the projection; `full` accepts `includeLinks: true` for outgoing wiki/markdown links (vault-internal only — external URLs are filtered)
62
62
  - Addressed by vault `path`, the `active` file, or a `periodic` note (`daily` / `weekly` / `monthly` / `quarterly` / `yearly`)
63
- - Heading sections use `Parent::Child` syntax, and every `#`-style heading path the document map lists reads back as itself (setext headings, underlined with `===` or `---`, are not recognized); a bare leaf name matching several headings, or a full path that repeats in the note, returns the first match and lists every colliding path in `candidates`
63
+ - Heading sections use `Parent::Child` syntax and find headings the way the document map does — setext headings (underlined with `===` or `---`) count, `#` lines inside a list item, HTML block, or fence do not — so every heading path the map lists reads back as itself, over the same span a section write edits; a bare leaf name matching several headings, or a full path that repeats in the note, returns the first match and lists every colliding path in `candidates`
64
64
  - Forgiving `path` resolution: a case-mismatched path retries against the canonical filename, an ambiguous case match fails with `Conflict`, and a `NotFound` carries `Did you mean: …?` suggestions when near-matches exist
65
65
  - Typed errors include `note_missing`, `path_forbidden`, `no_active_file`, `periodic_unsupported` / `periodic_disabled`, and `path_traversal`
66
66
 
@@ -112,7 +112,7 @@ Vault-note and tag data are also reachable via tools — `obsidian_get_note` for
112
112
  ### `obsidian_append_to_note` <sub>tool</sub>
113
113
 
114
114
  - Without `section` — appends to an existing file, or creates it with the given content as the whole body (`created: true` flags the second case)
115
- - With `section` — appends to a heading/block/frontmatter target; the file must already exist, and `createTargetIfMissing: true` brings the section itself into existence
115
+ - With `section` — appends to a heading/block/frontmatter target; the file must already exist, and `createTargetIfMissing: true` brings the section itself into existence. On plugin v5.0 and later, content appended to a heading is separated from the section's existing content by a blank line (except a list item appended to a section that ends in a list and has no sub-headings, which continues that list), and a heading in it must sit below the section's own level (`heading_outside_section` otherwise)
116
116
  - Block-reference targets concatenate with no separator — include a leading newline in `content` for one
117
117
  - `previousSizeInBytes` / `currentSizeInBytes` bracket every call for drift detection
118
118
 
@@ -120,9 +120,9 @@ Vault-note and tag data are also reachable via tools — `obsidian_get_note` for
120
120
 
121
121
  ### `obsidian_patch_note` <sub>tool</sub>
122
122
 
123
- - `operation: "append" | "prepend" | "replace"` against one heading, block reference, or frontmatter field per call
123
+ - `operation: "append" | "prepend" | "replace"` against one heading, block reference, or frontmatter field per call; on plugin v5.0 and later, content appended or prepended to a heading is separated from the section's existing content by a blank line (except a list item appended to a section that ends in a list and has no sub-headings, or prepended to one that opens with a list, which continues that list), and a heading in it must sit below the section's own level (`heading_outside_section` otherwise)
124
124
  - Heading targets accept the full `Parent::Child` path or a bare leaf name; a leaf matching several headings fails with `ambiguous_section` and lists the candidates, unless one of them has no parent heading, which the patch then targets; a full path that repeats in the note fails with `ambiguous_section` too
125
- - `patchOptions`: `createTargetIfMissing`, `applyIfContentPreexists` (idempotency guard — otherwise `content_preexists`), `trimTargetWhitespace`
125
+ - `patchOptions`: `createTargetIfMissing`, `applyIfContentPreexists` (idempotency guard — otherwise `content_preexists`), `trimTargetWhitespace` (plugin v4.x only; v5.0 and later place the blank lines around inserted content themselves)
126
126
 
127
127
  ---
128
128
 
@@ -146,8 +146,8 @@ Vault-note and tag data are also reachable via tools — `obsidian_get_note` for
146
146
  ### `obsidian_manage_tags` <sub>tool</sub>
147
147
 
148
148
  - `operation: "add" | "remove" | "list"`; `location: "frontmatter"` (default, canonical `tags:` array) | `"inline"` (body `#tag`, `add` appends at end-of-file) | `"both"` (reconciles both)
149
- - Inline detection skips fenced/inline code spans, link spans (`[[...]]`, `[text](...)`, `[text][ref]`), HTML comments, and math (`$…$`, `$$…$$`), so a heading anchor or wikilink alias is never mistaken for a tag; `%% … %%` comments are still read, as Obsidian reads them
150
- - Inline tags follow Obsidian's grammar: a tag starts at line start, after whitespace, or right after markup such as `**`, `==`, `<br>`, or a `\`-escape (`**#x**` is a tag; `(#x`, `.#x`, `a *#x`, and `\#x` are not) and runs through letters and digits in any script, emoji, `_`, `-`, and `/`, with at least one character that is not an ASCII digit (`#1990s`, `#café`, `#日本語`, and `#✅done` are tags; `#1984` is not)
149
+ - Inline detection skips code (fenced, indented, and inline), wikilinks (`[[...]]`), images, a markdown link's destination or label (its text is read), HTML blocks and comments, and math (`$…$`, `$$…$$`), so a heading anchor or wikilink alias is never mistaken for a tag; `%% … %%` comments are still read, as Obsidian reads them
150
+ - Inline tags follow Obsidian's grammar: a tag starts at line start, after whitespace, after another tag (`#a#b` is two tags), or right after markup such as `**`, `_…_`, `==`, `[`, a table cell's `|`, `<br>`, or a `\`-escape (`**#x**` is a tag; `(#x`, `.#x`, `a *#x`, and `\#x` are not) and runs through letters and digits in any script, emoji, `_`, `-`, and `/`, with at least one character that is not an ASCII digit (`#1990s`, `#café`, `#日本語`, and `#✅done` are tags; `#1984` is not)
151
151
  - `add` / `remove` report `applied` vs. `skipped` tags plus the full `tags` set after the change; `list` ignores the input `tags` array
152
152
 
153
153
  ---
@@ -313,7 +313,7 @@ MCP_TRANSPORT_TYPE=http OBSIDIAN_API_KEY=... bun run start:http
313
313
  ### Prerequisites
314
314
 
315
315
  - [Bun v1.4.0](https://bun.sh/) or higher (or Node.js v24+).
316
- - The [Obsidian Local REST API](https://github.com/coddingtonbear/obsidian-local-rest-api) plugin, **v4.0.0 through v5.x**, installed and enabled in your vault. Generate an API key in **Settings → Community Plugins → Local REST API** and copy it into `OBSIDIAN_API_KEY`. Plugin v6.0 removes the markdown-patch 1.x wire format this server pins for section-targeted writes and the document map.
316
+ - The [Obsidian Local REST API](https://github.com/coddingtonbear/obsidian-local-rest-api) plugin, **v4.0.0 or later**, installed and enabled in your vault. Generate an API key in **Settings → Community Plugins → Local REST API** and copy it into `OBSIDIAN_API_KEY`. Section-targeted writes and the document map speak markdown-patch 2.0 to plugin v5.0 and later and the 1.x format to v4.x; the server reads the plugin version once and picks the format itself. Two table-row writes (`contentType: "json"`) that markdown-patch 2.0 cannot express go out as 1.x on v5.x too: rows written under a heading, and rows written through a block ID on its own line below the table. Plugin v6.0 removes 1.x, so on v6.0 those two shapes fail; target the table by an ID on its last row instead.
317
317
  - Periodic-note targets (`target: { "type": "periodic" }`) work across that whole range: natively on plugin **v5.0.1 and earlier**, and on **v5.0.2 and later** — which moved the `/periodic/` routes out of the plugin — once the companion [periodic-notes API extension](https://github.com/coddingtonbear/obsidian-local-rest-api-periodic-notes) is installed. Without that extension on v5.0.2+, periodic targets fail with a `periodic_unsupported` error naming it; `obsidian://status` lists the registered extensions if you want to check first. Every other target type is unaffected.
318
318
  - An MCP client that can answer an input request (elicitation). `obsidian_delete_note` always asks for confirmation before deleting, so a client without that support can read and write notes but cannot delete one.
319
319
  - This server defaults to `http://127.0.0.1:27123` for simplicity. Enable **"Non-encrypted (HTTP) Server"** in the plugin settings to use it. To use the always-on HTTPS port instead, set `OBSIDIAN_BASE_URL=https://127.0.0.1:27124`; the plugin's self-signed cert is handled by `OBSIDIAN_VERIFY_SSL=false` (the default), which relaxes verification for this server's requests to that endpoint only.
@@ -0,0 +1,31 @@
1
+ ---
2
+ summary: "obsidian_patch_note, obsidian_append_to_note, obsidian_write_note, and the document map now speak markdown-patch 2.0 on Local REST API v5.x, required before plugin v6.0 removes the 1.x format they used to pin."
3
+ breaking: false
4
+ security: false
5
+ ---
6
+
7
+ # 3.6.0 — 2026-09-23
8
+
9
+ ## Added
10
+
11
+ - **Section-targeted writes and the document map now speak markdown-patch 2.0**, negotiated once per service from the plugin's `GET /` capability report: a JSON instruction body on Local REST API v5.0 and later, 1.x request headers on v4.x. The supported plugin range widens from v4.0–v5.x to v4.0 and later ([#102](https://github.com/cyanheads/obsidian-mcp-server/issues/102)).
12
+
13
+ ## Changed
14
+
15
+ - **On plugin v5.x, content appended or prepended to a heading is separated from the section's existing content by a blank line**, except a list item continuing a list at the section's own edge, which stays tight instead of gaining paragraph spacing on every append ([#145](https://github.com/cyanheads/obsidian-mcp-server/issues/145)).
16
+ - **On plugin v5.x, a heading at or above the target section's own level in written content is rejected** with the new `heading_outside_section` reason instead of silently closing the section early.
17
+ - **A patch refusal that isn't a missing target now reports `patch_rejected`** instead of the misleading `section_target_missing`.
18
+ - **Two table-row writes still go out as markdown-patch 1.x on v5.x** — rows written under a heading, and rows addressed through a standalone `^id` line — since 2.0 cannot express either shape.
19
+ - **A failing `GET /` now fails the section write or document-map read with its classified error** instead of guessing a markdown-patch format.
20
+ - **`patchOptions.trimTargetWhitespace` is honored on plugin v4.x only**; v5.0 and later place the blank lines around inserted content themselves and ignore it.
21
+
22
+ ## Fixed
23
+
24
+ - **`obsidian_manage_tags` reads inline tags against a block-structure scan** instead of a flat regex split, so indented code, glued tags (`#a#b`), underscore boundaries (`_#t_`), table cells, narrowed link/fence/HTML-tag grammars, and HTML blocks beyond `<div>`/`<p>` all agree with Obsidian's own metadata cache ([#139](https://github.com/cyanheads/obsidian-mcp-server/issues/139), [#140](https://github.com/cyanheads/obsidian-mcp-server/issues/140), [#144](https://github.com/cyanheads/obsidian-mcp-server/issues/144)).
25
+ - **`obsidian_get_note` `format: "section"` finds headings the way the document map does** — lexed with `marked`, so setext headings count and a `#` line inside a list item or HTML block does not — so a section read now covers exactly the span a write edits. The plugin v4.x repeated-heading check reads the same scan, and `obsidian_write_note` strips a leading setext heading that names the section as it does an ATX one ([#141](https://github.com/cyanheads/obsidian-mcp-server/issues/141)).
26
+ - **On plugin v5.x, a heading write to a CRLF note lands at the section's edge**; the 1.x format placed it mid-line, offset by the note's line endings ([#102](https://github.com/cyanheads/obsidian-mcp-server/issues/102)).
27
+ - **`obsidian_get_note` `format: "document-map"` lists headings in note order when a heading name is integer-like** (`## 2025` above `## 2024`), where the map listed those names first; the `candidates` of an `ambiguous_section` error follow the same order ([#102](https://github.com/cyanheads/obsidian-mcp-server/issues/102)).
28
+
29
+ ## Dependencies
30
+
31
+ - `marked` added at `17.0.6` (pinned exact — the heading scan's tokenizer overrides read `marked`'s rule internals, and the pin matches the major the plugin's own markdown-patch lexes with)
@@ -1 +1 @@
1
- {"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../../../src/mcp-server/tools/definitions/_shared/schemas.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAE3C,4EAA4E;AAC5E,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;2BA4BvB,CAAC;AAEH,yCAAyC;AACzC,eAAO,MAAM,aAAa;;;;;;;iBAUxB,CAAC;AAEH,eAAO,MAAM,kBAAkB;;;;kBAiBlB,CAAC;AAEd,eAAO,MAAM,iBAAiB;;;GAK3B,CAAC;AAEJ,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AACtD,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC"}
1
+ {"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../../../src/mcp-server/tools/definitions/_shared/schemas.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAE3C,4EAA4E;AAC5E,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;2BA4BvB,CAAC;AAEH,yCAAyC;AACzC,eAAO,MAAM,aAAa;;;;;;;iBAUxB,CAAC;AAEH,eAAO,MAAM,kBAAkB;;;;kBAmBlB,CAAC;AAEd,eAAO,MAAM,iBAAiB;;;GAK3B,CAAC;AAEJ,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AACtD,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC"}
@@ -58,7 +58,7 @@ export const PatchOptionsSchema = z
58
58
  trimTargetWhitespace: z
59
59
  .boolean()
60
60
  .default(false)
61
- .describe('Trim whitespace from the target section before applying the operation.'),
61
+ .describe('Trim whitespace from the target section before applying the operation. Honored by Local REST API v4.x only; v5.0 and later place the blank lines around inserted content themselves and ignore it.'),
62
62
  })
63
63
  .optional();
64
64
  export const ContentTypeSchema = z
@@ -1 +1 @@
1
- {"version":3,"file":"schemas.js","sourceRoot":"","sources":["../../../../../src/mcp-server/tools/definitions/_shared/schemas.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAE3C,4EAA4E;AA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AQ,CACP,6mBAA6mB,CAC9mB;CACJ,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC;KAChC,MAAM,CAAC;IACN,qBAAqB,EAAE,CAAC;SACrB,OAAO,EAAE;SACT,OAAO,CAAC,KAAK,CAAC;SACd,QAAQ,CAAC,yEAAyE,CAAC;IACtF,uBAAuB,EAAE,CAAC;SACvB,OAAO,EAAE;SACT,OAAO,CAAC,KAAK,CAAC;SACd,QAAQ,CACP,iOAAiO,CAClO;IACH,oBAAoB,EAAE,CAAC;SACpB,OAAO,EAAE;SACT,OAAO,CAAC,KAAK,CAAC;SACd,QAAQ,CAAC,wEAAwE,CAAC;CACtF,CAAC;KACD,QAAQ,EAAE,CAAC;AAEd,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC;KAC/B,IAAI,CAAC,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;KAC1B,OAAO,CAAC,UAAU,CAAC;KACnB,QAAQ,CACP,qPAAqP,CACtP,CAAC"}
1
+ {"version":3,"file":"schemas.js","sourceRoot":"","sources":["../../../../../src/mcp-server/tools/definitions/_shared/schemas.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAE3C,4EAA4E;AAC5E,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,CAAC,kBAAkB,CAAC,MAAM,EAAE;IACvD,CAAC;SACE,MAAM,CAAC;QACN,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,iCAAiC,CAAC;QACnE,IAAI,EAAE,CAAC;aACJ,MAAM,EAAE;aACR,GAAG,CAAC,CAAC,CAAC;aACN,QAAQ,CAAC,kEAAkE,CAAC;KAChF,CAAC;SACD,QAAQ,CAAC,4CAA4C,CAAC;IACzD,CAAC;SACE,MAAM,CAAC;QACN,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,CAA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ACJ,CAAC;KACD,QAAQ,EAAE,CAAC;AAEd,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC;KAC/B,IAAI,CAAC,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;KAC1B,OAAO,CAAC,UAAU,CAAC;KACnB,QAAQ,CACP,qPAAqP,CACtP,CAAC"}
@@ -386,6 +386,18 @@ export declare const writeToolDefinitions: (import("@cyanheads/mcp-ts-core").Too
386
386
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
387
387
  readonly when: "Section append where the supplied content already appears at the target — rejected to keep retries idempotent (the default for the section path).";
388
388
  readonly recovery: "Change the content to something not already present at the target, or use obsidian_patch_note with `patchOptions.applyIfContentPreexists: true` if a duplicate is intended.";
389
+ }, {
390
+ readonly reason: "heading_outside_section";
391
+ readonly thrownBy: "service";
392
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
393
+ readonly when: "On Local REST API v5.0 and later, content appended to a heading carries a heading at or above that section’s own level, which would have to sit outside the section.";
394
+ readonly recovery: "Append the heading at the parent section or at the end of the note (no `section`), or write it one level below the target section or deeper.";
395
+ }, {
396
+ readonly reason: "patch_rejected";
397
+ readonly thrownBy: "service";
398
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
399
+ readonly when: "The section exists but the plugin refused the content for it — table rows for a block that is not a table, a row with the wrong cell count, a frontmatter value that cannot merge, or content of the wrong shape.";
400
+ readonly recovery: "Read the target with obsidian_get_note format section, then send content that fits it — rows matching the table columns, or a value of the field’s own type.";
389
401
  }, {
390
402
  readonly reason: "path_is_directory";
391
403
  readonly thrownBy: "service";
@@ -509,6 +521,18 @@ export declare const writeToolDefinitions: (import("@cyanheads/mcp-ts-core").Too
509
521
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
510
522
  readonly when: "The supplied content already appears at the target — the patch was rejected to keep retries idempotent (the default).";
511
523
  readonly recovery: "Pass `patchOptions.applyIfContentPreexists: true` to force-apply over preexisting content, or change the content to something not already present.";
524
+ }, {
525
+ readonly reason: "heading_outside_section";
526
+ readonly thrownBy: "service";
527
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
528
+ readonly when: "On Local REST API v5.0 and later, the content of a heading write carries a heading at or above the target section’s own level, which would have to sit outside the section.";
529
+ readonly recovery: "Append the heading at the parent section or at the end of the note with obsidian_append_to_note, or write it one level below the target section or deeper.";
530
+ }, {
531
+ readonly reason: "patch_rejected";
532
+ readonly thrownBy: "service";
533
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
534
+ readonly when: "The target exists but the plugin refused the content for it — table rows for a block that is not a table, a row with the wrong cell count, a frontmatter value that cannot merge, or content of the wrong shape.";
535
+ readonly recovery: "Read the target with obsidian_get_note format section, then send content that fits it — rows matching the table columns, or a value of the field’s own type.";
512
536
  }, {
513
537
  readonly reason: "path_is_directory";
514
538
  readonly thrownBy: "service";
@@ -612,6 +636,18 @@ export declare const writeToolDefinitions: (import("@cyanheads/mcp-ts-core").Too
612
636
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.Conflict;
613
637
  readonly when: "A bare heading leaf name matches more than one heading in the note, or the resolved full heading path occurs more than once, so the replacement target is undetermined.";
614
638
  readonly recovery: "Retry with a distinct full Parent::Child heading path from `candidates` on the error data; when every candidate is the same path, rename the repeated headings first.";
639
+ }, {
640
+ readonly reason: "heading_outside_section";
641
+ readonly thrownBy: "service";
642
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
643
+ readonly when: "On Local REST API v5.0 and later, the new body of a heading section carries a heading at or above that section’s own level, which would have to sit outside the section.";
644
+ readonly recovery: "Append the heading at the parent section or at the end of the note with obsidian_append_to_note, or write it one level below the target section or deeper.";
645
+ }, {
646
+ readonly reason: "patch_rejected";
647
+ readonly thrownBy: "service";
648
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
649
+ readonly when: "The section exists but the plugin refused the new content for it — table rows for a block that is not a table, a row with the wrong cell count, or content of the wrong shape.";
650
+ readonly recovery: "Read the target with obsidian_get_note format section, then send content that fits it — rows matching the table columns, or a value of the field’s own type.";
615
651
  }, {
616
652
  readonly reason: "path_is_directory";
617
653
  readonly thrownBy: "service";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAgBH,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AAEvE;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAK/B,CAAC;AAEF,kFAAkF;AAClF,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAQhC,CAAC;AAEF,mHAAmH;AACnH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAAiD,CAAC"}
@@ -100,6 +100,18 @@ export declare const obsidianAppendToNote: import("@cyanheads/mcp-ts-core").Tool
100
100
  readonly code: JsonRpcErrorCode.ValidationError;
101
101
  readonly when: "Section append where the supplied content already appears at the target — rejected to keep retries idempotent (the default for the section path).";
102
102
  readonly recovery: "Change the content to something not already present at the target, or use obsidian_patch_note with `patchOptions.applyIfContentPreexists: true` if a duplicate is intended.";
103
+ }, {
104
+ readonly reason: "heading_outside_section";
105
+ readonly thrownBy: "service";
106
+ readonly code: JsonRpcErrorCode.ValidationError;
107
+ readonly when: "On Local REST API v5.0 and later, content appended to a heading carries a heading at or above that section’s own level, which would have to sit outside the section.";
108
+ readonly recovery: "Append the heading at the parent section or at the end of the note (no `section`), or write it one level below the target section or deeper.";
109
+ }, {
110
+ readonly reason: "patch_rejected";
111
+ readonly thrownBy: "service";
112
+ readonly code: JsonRpcErrorCode.ValidationError;
113
+ readonly when: "The section exists but the plugin refused the content for it — table rows for a block that is not a table, a row with the wrong cell count, a frontmatter value that cannot merge, or content of the wrong shape.";
114
+ readonly recovery: "Read the target with obsidian_get_note format section, then send content that fits it — rows matching the table columns, or a value of the field’s own type.";
103
115
  }, {
104
116
  readonly reason: "path_is_directory";
105
117
  readonly thrownBy: "service";
@@ -1 +1 @@
1
- {"version":3,"file":"obsidian-append-to-note.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/obsidian-append-to-note.tool.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAIjE,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAmM/B,CAAC"}
1
+ {"version":3,"file":"obsidian-append-to-note.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/obsidian-append-to-note.tool.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAIjE,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAkN/B,CAAC"}
@@ -11,7 +11,7 @@ import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
11
11
  import { getObsidianService } from '../../../services/obsidian/obsidian-service.js';
12
12
  import { ContentTypeSchema, SectionSchema, TargetSchema } from './_shared/schemas.js';
13
13
  export const obsidianAppendToNote = tool('obsidian_append_to_note', {
14
- description: 'Append content to a note. **Without `section`: appends to the end of the file, or creates the file if it does not exist (your content becomes the full file).** With `section`: appends to the end of that heading/block/frontmatter — use `obsidian_get_note` with `format: "document-map"` to discover available targets. Name a heading by its full `Parent::Child` path as the document map lists it, or by a bare leaf name matched at any depth. A leaf shared by several headings is rejected with `ambiguous_section`, unless one of them has no parent heading, in which case the write targets that one; a full path that occurs more than once in the note is rejected with `ambiguous_section` too. For block-reference targets, content is concatenated adjacent to the block line without inserting a separator — include a leading newline in `content` if you want one. Set `createTargetIfMissing` to bring the target section into existence rather than failing when it does not exist.',
14
+ description: 'Append content to a note. **Without `section`: appends to the end of the file, or creates the file if it does not exist (your content becomes the full file).** With `section`: appends to the end of that heading/block/frontmatter (on Local REST API v5.0 and later, content appended to a heading is separated from the section’s existing content by a blank line, except a list item appended to a section that ends in a list and has no sub-headings, which continues that list) — use `obsidian_get_note` with `format: "document-map"` to discover available targets. Name a heading by its full `Parent::Child` path as the document map lists it, or by a bare leaf name matched at any depth. A leaf shared by several headings is rejected with `ambiguous_section`, unless one of them has no parent heading, in which case the write targets that one; a full path that occurs more than once in the note is rejected with `ambiguous_section` too. For block-reference targets, content is concatenated adjacent to the block line without inserting a separator — include a leading newline in `content` if you want one. Set `createTargetIfMissing` to bring the target section into existence rather than failing when it does not exist.',
15
15
  annotations: { destructiveHint: true },
16
16
  input: z.object({
17
17
  target: TargetSchema.describe('Where the note lives.'),
@@ -107,6 +107,20 @@ export const obsidianAppendToNote = tool('obsidian_append_to_note', {
107
107
  when: 'Section append where the supplied content already appears at the target — rejected to keep retries idempotent (the default for the section path).',
108
108
  recovery: 'Change the content to something not already present at the target, or use obsidian_patch_note with `patchOptions.applyIfContentPreexists: true` if a duplicate is intended.',
109
109
  },
110
+ {
111
+ reason: 'heading_outside_section',
112
+ thrownBy: 'service',
113
+ code: JsonRpcErrorCode.ValidationError,
114
+ when: 'On Local REST API v5.0 and later, content appended to a heading carries a heading at or above that section’s own level, which would have to sit outside the section.',
115
+ recovery: 'Append the heading at the parent section or at the end of the note (no `section`), or write it one level below the target section or deeper.',
116
+ },
117
+ {
118
+ reason: 'patch_rejected',
119
+ thrownBy: 'service',
120
+ code: JsonRpcErrorCode.ValidationError,
121
+ when: 'The section exists but the plugin refused the content for it — table rows for a block that is not a table, a row with the wrong cell count, a frontmatter value that cannot merge, or content of the wrong shape.',
122
+ recovery: 'Read the target with obsidian_get_note format section, then send content that fits it — rows matching the table columns, or a value of the field’s own type.',
123
+ },
110
124
  {
111
125
  reason: 'path_is_directory',
112
126
  thrownBy: 'service',
@@ -137,7 +151,6 @@ export const obsidianAppendToNote = tool('obsidian_append_to_note', {
137
151
  operation: 'append',
138
152
  targetType: input.section.type,
139
153
  target: input.section.target,
140
- targetDelimiter: input.section.type === 'heading' ? '::' : undefined,
141
154
  createTargetIfMissing: input.createTargetIfMissing,
142
155
  contentType: input.contentType,
143
156
  });
@@ -1 +1 @@
1
- {"version":3,"file":"obsidian-append-to-note.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/obsidian-append-to-note.tool.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAC7E,OAAO,EAAE,iBAAiB,EAAE,aAA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uB,MAAM,CAAC,eAAe,GAAG,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,MAAM,MAAM,CAAC,aAAa,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAC3G,CAAC;QACF,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACpD,CAAC;CACF,CAAC,CAAC"}
1
+ {"version":3,"file":"obsidian-append-to-note.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/obsidian-append-to-note.tool.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAC7E,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEtF,MAAM,CAAC,MAAM,oBAAoB,GAAG,IAAI,CAAC,yBAAyB,EAAE;IAClE,WAAW,EACT,gsCAAgsC;IAClsC,WAAW,EAAE,EAAE,eAAe,EAAE,IAAI,EAAE;IACtC,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,MAAM,EAAE,YAAY,CAAC,QAAQ,CAAC,uBAAuB,CAAC;QACtD,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,0DAA0D,CAAC;QACxF,OAAO,EAAE,aAAa,CAAC,QAAQ,EAAE,CAAC,QAAQ,CACxC,kGAAkG,CACnG;QACD,WAAW,EAAE,iBAAiB;QAC9B,qBAAqB,EAAE,CAAC;aACrB,OAAO,EAAE;aACT,OAAO,CAAC,KAAK,CAAC;aACd,QAAQ,CACP,qIAAqI,CACtI;KACJ,CAAC;IACF,MAAM,EAAE,CAAC,CAAC,MAAM,CA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CAAC,WAAW,CAAC,CAAC;QAC1E,MAAM,kBAAkB,GAAG,MAAM,GAAG,CAAC,OAAO,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC;QAC9D,OAAO;YACL,IAAI;YACJ,eAAe,EAAE,KAAK;YACtB,OAAO,EAAE,mBAAmB,KAAK,IAAI;YACrC,mBAAmB,EAAE,mBAAmB,IAAI,CAAC;YAC7C,kBAAkB;SACnB,CAAC;IACJ,CAAC;IAED,MAAM,EAAE,CAAC,MAAM,EAAE,EAAE;QACjB,MAAM,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,aAAa,CAAC;QAC1D,MAAM,KAAK,GAAG,CAAC,KAAK,MAAM,IAAI,MAAM,CAAC,IAAI,IAAI,CAAC,CAAC;QAC/C,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;YACnB,KAAK,CAAC,IAAI,CACR,kJAAkJ,CACnJ,CAAC;QACJ,CAAC;QACD,KAAK,CAAC,IAAI,CAAC,WAAW,MAAM,CAAC,mBAAmB,MAAM,MAAM,CAAC,kBAAkB,QAAQ,CAAC,CAAC;QACzF,KAAK,CAAC,IAAI,CAAC,cAAc,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC;QAC3C,KAAK,CAAC,IAAI,CACR,uBAAuB,MAAM,CAAC,eAAe,GAAG,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,MAAM,MAAM,CAAC,aAAa,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAC3G,CAAC;QACF,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACpD,CAAC;CACF,CAAC,CAAC"}
@@ -2,8 +2,9 @@
2
2
  * @fileoverview obsidian_manage_tags — add/remove/list tags across both
3
3
  * frontmatter (`tags:` array) and inline (`#tag`) syntax. The service layer
4
4
  * reconciles both representations; inline detection follows Obsidian's own
5
- * reading — it skips code spans, link spans, HTML comments, math, and a `#`
6
- * glued to the text before it rather than to whitespace, line start, or
5
+ * reading — it skips code (fenced, indented, inline), HTML blocks and
6
+ * comments, math, wikilinks, images, a link's destination or label, and a
7
+ * `#` glued to the text before it rather than to whitespace, line start, or
7
8
  * markup.
8
9
  * @module mcp-server/tools/definitions/obsidian-manage-tags.tool
9
10
  */
@@ -1 +1 @@
1
- {"version":3,"file":"obsidian-manage-tags.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/obsidian-manage-tags.tool.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAYjE,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAsP7B,CAAC"}
1
+ {"version":3,"file":"obsidian-manage-tags.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/obsidian-manage-tags.tool.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAYjE,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAsP7B,CAAC"}
@@ -2,8 +2,9 @@
2
2
  * @fileoverview obsidian_manage_tags — add/remove/list tags across both
3
3
  * frontmatter (`tags:` array) and inline (`#tag`) syntax. The service layer
4
4
  * reconciles both representations; inline detection follows Obsidian's own
5
- * reading — it skips code spans, link spans, HTML comments, math, and a `#`
6
- * glued to the text before it rather than to whitespace, line start, or
5
+ * reading — it skips code (fenced, indented, inline), HTML blocks and
6
+ * comments, math, wikilinks, images, a link's destination or label, and a
7
+ * `#` glued to the text before it rather than to whitespace, line start, or
7
8
  * markup.
8
9
  * @module mcp-server/tools/definitions/obsidian-manage-tags.tool
9
10
  */
@@ -17,7 +18,7 @@ const LocationSchema = z
17
18
  .default('frontmatter')
18
19
  .describe('Where to apply the change. Defaults to `frontmatter` (the canonical Obsidian tag location, leaves the body untouched). `inline` mutates the note body — `add` appends `#tag` at end-of-file. `both` is opt-in reconciliation of frontmatter and inline tag locations.');
19
20
  export const obsidianManageTags = tool('obsidian_manage_tags', {
20
- description: "Add, remove, or list a note's tags. Defaults to the frontmatter `tags:` array — set `location` to `inline` or `both` to mutate the note body. `add` ensures the tag is present in the requested location(s); `remove` strips it; `both` reconciles across both representations. Inline `#tag` detection skips code spans (fenced and inline), link spans (`[[...]]`, `[text](...)`, `[text][ref]`) so a heading anchor, block anchor, or wikilink alias is never read as a tag or rewritten by a removal, and HTML comments (`<!-- … -->`) and math (`$…$`, `$$…$$`), where Obsidian indexes no tag. An inline tag starts at line start, after whitespace, or right after markup such as `**`, `==`, `<br>`, or a `\\`-escape (`**#x**` is a tag; `(#x`, `a *#x`, and `\\#x` are not); a `#` inside a `%% … %%` comment still counts. Inline-location additions append the new tag at end-of-file. `list` ignores the input `tags` array.",
21
+ description: "Add, remove, or list a note's tags. Defaults to the frontmatter `tags:` array — set `location` to `inline` or `both` to mutate the note body. `add` ensures the tag is present in the requested location(s); `remove` strips it; `both` reconciles across both representations. Inline `#tag` detection skips what Obsidian indexes no tag in: code (fenced, indented, and inline), wikilinks (`[[...]]` — so a heading anchor, block anchor, or wikilink alias is never read as a tag or rewritten by a removal), images, a markdown link's destination or label (its text is read), HTML blocks and comments (`<!-- … -->`), and math (`$…$`, `$$…$$`). An inline tag starts at line start, after whitespace, after another tag (`#a#b` is two tags), or right after markup such as `**`, `_…_`, `==`, `[`, a table cell's `|`, `<br>`, or a `\\`-escape (`**#x**` is a tag; `(#x`, `a *#x`, and `\\#x` are not); a `#` inside a `%% … %%` comment still counts. Inline-location additions append the new tag at end-of-file. `list` ignores the input `tags` array.",
21
22
  annotations: { destructiveHint: true },
22
23
  input: z.object({
23
24
  target: TargetSchema.describe('Where the note lives.'),
@@ -1 +1 @@
1
- {"version":3,"file":"obsidian-manage-tags.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/obsidian-manage-tags.tool.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AAC5F,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAC7E,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEpD,MAAM,cAAc,GAAG,CAAC;KACrB,IAAI,CAAC,CAAC,aAAa,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;KACvC,OAAO,CAAC,aAAa,CAAC;KACtB,QAAQ,CACP,uQAAuQ,CACxQ,CAAC;AAEJ,MAAM,CAAC,MAAM,kBAAkB,GAAG,IAAI,CAAC,sBAAsB,EAAE;IAC7D,WAAW,EACT,24BAA24B;IAC74B,WAAW,EAAE,EAAE,eAAe,EAAE,IAAI,EAAE;IACtC,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,MAAM,EAAE,YAAY,CAAC,QAAQ,CAAC,uBAAuB,CAAC;QACtD,SAAS,EAAE,CAAC;aACT,IAAI,CAAC,CAAC,KAAK,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;aAC/B,QAAQ,CAAC,uEAAuE,CAAC;QACpF,IAAI,EAAE,CAAC;aAC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AAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACpD,CAAC;QACD,MAAM,KAAK,GAAG;YACZ,KAAK,MAAM,CAAC,SAAS,KAAK,KAAK,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,mBAAmB,IAAI,MAAM,CAAC,IAAI,kBAAkB,MAAM,CAAC,SAAS,GAAG;YAC3H,WAAW,MAAM,CAAC,mBAAmB,MAAM,MAAM,CAAC,kBAAkB,QAAQ;YAC5E,aAAa,MAAM,CAAC,OAAO,CAAC,MAAM,OAAO,UAAU,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE;YACrE,aAAa,MAAM,CAAC,OAAO,CAAC,MAAM,OAAO,UAAU,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE;YACrE,kBAAkB,MAAM,CAAC,IAAI,CAAC,MAAM,OAAO,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE;SACrE,CAAC;QACF,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACpD,CAAC;CACF,CAAC,CAAC;AAEH,SAAS,UAAU,CAAC,IAAc;IAChC,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,UAAU,CAAC;IACzC,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAChD,CAAC"}
1
+ {"version":3,"file":"obsidian-manage-tags.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/obsidian-manage-tags.tool.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,M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AO,UAAU,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE;YACrE,kBAAkB,MAAM,CAAC,IAAI,CAAC,MAAM,OAAO,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE;SACrE,CAAC;QACF,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACpD,CAAC;CACF,CAAC,CAAC;AAEH,SAAS,UAAU,CAAC,IAAc;IAChC,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,UAAU,CAAC;IACzC,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAChD,CAAC"}
@@ -1,7 +1,8 @@
1
1
  /**
2
2
  * @fileoverview obsidian_patch_note — surgical edit (`append` / `prepend` /
3
- * `replace`) of a heading, block reference, or frontmatter field. Uses the
4
- * upstream Local REST API v3 PATCH protocol.
3
+ * `replace`) of a heading, block reference, or frontmatter field, through the
4
+ * Local REST API's PATCH endpoint in whichever markdown-patch format the
5
+ * installed plugin speaks.
5
6
  * @module mcp-server/tools/definitions/obsidian-patch-note.tool
6
7
  */
7
8
  import { z } from '@cyanheads/mcp-ts-core';
@@ -117,6 +118,18 @@ export declare const obsidianPatchNote: import("@cyanheads/mcp-ts-core").ToolDef
117
118
  readonly code: JsonRpcErrorCode.ValidationError;
118
119
  readonly when: "The supplied content already appears at the target — the patch was rejected to keep retries idempotent (the default).";
119
120
  readonly recovery: "Pass `patchOptions.applyIfContentPreexists: true` to force-apply over preexisting content, or change the content to something not already present.";
121
+ }, {
122
+ readonly reason: "heading_outside_section";
123
+ readonly thrownBy: "service";
124
+ readonly code: JsonRpcErrorCode.ValidationError;
125
+ readonly when: "On Local REST API v5.0 and later, the content of a heading write carries a heading at or above the target section’s own level, which would have to sit outside the section.";
126
+ readonly recovery: "Append the heading at the parent section or at the end of the note with obsidian_append_to_note, or write it one level below the target section or deeper.";
127
+ }, {
128
+ readonly reason: "patch_rejected";
129
+ readonly thrownBy: "service";
130
+ readonly code: JsonRpcErrorCode.ValidationError;
131
+ readonly when: "The target exists but the plugin refused the content for it — table rows for a block that is not a table, a row with the wrong cell count, a frontmatter value that cannot merge, or content of the wrong shape.";
132
+ readonly recovery: "Read the target with obsidian_get_note format section, then send content that fits it — rows matching the table columns, or a value of the field’s own type.";
120
133
  }, {
121
134
  readonly reason: "path_is_directory";
122
135
  readonly thrownBy: "service";
@@ -1 +1 @@
1
- {"version":3,"file":"obsidian-patch-note.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/obsidian-patch-note.tool.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AASjE,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAyK5B,CAAC"}
1
+ {"version":3,"file":"obsidian-patch-note.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/obsidian-patch-note.tool.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AASjE,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAwL5B,CAAC"}
@@ -1,7 +1,8 @@
1
1
  /**
2
2
  * @fileoverview obsidian_patch_note — surgical edit (`append` / `prepend` /
3
- * `replace`) of a heading, block reference, or frontmatter field. Uses the
4
- * upstream Local REST API v3 PATCH protocol.
3
+ * `replace`) of a heading, block reference, or frontmatter field, through the
4
+ * Local REST API's PATCH endpoint in whichever markdown-patch format the
5
+ * installed plugin speaks.
5
6
  * @module mcp-server/tools/definitions/obsidian-patch-note.tool
6
7
  */
7
8
  import { tool, z } from '@cyanheads/mcp-ts-core';
@@ -9,7 +10,7 @@ import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
9
10
  import { getObsidianService } from '../../../services/obsidian/obsidian-service.js';
10
11
  import { ContentTypeSchema, PatchOptionsSchema, SectionSchema, TargetSchema, } from './_shared/schemas.js';
11
12
  export const obsidianPatchNote = tool('obsidian_patch_note', {
12
- description: 'Edit a heading, block reference, or frontmatter field in place — append to, prepend to, or replace the target\'s body. Use `obsidian_get_note` with `format: "document-map"` to discover available targets first. Name a heading by its full `Parent::Child` path as the document map lists it, or by a bare leaf name matched at any depth. A leaf shared by several headings is rejected with `ambiguous_section`, unless one of them has no parent heading, in which case the write targets that one; a full path that occurs more than once in the note is rejected with `ambiguous_section` too.',
13
+ description: 'Edit a heading, block reference, or frontmatter field in place — append to, prepend to, or replace the target\'s body. On Local REST API v5.0 and later, content appended or prepended to a heading is separated from the section’s existing content by a blank line, except a list item appended to a section that ends in a list and has no sub-headings, or prepended to one that opens with a list, which continues that list. Use `obsidian_get_note` with `format: "document-map"` to discover available targets first. Name a heading by its full `Parent::Child` path as the document map lists it, or by a bare leaf name matched at any depth. A leaf shared by several headings is rejected with `ambiguous_section`, unless one of them has no parent heading, in which case the write targets that one; a full path that occurs more than once in the note is rejected with `ambiguous_section` too.',
13
14
  annotations: { destructiveHint: true },
14
15
  input: z.object({
15
16
  target: TargetSchema.describe('Where the note lives.'),
@@ -99,6 +100,20 @@ export const obsidianPatchNote = tool('obsidian_patch_note', {
99
100
  when: 'The supplied content already appears at the target — the patch was rejected to keep retries idempotent (the default).',
100
101
  recovery: 'Pass `patchOptions.applyIfContentPreexists: true` to force-apply over preexisting content, or change the content to something not already present.',
101
102
  },
103
+ {
104
+ reason: 'heading_outside_section',
105
+ thrownBy: 'service',
106
+ code: JsonRpcErrorCode.ValidationError,
107
+ when: 'On Local REST API v5.0 and later, the content of a heading write carries a heading at or above the target section’s own level, which would have to sit outside the section.',
108
+ recovery: 'Append the heading at the parent section or at the end of the note with obsidian_append_to_note, or write it one level below the target section or deeper.',
109
+ },
110
+ {
111
+ reason: 'patch_rejected',
112
+ thrownBy: 'service',
113
+ code: JsonRpcErrorCode.ValidationError,
114
+ when: 'The target exists but the plugin refused the content for it — table rows for a block that is not a table, a row with the wrong cell count, a frontmatter value that cannot merge, or content of the wrong shape.',
115
+ recovery: 'Read the target with obsidian_get_note format section, then send content that fits it — rows matching the table columns, or a value of the field’s own type.',
116
+ },
102
117
  {
103
118
  reason: 'path_is_directory',
104
119
  thrownBy: 'service',
@@ -127,7 +142,6 @@ export const obsidianPatchNote = tool('obsidian_patch_note', {
127
142
  operation: input.operation,
128
143
  targetType: input.section.type,
129
144
  target: input.section.target,
130
- targetDelimiter: input.section.type === 'heading' ? '::' : undefined,
131
145
  createTargetIfMissing: input.patchOptions?.createTargetIfMissing,
132
146
  applyIfContentPreexists: input.patchOptions?.applyIfContentPreexists,
133
147
  trimTargetWhitespace: input.patchOptions?.trimTargetWhitespace,
@@ -1 +1 @@
1
- {"version":3,"file":"obsidian-patch-note.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/obsidian-patch-note.tool.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AA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uB,EAAE,KAAK,CAAC,YAAY,EAAE,uBAAuB;YACpE,oBAAoB,EAAE,KAAK,CAAC,YAAY,EAAE,oBAAoB;YAC9D,WAAW,EAAE,KAAK,CAAC,WAAW;SAC/B,CAAC,CAAC;QACH,MAAM,kBAAkB,GAAG,MAAM,GAAG,CAAC,OAAO,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC;QAE9D,OAAO;YACL,IAAI;YACJ,OAAO,EAAE,EAAE,GAAG,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE;YACrD,SAAS,EAAE,KAAK,CAAC,SAAS;YAC1B,mBAAmB;YACnB,kBAAkB;SACnB,CAAC;IACJ,CAAC;IAED,MAAM,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC;QAClB;YACE,IAAI,EAAE,MAAM;YACZ,IAAI,EAAE;gBACJ,aAAa,MAAM,CAAC,IAAI,IAAI;gBAC5B,gBAAgB,MAAM,CAAC,SAAS,EAAE;gBAClC,cAAc,MAAM,CAAC,OAAO,CAAC,IAAI,MAAM,MAAM,CAAC,OAAO,CAAC,MAAM,EAAE;gBAC9D,WAAW,MAAM,CAAC,mBAAmB,MAAM,MAAM,CAAC,kBAAkB,QAAQ;aAC7E,CAAC,IAAI,CAAC,IAAI,CAAC;SACb;KACF;CACF,CAAC,CAAC"}
1
+ {"version":3,"file":"obsidian-patch-note.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/obsidian-patch-note.tool.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAC7E,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,aAAa,EACb,YAAY,GACb,MAAM,sBAAsB,CAAC;AAE9B,MAAM,CAAC,MAAM,iB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C,OAAO,CAAC,MAAM;YAC5B,qBAAqB,EAAE,KAAK,CAAC,YAAY,EAAE,qBAAqB;YAChE,uBAAuB,EAAE,KAAK,CAAC,YAAY,EAAE,uBAAuB;YACpE,oBAAoB,EAAE,KAAK,CAAC,YAAY,EAAE,oBAAoB;YAC9D,WAAW,EAAE,KAAK,CAAC,WAAW;SAC/B,CAAC,CAAC;QACH,MAAM,kBAAkB,GAAG,MAAM,GAAG,CAAC,OAAO,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC;QAE9D,OAAO;YACL,IAAI;YACJ,OAAO,EAAE,EAAE,GAAG,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE;YACrD,SAAS,EAAE,KAAK,CAAC,SAAS;YAC1B,mBAAmB;YACnB,kBAAkB;SACnB,CAAC;IACJ,CAAC;IAED,MAAM,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC;QAClB;YACE,IAAI,EAAE,MAAM;YACZ,IAAI,EAAE;gBACJ,aAAa,MAAM,CAAC,IAAI,IAAI;gBAC5B,gBAAgB,MAAM,CAAC,SAAS,EAAE;gBAClC,cAAc,MAAM,CAAC,OAAO,CAAC,IAAI,MAAM,MAAM,CAAC,OAAO,CAAC,MAAM,EAAE;gBAC9D,WAAW,MAAM,CAAC,mBAAmB,MAAM,MAAM,CAAC,kBAAkB,QAAQ;aAC7E,CAAC,IAAI,CAAC,IAAI,CAAC;SACb;KACF;CACF,CAAC,CAAC"}
@@ -96,6 +96,18 @@ export declare const obsidianWriteNote: import("@cyanheads/mcp-ts-core").ToolDef
96
96
  readonly code: JsonRpcErrorCode.Conflict;
97
97
  readonly when: "A bare heading leaf name matches more than one heading in the note, or the resolved full heading path occurs more than once, so the replacement target is undetermined.";
98
98
  readonly recovery: "Retry with a distinct full Parent::Child heading path from `candidates` on the error data; when every candidate is the same path, rename the repeated headings first.";
99
+ }, {
100
+ readonly reason: "heading_outside_section";
101
+ readonly thrownBy: "service";
102
+ readonly code: JsonRpcErrorCode.ValidationError;
103
+ readonly when: "On Local REST API v5.0 and later, the new body of a heading section carries a heading at or above that section’s own level, which would have to sit outside the section.";
104
+ readonly recovery: "Append the heading at the parent section or at the end of the note with obsidian_append_to_note, or write it one level below the target section or deeper.";
105
+ }, {
106
+ readonly reason: "patch_rejected";
107
+ readonly thrownBy: "service";
108
+ readonly code: JsonRpcErrorCode.ValidationError;
109
+ readonly when: "The section exists but the plugin refused the new content for it — table rows for a block that is not a table, a row with the wrong cell count, or content of the wrong shape.";
110
+ readonly recovery: "Read the target with obsidian_get_note format section, then send content that fits it — rows matching the table columns, or a value of the field’s own type.";
99
111
  }, {
100
112
  readonly reason: "path_is_directory";
101
113
  readonly thrownBy: "service";
@@ -1 +1 @@
1
- {"version":3,"file":"obsidian-write-note.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/obsidian-write-note.tool.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAKjE,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA6M5B,CAAC"}
1
+ {"version":3,"file":"obsidian-write-note.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/obsidian-write-note.tool.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAKjE,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA4N5B,CAAC"}