obsidian-mcp-server 3.1.0 → 3.1.1

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 (54) hide show
  1. package/CLAUDE.md +14 -8
  2. package/README.md +1 -1
  3. package/changelog/3.1.x/3.1.1.md +21 -0
  4. package/dist/mcp-server/tools/definitions/index.d.ts +62 -0
  5. package/dist/mcp-server/tools/definitions/index.d.ts.map +1 -1
  6. package/dist/mcp-server/tools/definitions/obsidian-delete-note.tool.d.ts +9 -0
  7. package/dist/mcp-server/tools/definitions/obsidian-delete-note.tool.d.ts.map +1 -1
  8. package/dist/mcp-server/tools/definitions/obsidian-delete-note.tool.js +14 -1
  9. package/dist/mcp-server/tools/definitions/obsidian-delete-note.tool.js.map +1 -1
  10. package/dist/mcp-server/tools/definitions/obsidian-execute-command.tool.d.ts +1 -0
  11. package/dist/mcp-server/tools/definitions/obsidian-execute-command.tool.d.ts.map +1 -1
  12. package/dist/mcp-server/tools/definitions/obsidian-execute-command.tool.js +1 -0
  13. package/dist/mcp-server/tools/definitions/obsidian-execute-command.tool.js.map +1 -1
  14. package/dist/mcp-server/tools/definitions/obsidian-get-note.tool.d.ts +9 -0
  15. package/dist/mcp-server/tools/definitions/obsidian-get-note.tool.d.ts.map +1 -1
  16. package/dist/mcp-server/tools/definitions/obsidian-get-note.tool.js +11 -0
  17. package/dist/mcp-server/tools/definitions/obsidian-get-note.tool.js.map +1 -1
  18. package/dist/mcp-server/tools/definitions/obsidian-list-notes.tool.d.ts +2 -0
  19. package/dist/mcp-server/tools/definitions/obsidian-list-notes.tool.d.ts.map +1 -1
  20. package/dist/mcp-server/tools/definitions/obsidian-list-notes.tool.js +3 -1
  21. package/dist/mcp-server/tools/definitions/obsidian-list-notes.tool.js.map +1 -1
  22. package/dist/mcp-server/tools/definitions/obsidian-manage-frontmatter.tool.d.ts +9 -0
  23. package/dist/mcp-server/tools/definitions/obsidian-manage-frontmatter.tool.d.ts.map +1 -1
  24. package/dist/mcp-server/tools/definitions/obsidian-manage-frontmatter.tool.js +11 -0
  25. package/dist/mcp-server/tools/definitions/obsidian-manage-frontmatter.tool.js.map +1 -1
  26. package/dist/mcp-server/tools/definitions/obsidian-manage-tags.tool.d.ts +9 -0
  27. package/dist/mcp-server/tools/definitions/obsidian-manage-tags.tool.d.ts.map +1 -1
  28. package/dist/mcp-server/tools/definitions/obsidian-manage-tags.tool.js +11 -1
  29. package/dist/mcp-server/tools/definitions/obsidian-manage-tags.tool.js.map +1 -1
  30. package/dist/mcp-server/tools/definitions/obsidian-open-in-ui.tool.d.ts +1 -0
  31. package/dist/mcp-server/tools/definitions/obsidian-open-in-ui.tool.d.ts.map +1 -1
  32. package/dist/mcp-server/tools/definitions/obsidian-open-in-ui.tool.js +8 -4
  33. package/dist/mcp-server/tools/definitions/obsidian-open-in-ui.tool.js.map +1 -1
  34. package/dist/mcp-server/tools/definitions/obsidian-patch-note.tool.d.ts +9 -0
  35. package/dist/mcp-server/tools/definitions/obsidian-patch-note.tool.d.ts.map +1 -1
  36. package/dist/mcp-server/tools/definitions/obsidian-patch-note.tool.js +10 -0
  37. package/dist/mcp-server/tools/definitions/obsidian-patch-note.tool.js.map +1 -1
  38. package/dist/mcp-server/tools/definitions/obsidian-replace-in-note.tool.d.ts +9 -0
  39. package/dist/mcp-server/tools/definitions/obsidian-replace-in-note.tool.d.ts.map +1 -1
  40. package/dist/mcp-server/tools/definitions/obsidian-replace-in-note.tool.js +11 -1
  41. package/dist/mcp-server/tools/definitions/obsidian-replace-in-note.tool.js.map +1 -1
  42. package/dist/mcp-server/tools/definitions/obsidian-search-notes.tool.d.ts +3 -0
  43. package/dist/mcp-server/tools/definitions/obsidian-search-notes.tool.d.ts.map +1 -1
  44. package/dist/mcp-server/tools/definitions/obsidian-search-notes.tool.js +7 -0
  45. package/dist/mcp-server/tools/definitions/obsidian-search-notes.tool.js.map +1 -1
  46. package/dist/mcp-server/tools/definitions/obsidian-write-note.tool.d.ts +1 -0
  47. package/dist/mcp-server/tools/definitions/obsidian-write-note.tool.d.ts.map +1 -1
  48. package/dist/mcp-server/tools/definitions/obsidian-write-note.tool.js +7 -1
  49. package/dist/mcp-server/tools/definitions/obsidian-write-note.tool.js.map +1 -1
  50. package/dist/services/obsidian/obsidian-service.d.ts.map +1 -1
  51. package/dist/services/obsidian/obsidian-service.js +18 -11
  52. package/dist/services/obsidian/obsidian-service.js.map +1 -1
  53. package/package.json +2 -4
  54. package/server.json +3 -3
package/CLAUDE.md CHANGED
@@ -177,25 +177,33 @@ The framework also provides `ctx.state`, `ctx.sample`, and `ctx.progress`. They
177
177
 
178
178
  Handlers throw — the framework catches, classifies, and formats.
179
179
 
180
- **Recommended: typed error contract.** Declare `errors: [{ reason, code, when, retryable? }]` on `tool()` / `resource()` to advertise the failure surface in `tools/list` (under `_meta['mcp-ts-core/errors']`) and receive a typed `ctx.fail(reason, …)` keyed by the declared reason union. TypeScript catches `ctx.fail('typo')` at compile time, `data.reason` is auto-populated for observability, and the linter enforces conformance against the handler body. Baseline codes (`InternalError`, `ServiceUnavailable`, `Timeout`, `ValidationError`, `SerializationError`) bubble freely and don't need declaring.
180
+ **Recommended: typed error contract.** Declare `errors: [{ reason, code, when, recovery, retryable? }]` on `tool()` / `resource()` to receive a typed `ctx.fail(reason, …)` keyed by the declared reason union. TypeScript catches `ctx.fail('typo')` at compile time, `data.reason` is auto-populated for observability, and the linter enforces conformance against the handler body. The `recovery` field is required descriptive metadata (≥ 5 words, lint-validated) — it's the single source of truth for the recovery hint that flows to the wire. Spread `ctx.recoveryFor('reason')` into `data` to opt the contract recovery onto the wire (the framework mirrors `data.recovery.hint` into `content[]` text). Override with explicit `{ recovery: { hint: '...' } }` when runtime context matters. Baseline codes (`InternalError`, `ServiceUnavailable`, `Timeout`, `ValidationError`, `SerializationError`) bubble freely and don't need declaring.
181
181
 
182
182
  ```ts
183
183
  errors: [
184
- { reason: 'note_missing', code: JsonRpcErrorCode.NotFound, when: 'No note matched the path' },
185
- { reason: 'plugin_unreachable', code: JsonRpcErrorCode.ServiceUnavailable, when: 'Local REST API plugin is offline', retryable: true },
184
+ { reason: 'note_missing', code: JsonRpcErrorCode.NotFound,
185
+ when: 'No note matched the path',
186
+ recovery: 'Verify the path with obsidian_list_notes or use obsidian_search_notes to locate the note.' },
187
+ { reason: 'plugin_unreachable', code: JsonRpcErrorCode.ServiceUnavailable,
188
+ when: 'Local REST API plugin is offline', retryable: true,
189
+ recovery: 'Confirm Obsidian is running with the Local REST API plugin enabled.' },
186
190
  ],
187
191
  async handler(input, ctx) {
188
192
  const note = await svc.getNote(input.path, ctx);
189
- if (!note) throw ctx.fail('note_missing', `Note ${input.path} not found`);
193
+ // Static recovery pulled from the contract via ctx.recoveryFor.
194
+ if (!note) throw ctx.fail('note_missing', `Note ${input.path} not found`, {
195
+ ...ctx.recoveryFor('note_missing'),
196
+ });
190
197
  return note;
191
198
  }
192
199
  ```
193
200
 
194
- Services don't have `ctx.fail` they pass `data: { reason: 'note_missing' }` to a factory so the wire shape matches what `ctx.fail` produces:
201
+ Services that accept `ctx` use the same resolver for parity. The Obsidian service threads `ctx` into `#throwForStatus` and spreads `ctx.recoveryFor(reason)` per status branch, so service-side throws carry the calling tool's contract recovery onto the wire:
195
202
 
196
203
  ```ts
197
204
  // inside obsidian-service.ts
198
- throw notFound('Note not found', { reason: 'note_missing', path });
205
+ throw notFound(`Not found: ${display}`, data('note_missing'));
206
+ // where data(reason) does: { path, reason, ...ctx.recoveryFor(reason), upstream? }
199
207
  ```
200
208
 
201
209
  **Fallback for ad-hoc throws** (no contract entry fits, prototype tools, service-layer code without a contract): use error factories.
@@ -306,8 +314,6 @@ When you complete a skill's checklist, check the boxes and add a completion time
306
314
  | `bun run format` | Auto-fix formatting (Biome) |
307
315
  | `bun run lint:mcp` | Validate MCP definitions against the linter rules |
308
316
  | `bun run test` | Run Vitest tests |
309
- | `bun run dev:stdio` | Dev mode (stdio, watch) |
310
- | `bun run dev:http` | Dev mode (HTTP, watch) |
311
317
  | `bun run start:stdio` | Production mode (stdio) — requires `bun run build` first |
312
318
  | `bun run start:http` | Production mode (HTTP) — requires `bun run build` first |
313
319
  | `bun run changelog:build` | Regenerate `CHANGELOG.md` rollup from `changelog/<minor>.x/*.md` |
package/README.md CHANGED
@@ -7,7 +7,7 @@
7
7
 
8
8
  <div align="center">
9
9
 
10
- [![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) [![Version](https://img.shields.io/badge/Version-3.1.0-blue.svg?style=flat-square)](./CHANGELOG.md) [![Framework](https://img.shields.io/badge/Built%20on-@cyanheads/mcp--ts--core-259?style=flat-square)](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) [![MCP SDK](https://img.shields.io/badge/MCP%20SDK-^1.29.0-green.svg?style=flat-square)](https://modelcontextprotocol.io/)
10
+ [![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) [![Version](https://img.shields.io/badge/Version-3.1.1-blue.svg?style=flat-square)](./CHANGELOG.md) [![Framework](https://img.shields.io/badge/Built%20on-@cyanheads/mcp--ts--core-259?style=flat-square)](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) [![MCP SDK](https://img.shields.io/badge/MCP%20SDK-^1.29.0-green.svg?style=flat-square)](https://modelcontextprotocol.io/)
11
11
 
12
12
  [![License](https://img.shields.io/badge/License-Apache%202.0-orange.svg?style=flat-square)](./LICENSE) [![TypeScript](https://img.shields.io/badge/TypeScript-^6.0.3-3178C6.svg?style=flat-square)](https://www.typescriptlang.org/) [![Bun](https://img.shields.io/badge/Bun-v1.3.11-blueviolet.svg?style=flat-square)](https://bun.sh/)
13
13
 
@@ -0,0 +1,21 @@
1
+ ---
2
+ summary: Adopt the mcp-ts-core 0.8.6 recovery-hint contract — every error declares a recovery, ObsidianService threads it onto the wire, and a new periodic_disabled reason distinguishes a disabled period from a missing periodic note.
3
+ breaking: false
4
+ ---
5
+
6
+ # 3.1.1 — 2026-04-29
7
+
8
+ A propagation pass for the typed-error contract upgrade in `@cyanheads/mcp-ts-core` 0.8.6. Every tool's `errors[]` now declares a `recovery` hint, the Obsidian service threads `ctx` through its status classifier so service-side throws inherit the calling tool's recovery, and `obsidian_open_in_ui` / `obsidian_write_note` lift long remediation guidance out of the error message into structured `data.recovery.hint`.
9
+
10
+ ## Added
11
+
12
+ - **`periodic_disabled` error reason** on every tool that resolves a `periodic` target (`obsidian_get_note`, `obsidian_patch_note`, `obsidian_replace_in_note`, `obsidian_manage_frontmatter`, `obsidian_manage_tags`, `obsidian_delete_note`). Fired when the upstream Local REST API returns a 400 with `"Specified period is not enabled"` — the requested period (`daily` / `weekly` / `monthly` / `quarterly` / `yearly`) is turned off in Obsidian's Periodic Notes plugin settings. Distinct from `periodic_not_found` (404, the period is enabled but no note exists for the requested date), so clients can suggest enabling the period rather than creating a note.
13
+
14
+ ## Changed
15
+
16
+ - **Every error contract entry now carries a `recovery` hint.** Required descriptive metadata under `mcp-ts-core` 0.8.6 — lint enforces it. Recovery flows to the wire via `ctx.recoveryFor(reason)` (spread into the `ctx.fail(...)` data bag) and the framework mirrors `data.recovery.hint` into the rendered `content[]` text, so clients that render structured error data and clients that parse text both see the same actionable next step.
17
+ - **`obsidian_open_in_ui` and `obsidian_write_note` lift long remediation text into `data.recovery.hint`.** The `note_missing` and `file_exists` error messages drop the `Did you mean:` suggestions, the `failIfMissing: false` tip, and the `obsidian_patch_note` / `obsidian_append_to_note` / `obsidian_replace_in_note` referrals — those move into a structured `recovery.hint` field. Wire-visible: clients that read `error.data.recovery.hint` see a cleaner separation of "what happened" from "how to fix it."
18
+ - **`ObsidianService.#throwForStatus` threads `ctx`.** The status classifier now spreads `ctx.recoveryFor(reason)` per branch, so service-side throws (`note_missing`, `no_active_file`, `periodic_not_found`, `periodic_disabled`, `command_unknown`, `path_is_directory`, `section_target_missing`) inherit the calling tool's contract recovery instead of needing per-tool plumbing.
19
+ - **Drop `dev:stdio` / `dev:http` scripts.** `bun --watch src/index.ts` works directly without the wrapper. The CLAUDE.md commands table loses the two duplicates.
20
+ - **Dependency bump:** `@cyanheads/mcp-ts-core` 0.8.2 → 0.8.6.
21
+ - **Skills synced** with framework patterns: `add-tool`, `add-service`, `api-context`, `api-errors`, `design-mcp-server`, `field-test`.
@@ -65,18 +65,27 @@ export declare const baseToolDefinitions: (import("@cyanheads/mcp-ts-core").Tool
65
65
  readonly reason: "cancelled";
66
66
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.InvalidRequest;
67
67
  readonly when: "User declined the deletion via interactive elicitation.";
68
+ readonly recovery: "Re-run the tool when the user is ready to confirm deletion.";
68
69
  }, {
69
70
  readonly reason: "note_missing";
70
71
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
71
72
  readonly when: "The vault path does not resolve to an existing note.";
73
+ readonly recovery: "Verify the path with obsidian_list_notes or use obsidian_search_notes to locate the note.";
72
74
  }, {
73
75
  readonly reason: "no_active_file";
74
76
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
75
77
  readonly when: "Target was `active` but no file is currently open in Obsidian.";
78
+ readonly recovery: "Open a note in Obsidian or pass an explicit path target instead.";
76
79
  }, {
77
80
  readonly reason: "periodic_not_found";
78
81
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
79
82
  readonly when: "Target was `periodic` but no matching periodic note exists.";
83
+ readonly recovery: "Pass an explicit path target — periodic notes must already exist.";
84
+ }, {
85
+ readonly reason: "periodic_disabled";
86
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
87
+ readonly when: "Target was `periodic` but the requested period is not enabled in Obsidian's Periodic Notes plugin settings.";
88
+ readonly recovery: "Enable the period in Obsidian's Periodic Notes plugin settings, or pass an explicit path target instead.";
80
89
  }]> | import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
81
90
  format: import("zod").ZodEnum<{
82
91
  content: "content";
@@ -148,18 +157,27 @@ export declare const baseToolDefinitions: (import("@cyanheads/mcp-ts-core").Tool
148
157
  readonly reason: "section_required";
149
158
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
150
159
  readonly when: "`format` is \"section\" but no `section` locator was provided.";
160
+ readonly recovery: "Pass `section: { type, target }` (e.g. `{ type: \"heading\", target: \"Intro\" }`), or use `format: \"full\"` / `\"document-map\"` instead.";
151
161
  }, {
152
162
  readonly reason: "note_missing";
153
163
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
154
164
  readonly when: "The vault path does not resolve to an existing note.";
165
+ readonly recovery: "Verify the path with obsidian_list_notes or use obsidian_search_notes to locate the note.";
155
166
  }, {
156
167
  readonly reason: "no_active_file";
157
168
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
158
169
  readonly when: "Target was `active` but no file is currently open in Obsidian.";
170
+ readonly recovery: "Open a note in Obsidian or pass an explicit path target instead.";
159
171
  }, {
160
172
  readonly reason: "periodic_not_found";
161
173
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
162
174
  readonly when: "Target was `periodic` but no matching periodic note exists.";
175
+ readonly recovery: "Create the periodic note first or pass an explicit path target.";
176
+ }, {
177
+ readonly reason: "periodic_disabled";
178
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
179
+ readonly when: "Target was `periodic` but the requested period is not enabled in Obsidian's Periodic Notes plugin settings.";
180
+ readonly recovery: "Enable the period in Obsidian's Periodic Notes plugin settings, or pass an explicit path target instead.";
163
181
  }]> | import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
164
182
  path: import("zod").ZodOptional<import("zod").ZodString>;
165
183
  extension: import("zod").ZodOptional<import("zod").ZodString>;
@@ -194,10 +212,12 @@ export declare const baseToolDefinitions: (import("@cyanheads/mcp-ts-core").Tool
194
212
  readonly reason: "regex_invalid";
195
213
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
196
214
  readonly when: "The supplied `nameRegex` is not a valid ECMAScript regex.";
215
+ readonly recovery: "Test the pattern (e.g. `^Project.*\\.md$`) in a JS regex tester, or omit nameRegex to disable filtering.";
197
216
  }, {
198
217
  readonly reason: "note_missing";
199
218
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
200
219
  readonly when: "The supplied `path` does not exist in the vault. Sub-directories that disappear mid-walk are silently skipped — only the root path surfaces this error.";
220
+ readonly recovery: "List a parent directory to find the correct casing or check the spelling.";
201
221
  }]> | import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
202
222
  tags: import("zod").ZodArray<import("zod").ZodObject<{
203
223
  name: import("zod").ZodString;
@@ -249,18 +269,27 @@ export declare const baseToolDefinitions: (import("@cyanheads/mcp-ts-core").Tool
249
269
  readonly reason: "value_required";
250
270
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
251
271
  readonly when: "`operation` is \"set\" but no `value` was supplied.";
272
+ readonly recovery: "Pass `value` as any JSON-typed value: string, number, boolean, array, or object (e.g. `\"draft\"`, `42`, `true`, `[\"a\",\"b\"]`).";
252
273
  }, {
253
274
  readonly reason: "note_missing";
254
275
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
255
276
  readonly when: "The vault path does not resolve to an existing note.";
277
+ readonly recovery: "Verify the path with obsidian_list_notes or use obsidian_search_notes to locate the note.";
256
278
  }, {
257
279
  readonly reason: "no_active_file";
258
280
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
259
281
  readonly when: "Target was `active` but no file is currently open in Obsidian.";
282
+ readonly recovery: "Open a note in Obsidian or pass an explicit path target instead.";
260
283
  }, {
261
284
  readonly reason: "periodic_not_found";
262
285
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
263
286
  readonly when: "Target was `periodic` but no matching periodic note exists.";
287
+ readonly recovery: "Create the periodic note first or pass an explicit path target.";
288
+ }, {
289
+ readonly reason: "periodic_disabled";
290
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
291
+ readonly when: "Target was `periodic` but the requested period is not enabled in Obsidian's Periodic Notes plugin settings.";
292
+ readonly recovery: "Enable the period in Obsidian's Periodic Notes plugin settings, or pass an explicit path target instead.";
264
293
  }]> | import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
265
294
  target: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
266
295
  type: import("zod").ZodLiteral<"path">;
@@ -315,18 +344,27 @@ export declare const baseToolDefinitions: (import("@cyanheads/mcp-ts-core").Tool
315
344
  readonly reason: "tags_required";
316
345
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
317
346
  readonly when: "`operation` is \"add\" or \"remove\" but `tags` was empty or omitted.";
347
+ readonly recovery: "Pass a non-empty `tags` array (without `#`), e.g. `[\"draft\", \"wip\"]`.";
318
348
  }, {
319
349
  readonly reason: "note_missing";
320
350
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
321
351
  readonly when: "The vault path does not resolve to an existing note.";
352
+ readonly recovery: "Verify the path with obsidian_list_notes or use obsidian_search_notes to locate the note.";
322
353
  }, {
323
354
  readonly reason: "no_active_file";
324
355
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
325
356
  readonly when: "Target was `active` but no file is currently open in Obsidian.";
357
+ readonly recovery: "Open a note in Obsidian or pass an explicit path target instead.";
326
358
  }, {
327
359
  readonly reason: "periodic_not_found";
328
360
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
329
361
  readonly when: "Target was `periodic` but no matching periodic note exists.";
362
+ readonly recovery: "Create the periodic note first or pass an explicit path target.";
363
+ }, {
364
+ readonly reason: "periodic_disabled";
365
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
366
+ readonly when: "Target was `periodic` but the requested period is not enabled in Obsidian's Periodic Notes plugin settings.";
367
+ readonly recovery: "Enable the period in Obsidian's Periodic Notes plugin settings, or pass an explicit path target instead.";
330
368
  }]> | import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
331
369
  path: import("zod").ZodString;
332
370
  failIfMissing: import("zod").ZodDefault<import("zod").ZodBoolean>;
@@ -339,6 +377,7 @@ export declare const baseToolDefinitions: (import("@cyanheads/mcp-ts-core").Tool
339
377
  readonly reason: "note_missing";
340
378
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
341
379
  readonly when: "`failIfMissing: true` (default) and the path does not exist in the vault. Pass `failIfMissing: false` to allow Obsidian to create the file on open.";
380
+ readonly recovery: "Verify the path with obsidian_list_notes or pass failIfMissing false to create on open.";
342
381
  }]> | import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
343
382
  target: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
344
383
  type: import("zod").ZodLiteral<"path">;
@@ -398,18 +437,27 @@ export declare const baseToolDefinitions: (import("@cyanheads/mcp-ts-core").Tool
398
437
  readonly reason: "note_missing";
399
438
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
400
439
  readonly when: "The vault path does not resolve to an existing note.";
440
+ readonly recovery: "Verify the path with obsidian_list_notes or use obsidian_search_notes to locate the note.";
401
441
  }, {
402
442
  readonly reason: "no_active_file";
403
443
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
404
444
  readonly when: "Target was `active` but no file is currently open in Obsidian.";
445
+ readonly recovery: "Open a note in Obsidian or pass an explicit path target instead.";
405
446
  }, {
406
447
  readonly reason: "periodic_not_found";
407
448
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
408
449
  readonly when: "Target was `periodic` but no matching periodic note exists.";
450
+ readonly recovery: "Create the periodic note first or pass an explicit path target.";
451
+ }, {
452
+ readonly reason: "periodic_disabled";
453
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
454
+ readonly when: "Target was `periodic` but the requested period is not enabled in Obsidian's Periodic Notes plugin settings.";
455
+ readonly recovery: "Enable the period in Obsidian's Periodic Notes plugin settings, or pass an explicit path target instead.";
409
456
  }, {
410
457
  readonly reason: "section_target_missing";
411
458
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
412
459
  readonly when: "The named heading/block/frontmatter field does not exist in the note. Use `obsidian_get_note` with `format: \"document-map\"` to discover available targets.";
460
+ readonly recovery: "Call obsidian_get_note with format document-map to discover the available targets.";
413
461
  }]> | import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
414
462
  target: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
415
463
  type: import("zod").ZodLiteral<"path">;
@@ -447,18 +495,27 @@ export declare const baseToolDefinitions: (import("@cyanheads/mcp-ts-core").Tool
447
495
  readonly reason: "regex_invalid";
448
496
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
449
497
  readonly when: "A `useRegex: true` replacement supplied a `search` pattern that is not a valid ECMAScript regex.";
498
+ readonly recovery: "Test the pattern in a JS regex tester, or set useRegex to false to match `search` as a literal string.";
450
499
  }, {
451
500
  readonly reason: "note_missing";
452
501
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
453
502
  readonly when: "The vault path does not resolve to an existing note.";
503
+ readonly recovery: "Verify the path with obsidian_list_notes or use obsidian_search_notes to locate the note.";
454
504
  }, {
455
505
  readonly reason: "no_active_file";
456
506
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
457
507
  readonly when: "Target was `active` but no file is currently open in Obsidian.";
508
+ readonly recovery: "Open a note in Obsidian or pass an explicit path target instead.";
458
509
  }, {
459
510
  readonly reason: "periodic_not_found";
460
511
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
461
512
  readonly when: "Target was `periodic` but no matching periodic note exists.";
513
+ readonly recovery: "Create the periodic note first or pass an explicit path target.";
514
+ }, {
515
+ readonly reason: "periodic_disabled";
516
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
517
+ readonly when: "Target was `periodic` but the requested period is not enabled in Obsidian's Periodic Notes plugin settings.";
518
+ readonly recovery: "Enable the period in Obsidian's Periodic Notes plugin settings, or pass an explicit path target instead.";
462
519
  }]> | import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
463
520
  mode: import("zod").ZodEnum<{
464
521
  text: "text";
@@ -515,14 +572,17 @@ export declare const baseToolDefinitions: (import("@cyanheads/mcp-ts-core").Tool
515
572
  readonly reason: "path_prefix_invalid_mode";
516
573
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
517
574
  readonly when: "`pathPrefix` was provided in a non-text mode (only `text` supports prefix filtering).";
575
+ readonly recovery: "Drop pathPrefix or switch mode to text for prefix filtering.";
518
576
  }, {
519
577
  readonly reason: "query_required";
520
578
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
521
579
  readonly when: "`query` is missing for `text` or `dataview` mode (required for both).";
580
+ readonly recovery: "Pass `query` — search terms for text mode (e.g. \"TODO\"), or DQL like \"TABLE WHERE file.mtime > date(today)\" for dataview mode.";
522
581
  }, {
523
582
  readonly reason: "logic_required";
524
583
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
525
584
  readonly when: "`logic` is missing for `jsonlogic` mode.";
585
+ readonly recovery: "Pass a JSONLogic tree as `logic`, e.g. `{\"glob\": [{\"var\": \"path\"}, \"Projects/*.md\"]}`.";
526
586
  }]> | import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
527
587
  target: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
528
588
  type: import("zod").ZodLiteral<"path">;
@@ -562,6 +622,7 @@ export declare const baseToolDefinitions: (import("@cyanheads/mcp-ts-core").Tool
562
622
  readonly reason: "file_exists";
563
623
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.Conflict;
564
624
  readonly when: "Whole-file write was attempted against an existing note and `overwrite` was not set to `true`.";
625
+ readonly recovery: "Retry with overwrite true or use obsidian_patch_note for in-place edits.";
565
626
  }]>)[];
566
627
  /** Command-palette tools — registered only when `OBSIDIAN_ENABLE_COMMANDS=true`. */
567
628
  export declare const commandToolDefinitions: (import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
@@ -573,6 +634,7 @@ export declare const commandToolDefinitions: (import("@cyanheads/mcp-ts-core").T
573
634
  readonly reason: "command_unknown";
574
635
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
575
636
  readonly when: "The supplied `commandId` is not registered in Obsidian. Use `obsidian_list_commands` to discover valid IDs.";
637
+ readonly recovery: "Call obsidian_list_commands to discover the registered command IDs.";
576
638
  }]> | import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
577
639
  commands: import("zod").ZodArray<import("zod").ZodObject<{
578
640
  id: import("zod").ZodString;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAiBH,wDAAwD;AACxD,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAa/B,CAAC;AAEF,oFAAoF;AACpF,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;+CAAiD,CAAC"}
@@ -30,17 +30,26 @@ export declare const obsidianDeleteNote: import("@cyanheads/mcp-ts-core").ToolDe
30
30
  readonly reason: "cancelled";
31
31
  readonly code: JsonRpcErrorCode.InvalidRequest;
32
32
  readonly when: "User declined the deletion via interactive elicitation.";
33
+ readonly recovery: "Re-run the tool when the user is ready to confirm deletion.";
33
34
  }, {
34
35
  readonly reason: "note_missing";
35
36
  readonly code: JsonRpcErrorCode.NotFound;
36
37
  readonly when: "The vault path does not resolve to an existing note.";
38
+ readonly recovery: "Verify the path with obsidian_list_notes or use obsidian_search_notes to locate the note.";
37
39
  }, {
38
40
  readonly reason: "no_active_file";
39
41
  readonly code: JsonRpcErrorCode.NotFound;
40
42
  readonly when: "Target was `active` but no file is currently open in Obsidian.";
43
+ readonly recovery: "Open a note in Obsidian or pass an explicit path target instead.";
41
44
  }, {
42
45
  readonly reason: "periodic_not_found";
43
46
  readonly code: JsonRpcErrorCode.NotFound;
44
47
  readonly when: "Target was `periodic` but no matching periodic note exists.";
48
+ readonly recovery: "Pass an explicit path target — periodic notes must already exist.";
49
+ }, {
50
+ readonly reason: "periodic_disabled";
51
+ readonly code: JsonRpcErrorCode.ValidationError;
52
+ readonly when: "Target was `periodic` but the requested period is not enabled in Obsidian's Periodic Notes plugin settings.";
53
+ readonly recovery: "Enable the period in Obsidian's Periodic Notes plugin settings, or pass an explicit path target instead.";
45
54
  }]>;
46
55
  //# sourceMappingURL=obsidian-delete-note.tool.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"obsidian-delete-note.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/obsidian-delete-note.tool.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAIjE,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+D7B,CAAC"}
1
+ {"version":3,"file":"obsidian-delete-note.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/obsidian-delete-note.tool.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAIjE,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8E7B,CAAC"}
@@ -24,21 +24,31 @@ export const obsidianDeleteNote = tool('obsidian_delete_note', {
24
24
  reason: 'cancelled',
25
25
  code: JsonRpcErrorCode.InvalidRequest,
26
26
  when: 'User declined the deletion via interactive elicitation.',
27
+ recovery: 'Re-run the tool when the user is ready to confirm deletion.',
27
28
  },
28
29
  {
29
30
  reason: 'note_missing',
30
31
  code: JsonRpcErrorCode.NotFound,
31
32
  when: 'The vault path does not resolve to an existing note.',
33
+ recovery: 'Verify the path with obsidian_list_notes or use obsidian_search_notes to locate the note.',
32
34
  },
33
35
  {
34
36
  reason: 'no_active_file',
35
37
  code: JsonRpcErrorCode.NotFound,
36
38
  when: 'Target was `active` but no file is currently open in Obsidian.',
39
+ recovery: 'Open a note in Obsidian or pass an explicit path target instead.',
37
40
  },
38
41
  {
39
42
  reason: 'periodic_not_found',
40
43
  code: JsonRpcErrorCode.NotFound,
41
44
  when: 'Target was `periodic` but no matching periodic note exists.',
45
+ recovery: 'Pass an explicit path target — periodic notes must already exist.',
46
+ },
47
+ {
48
+ reason: 'periodic_disabled',
49
+ code: JsonRpcErrorCode.ValidationError,
50
+ when: "Target was `periodic` but the requested period is not enabled in Obsidian's Periodic Notes plugin settings.",
51
+ recovery: "Enable the period in Obsidian's Periodic Notes plugin settings, or pass an explicit path target instead.",
42
52
  },
43
53
  ],
44
54
  async handler(input, ctx) {
@@ -50,7 +60,10 @@ export const obsidianDeleteNote = tool('obsidian_delete_note', {
50
60
  confirm: z.boolean().describe('Set to true to delete the note. Any other value cancels.'),
51
61
  }));
52
62
  if (confirmed.action !== 'accept' || confirmed.content?.confirm !== true) {
53
- throw ctx.fail('cancelled', 'Deletion cancelled by user.', { path });
63
+ throw ctx.fail('cancelled', 'Deletion cancelled by user.', {
64
+ path,
65
+ ...ctx.recoveryFor('cancelled'),
66
+ });
54
67
  }
55
68
  }
56
69
  await svc.deleteNote(ctx, target);
@@ -1 +1 @@
1
- {"version":3,"file":"obsidian-delete-note.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/obsidian-delete-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;AAC7E,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEpD,MAAM,CAAC,MAAM,kBAAkB,GAAG,IAAI,CAAC,sBAAsB,EAAE;IAC7D,WAAW,EACT,iNAAiN;IACnN,WAAW,EAAE,EAAE,eAAe,EAAE,IAAI,EAAE;IACtC,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1F,CAAC,CACH,CAAC;YACF,IAAI,SAAS,CAAC,MAAM,KAAK,QAAQ,IAAI,SAAS,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,EAAE,CAAC;gBACzE,MAAM,GAAG,CAAC,IAAI,CAAC,WAAW,EAAE,6BAA6B,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC;YACvE,CAAC;QACH,CAAC;QAED,MAAM,GAAG,CAAC,UAAU,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;QAClC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IACjC,CAAC;IAED,MAAM,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC;QAClB;YACE,IAAI,EAAE,MAAM;YACZ,IAAI,EAAE,aAAa,MAAM,CAAC,IAAI,gBAAgB,MAAM,CAAC,OAAO,GAAG;SAChE;KACF;CACF,CAAC,CAAC"}
1
+ {"version":3,"file":"obsidian-delete-note.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/obsidian-delete-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;AAC7E,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEpD,MAAM,CAAC,MAAM,kBAAkB,GAAG,IAAI,CAAC,sBAAsB,EAAE;IAC7D,WAAW,EACT,iNAAiN;IACnN,WAAW,EAAE,EAAE,eAAe,EAAE,IAAI,EAAE;IACtC,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,MAAM,EAAE,YAAY,CAAC,QAAQ,CAAC,uBAAuB,CAAC;KACvD,CAAC;IACF,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,IAAI,EAAE,CAAC,CAAC,MAAM,EAA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AAC,CAAC,OAAO,EAAE,CAAC,QAAQ,CAAC,0DAA0D,CAAC;aAC1F,CAAC,CACH,CAAC;YACF,IAAI,SAAS,CAAC,MAAM,KAAK,QAAQ,IAAI,SAAS,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,EAAE,CAAC;gBACzE,MAAM,GAAG,CAAC,IAAI,CAAC,WAAW,EAAE,6BAA6B,EAAE;oBACzD,IAAI;oBACJ,GAAG,GAAG,CAAC,WAAW,CAAC,WAAW,CAAC;iBAChC,CAAC,CAAC;YACL,CAAC;QACH,CAAC;QAED,MAAM,GAAG,CAAC,UAAU,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;QAClC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IACjC,CAAC;IAED,MAAM,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC;QAClB;YACE,IAAI,EAAE,MAAM;YACZ,IAAI,EAAE,aAAa,MAAM,CAAC,IAAI,gBAAgB,MAAM,CAAC,OAAO,GAAG;SAChE;KACF;CACF,CAAC,CAAC"}
@@ -15,5 +15,6 @@ export declare const obsidianExecuteCommand: import("@cyanheads/mcp-ts-core").To
15
15
  readonly reason: "command_unknown";
16
16
  readonly code: JsonRpcErrorCode.NotFound;
17
17
  readonly when: "The supplied `commandId` is not registered in Obsidian. Use `obsidian_list_commands` to discover valid IDs.";
18
+ readonly recovery: "Call obsidian_list_commands to discover the registered command IDs.";
18
19
  }]>;
19
20
  //# sourceMappingURL=obsidian-execute-command.tool.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"obsidian-execute-command.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/obsidian-execute-command.tool.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAGjE,eAAO,MAAM,sBAAsB;;;;;;;;;GAmCjC,CAAC"}
1
+ {"version":3,"file":"obsidian-execute-command.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/obsidian-execute-command.tool.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAGjE,eAAO,MAAM,sBAAsB;;;;;;;;;;GAoCjC,CAAC"}
@@ -26,6 +26,7 @@ export const obsidianExecuteCommand = tool('obsidian_execute_command', {
26
26
  reason: 'command_unknown',
27
27
  code: JsonRpcErrorCode.NotFound,
28
28
  when: 'The supplied `commandId` is not registered in Obsidian. Use `obsidian_list_commands` to discover valid IDs.',
29
+ recovery: 'Call obsidian_list_commands to discover the registered command IDs.',
29
30
  },
30
31
  ],
31
32
  async handler(input, ctx) {
@@ -1 +1 @@
1
- {"version":3,"file":"obsidian-execute-command.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/obsidian-execute-command.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;AAE7E,MAAM,CAAC,MAAM,sBAAsB,GAAG,IAAI,CAAC,0BAA0B,EAAE;IACrE,WAAW,EACT,2RAA2R;IAC7R,WAAW,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,eAAe,EAAE,IAAI,EAAE;IAC3D,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,SAAS,EAAE,CAAC;aACT,MAAM,EAAE;aACR,GAAG,CAAC,CAAC,CAAC;aACN,QAAQ,CAAC,8EAA8E,CAAC;KAC5F,CAAC;IACF,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,oBAAoB,CAAC;QACpD,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,CAAC,oDAAoD,CAAC;KACrF,CAAC;IACF,IAAI,EAAE,CAAC,qCAAqC,CAAC;IAC7C,MAAM,EAAE;QACN;YACE,MAAM,EAAE,iBAAiB;YACzB,IAAI,EAAE,gBAAgB,CAAC,QAAQ;YAC/B,IAAI,EAAE,6GAA6G;SACpH;KACF;IAED,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG;QACtB,MAAM,GAAG,GAAG,kBAAkB,EAAE,CAAC;QACjC,MAAM,GAAG,CAAC,cAAc,CAAC,GAAG,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;QAC/C,OAAO,EAAE,SAAS,EAAE,KAAK,CAAC,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IACxD,CAAC;IAED,MAAM,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC;QAClB;YACE,IAAI,EAAE,MAAM;YACZ,IAAI,EAAE,gBAAgB,MAAM,CAAC,SAAS,mBAAmB,MAAM,CAAC,QAAQ,GAAG;SAC5E;KACF;CACF,CAAC,CAAC"}
1
+ {"version":3,"file":"obsidian-execute-command.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/obsidian-execute-command.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;AAE7E,MAAM,CAAC,MAAM,sBAAsB,GAAG,IAAI,CAAC,0BAA0B,EAAE;IACrE,WAAW,EACT,2RAA2R;IAC7R,WAAW,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,eAAe,EAAE,IAAI,EAAE;IAC3D,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,SAAS,EAAE,CAAC;aACT,MAAM,EAAE;aACR,GAAG,CAAC,CAAC,CAAC;aACN,QAAQ,CAAC,8EAA8E,CAAC;KAC5F,CAAC;IACF,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,oBAAoB,CAAC;QACpD,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,CAAC,oDAAoD,CAAC;KACrF,CAAC;IACF,IAAI,EAAE,CAAC,qCAAqC,CAAC;IAC7C,MAAM,EAAE;QACN;YACE,MAAM,EAAE,iBAAiB;YACzB,IAAI,EAAE,gBAAgB,CAAC,QAAQ;YAC/B,IAAI,EAAE,6GAA6G;YACnH,QAAQ,EAAE,qEAAqE;SAChF;KACF;IAED,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG;QACtB,MAAM,GAAG,GAAG,kBAAkB,EAAE,CAAC;QACjC,MAAM,GAAG,CAAC,cAAc,CAAC,GAAG,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;QAC/C,OAAO,EAAE,SAAS,EAAE,KAAK,CAAC,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IACxD,CAAC;IAED,MAAM,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC;QAClB;YACE,IAAI,EAAE,MAAM;YACZ,IAAI,EAAE,gBAAgB,MAAM,CAAC,SAAS,mBAAmB,MAAM,CAAC,QAAQ,GAAG;SAC5E;KACF;CACF,CAAC,CAAC"}
@@ -76,17 +76,26 @@ export declare const obsidianGetNote: import("@cyanheads/mcp-ts-core").ToolDefin
76
76
  readonly reason: "section_required";
77
77
  readonly code: JsonRpcErrorCode.ValidationError;
78
78
  readonly when: "`format` is \"section\" but no `section` locator was provided.";
79
+ readonly recovery: "Pass `section: { type, target }` (e.g. `{ type: \"heading\", target: \"Intro\" }`), or use `format: \"full\"` / `\"document-map\"` instead.";
79
80
  }, {
80
81
  readonly reason: "note_missing";
81
82
  readonly code: JsonRpcErrorCode.NotFound;
82
83
  readonly when: "The vault path does not resolve to an existing note.";
84
+ readonly recovery: "Verify the path with obsidian_list_notes or use obsidian_search_notes to locate the note.";
83
85
  }, {
84
86
  readonly reason: "no_active_file";
85
87
  readonly code: JsonRpcErrorCode.NotFound;
86
88
  readonly when: "Target was `active` but no file is currently open in Obsidian.";
89
+ readonly recovery: "Open a note in Obsidian or pass an explicit path target instead.";
87
90
  }, {
88
91
  readonly reason: "periodic_not_found";
89
92
  readonly code: JsonRpcErrorCode.NotFound;
90
93
  readonly when: "Target was `periodic` but no matching periodic note exists.";
94
+ readonly recovery: "Create the periodic note first or pass an explicit path target.";
95
+ }, {
96
+ readonly reason: "periodic_disabled";
97
+ readonly code: JsonRpcErrorCode.ValidationError;
98
+ readonly when: "Target was `periodic` but the requested period is not enabled in Obsidian's Periodic Notes plugin settings.";
99
+ readonly recovery: "Enable the period in Obsidian's Periodic Notes plugin settings, or pass an explicit path target instead.";
91
100
  }]>;
92
101
  //# sourceMappingURL=obsidian-get-note.tool.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"obsidian-get-note.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/obsidian-get-note.tool.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAYjE,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsO1B,CAAC"}
1
+ {"version":3,"file":"obsidian-get-note.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/obsidian-get-note.tool.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAYjE,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoP1B,CAAC"}
@@ -79,21 +79,31 @@ export const obsidianGetNote = tool('obsidian_get_note', {
79
79
  reason: 'section_required',
80
80
  code: JsonRpcErrorCode.ValidationError,
81
81
  when: '`format` is "section" but no `section` locator was provided.',
82
+ recovery: 'Pass `section: { type, target }` (e.g. `{ type: "heading", target: "Intro" }`), or use `format: "full"` / `"document-map"` instead.',
82
83
  },
83
84
  {
84
85
  reason: 'note_missing',
85
86
  code: JsonRpcErrorCode.NotFound,
86
87
  when: 'The vault path does not resolve to an existing note.',
88
+ recovery: 'Verify the path with obsidian_list_notes or use obsidian_search_notes to locate the note.',
87
89
  },
88
90
  {
89
91
  reason: 'no_active_file',
90
92
  code: JsonRpcErrorCode.NotFound,
91
93
  when: 'Target was `active` but no file is currently open in Obsidian.',
94
+ recovery: 'Open a note in Obsidian or pass an explicit path target instead.',
92
95
  },
93
96
  {
94
97
  reason: 'periodic_not_found',
95
98
  code: JsonRpcErrorCode.NotFound,
96
99
  when: 'Target was `periodic` but no matching periodic note exists.',
100
+ recovery: 'Create the periodic note first or pass an explicit path target.',
101
+ },
102
+ {
103
+ reason: 'periodic_disabled',
104
+ code: JsonRpcErrorCode.ValidationError,
105
+ when: "Target was `periodic` but the requested period is not enabled in Obsidian's Periodic Notes plugin settings.",
106
+ recovery: "Enable the period in Obsidian's Periodic Notes plugin settings, or pass an explicit path target instead.",
97
107
  },
98
108
  ],
99
109
  async handler(input, ctx) {
@@ -152,6 +162,7 @@ export const obsidianGetNote = tool('obsidian_get_note', {
152
162
  if (!input.section) {
153
163
  throw ctx.fail('section_required', '`section` is required when `format` is "section".', {
154
164
  format: input.format,
165
+ ...ctx.recoveryFor('section_required'),
155
166
  });
156
167
  }
157
168
  const { result: note } = await withCaseFallback(ctx, svc, target, (t) => svc.getNoteJson(ctx, t));
@@ -1 +1 @@
1
- {"version":3,"file":"obsidian-get-note.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/obsidian-get-note.tool.ts"],"names":[],"mappings":"AAAA;;;;GAIG;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,cAAc,EAAE,MAAM,0CAA0C,CAAC;AAC1E,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAE9D,MAAM,UAAU,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1B,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,+BAA+B,CAAC;IAC3D,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,gCAAgC,CAAC;IAC5D,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,qBAAqB,CAAC;CACjD,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,CAAC,mBAAmB,EAAE;IACvD,WAAW,EACT,mhBAAmhB;IACrhB,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE;IACzD,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,MAAM,EAAE,CAAC;aACN,IAAI,CAAC,CAAC,SAAS,EAAE,MAAM,EAAE,cAAc,EAAE,SAAS,CAAC,CAAC;aACpD,QAAQ,CAAC,yCAAyC,CAAC;Q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AAC;aACb;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC;AAEH,SAAS,cAAc,CAAC,CAAU;IAChC,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IACpD,IAAI,OAAO,CAAC,KAAK,QAAQ;QAAE,OAAO,CAAC,CAAC;IACpC,OAAO,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;AACpC,CAAC;AAED,SAAS,aAAa,CAAC,EAAU;IAC/B,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC;QAAE,OAAO,WAAW,CAAC;IACxD,IAAI,CAAC;QACH,OAAO,IAAI,IAAI,CAAC,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;IACpC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,MAAM,CAAC,EAAE,CAAC,CAAC;IACpB,CAAC;AACH,CAAC"}
1
+ {"version":3,"file":"obsidian-get-note.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/obsidian-get-note.tool.ts"],"names":[],"mappings":"AAAA;;;;GAIG;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,cAAc,EAAE,MAAM,0CAA0C,CAAC;AAC1E,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAE9D,MAAM,UAAU,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1B,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,+BAA+B,CAAC;IAC3D,KAAK,EAAE,CAAC,C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I,CAAC;QACH,OAAO,IAAI,IAAI,CAAC,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;IACpC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,MAAM,CAAC,EAAE,CAAC,CAAC;IACpB,CAAC;AACH,CAAC"}
@@ -51,9 +51,11 @@ export declare const obsidianListNotes: import("@cyanheads/mcp-ts-core").ToolDef
51
51
  readonly reason: "regex_invalid";
52
52
  readonly code: JsonRpcErrorCode.ValidationError;
53
53
  readonly when: "The supplied `nameRegex` is not a valid ECMAScript regex.";
54
+ readonly recovery: "Test the pattern (e.g. `^Project.*\\.md$`) in a JS regex tester, or omit nameRegex to disable filtering.";
54
55
  }, {
55
56
  readonly reason: "note_missing";
56
57
  readonly code: JsonRpcErrorCode.NotFound;
57
58
  readonly when: "The supplied `path` does not exist in the vault. Sub-directories that disappear mid-walk are silently skipped — only the root path surfaces this error.";
59
+ readonly recovery: "List a parent directory to find the correct casing or check the spelling.";
58
60
  }]>;
59
61
  //# sourceMappingURL=obsidian-list-notes.tool.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"obsidian-list-notes.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/obsidian-list-notes.tool.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAY,MAAM,+BAA+B,CAAC;AA0C3E,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0J5B,CAAC"}
1
+ {"version":3,"file":"obsidian-list-notes.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/obsidian-list-notes.tool.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAY,MAAM,+BAA+B,CAAC;AA0C3E,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6J5B,CAAC"}
@@ -94,11 +94,13 @@ export const obsidianListNotes = tool('obsidian_list_notes', {
94
94
  reason: 'regex_invalid',
95
95
  code: JsonRpcErrorCode.ValidationError,
96
96
  when: 'The supplied `nameRegex` is not a valid ECMAScript regex.',
97
+ recovery: 'Test the pattern (e.g. `^Project.*\\.md$`) in a JS regex tester, or omit nameRegex to disable filtering.',
97
98
  },
98
99
  {
99
100
  reason: 'note_missing',
100
101
  code: JsonRpcErrorCode.NotFound,
101
102
  when: 'The supplied `path` does not exist in the vault. Sub-directories that disappear mid-walk are silently skipped — only the root path surfaces this error.',
103
+ recovery: 'List a parent directory to find the correct casing or check the spelling.',
102
104
  },
103
105
  ],
104
106
  async handler(input, ctx) {
@@ -110,7 +112,7 @@ export const obsidianListNotes = tool('obsidian_list_notes', {
110
112
  regex = new RegExp(input.nameRegex);
111
113
  }
112
114
  catch (err) {
113
- throw ctx.fail('regex_invalid', `Invalid nameRegex: ${err.message}`, { nameRegex: input.nameRegex }, { cause: err });
115
+ throw ctx.fail('regex_invalid', `Invalid nameRegex: ${err.message}`, { nameRegex: input.nameRegex, ...ctx.recoveryFor('regex_invalid') }, { cause: err });
114
116
  }
115
117
  }
116
118
  const ext = input.extension