obsidian-mcp-server 3.2.9 → 3.2.10

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 (43) hide show
  1. package/AGENTS.md +19 -12
  2. package/CLAUDE.md +19 -12
  3. package/Dockerfile +11 -7
  4. package/README.md +6 -3
  5. package/changelog/3.2.x/3.2.10.md +47 -0
  6. package/changelog/template.md +5 -3
  7. package/dist/mcp-server/resources/definitions/index.d.ts +20 -20
  8. package/dist/mcp-server/resources/definitions/index.d.ts.map +1 -1
  9. package/dist/mcp-server/tools/definitions/_shared/schemas.d.ts +3 -3
  10. package/dist/mcp-server/tools/definitions/_shared/schemas.js +1 -1
  11. package/dist/mcp-server/tools/definitions/_shared/schemas.js.map +1 -1
  12. package/dist/mcp-server/tools/definitions/index.d.ts +237 -220
  13. package/dist/mcp-server/tools/definitions/index.d.ts.map +1 -1
  14. package/dist/mcp-server/tools/definitions/obsidian-append-to-note.tool.d.ts +9 -3
  15. package/dist/mcp-server/tools/definitions/obsidian-append-to-note.tool.d.ts.map +1 -1
  16. package/dist/mcp-server/tools/definitions/obsidian-append-to-note.tool.js +14 -3
  17. package/dist/mcp-server/tools/definitions/obsidian-append-to-note.tool.js.map +1 -1
  18. package/dist/mcp-server/tools/definitions/obsidian-delete-note.tool.d.ts +1 -1
  19. package/dist/mcp-server/tools/definitions/obsidian-get-note.tool.d.ts +6 -6
  20. package/dist/mcp-server/tools/definitions/obsidian-get-note.tool.js +1 -1
  21. package/dist/mcp-server/tools/definitions/obsidian-get-note.tool.js.map +1 -1
  22. package/dist/mcp-server/tools/definitions/obsidian-list-notes.tool.d.ts +1 -1
  23. package/dist/mcp-server/tools/definitions/obsidian-manage-frontmatter.tool.d.ts +2 -2
  24. package/dist/mcp-server/tools/definitions/obsidian-manage-tags.tool.d.ts +3 -3
  25. package/dist/mcp-server/tools/definitions/obsidian-patch-note.tool.d.ts +11 -6
  26. package/dist/mcp-server/tools/definitions/obsidian-patch-note.tool.d.ts.map +1 -1
  27. package/dist/mcp-server/tools/definitions/obsidian-patch-note.tool.js +10 -4
  28. package/dist/mcp-server/tools/definitions/obsidian-patch-note.tool.js.map +1 -1
  29. package/dist/mcp-server/tools/definitions/obsidian-replace-in-note.tool.d.ts +1 -1
  30. package/dist/mcp-server/tools/definitions/obsidian-search-notes.tool.d.ts +58 -58
  31. package/dist/mcp-server/tools/definitions/obsidian-search-notes.tool.d.ts.map +1 -1
  32. package/dist/mcp-server/tools/definitions/obsidian-write-note.tool.d.ts +9 -3
  33. package/dist/mcp-server/tools/definitions/obsidian-write-note.tool.d.ts.map +1 -1
  34. package/dist/mcp-server/tools/definitions/obsidian-write-note.tool.js +14 -3
  35. package/dist/mcp-server/tools/definitions/obsidian-write-note.tool.js.map +1 -1
  36. package/dist/services/obsidian/obsidian-service.d.ts +8 -1
  37. package/dist/services/obsidian/obsidian-service.d.ts.map +1 -1
  38. package/dist/services/obsidian/obsidian-service.js +74 -4
  39. package/dist/services/obsidian/obsidian-service.js.map +1 -1
  40. package/dist/services/obsidian/path-policy.d.ts.map +1 -1
  41. package/manifest.json +1 -1
  42. package/package.json +14 -13
  43. package/server.json +3 -3
@@ -19,9 +19,9 @@ export { buildSearchNotesTool } from './obsidian-search-notes.tool.js';
19
19
  export declare const readToolDefinitions: (import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
20
20
  format: import("zod").ZodEnum<{
21
21
  content: "content";
22
- section: "section";
23
- full: "full";
24
22
  "document-map": "document-map";
23
+ full: "full";
24
+ section: "section";
25
25
  }>;
26
26
  target: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
27
27
  type: import("zod").ZodLiteral<"path">;
@@ -32,18 +32,18 @@ export declare const readToolDefinitions: (import("@cyanheads/mcp-ts-core").Tool
32
32
  type: import("zod").ZodLiteral<"periodic">;
33
33
  period: import("zod").ZodEnum<{
34
34
  daily: "daily";
35
- weekly: "weekly";
36
35
  monthly: "monthly";
37
36
  quarterly: "quarterly";
37
+ weekly: "weekly";
38
38
  yearly: "yearly";
39
39
  }>;
40
40
  date: import("zod").ZodOptional<import("zod").ZodString>;
41
41
  }, import("zod/v4/core").$strip>], "type">;
42
42
  section: import("zod").ZodOptional<import("zod").ZodObject<{
43
43
  type: import("zod").ZodEnum<{
44
- heading: "heading";
45
44
  block: "block";
46
45
  frontmatter: "frontmatter";
46
+ heading: "heading";
47
47
  }>;
48
48
  target: import("zod").ZodString;
49
49
  }, import("zod/v4/core").$strip>>;
@@ -82,9 +82,9 @@ export declare const readToolDefinitions: (import("@cyanheads/mcp-ts-core").Tool
82
82
  path: import("zod").ZodString;
83
83
  section: import("zod").ZodObject<{
84
84
  type: import("zod").ZodEnum<{
85
- heading: "heading";
86
85
  block: "block";
87
86
  frontmatter: "frontmatter";
87
+ heading: "heading";
88
88
  }>;
89
89
  target: import("zod").ZodString;
90
90
  }, import("zod/v4/core").$strip>;
@@ -130,7 +130,7 @@ export declare const readToolDefinitions: (import("@cyanheads/mcp-ts-core").Tool
130
130
  readonly reason: "section_missing";
131
131
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
132
132
  readonly when: "`format` was `\"section\"` and the named heading, block reference, or frontmatter field does not exist in the resolved note.";
133
- readonly recovery: "Call obsidian_get_note with format \"document-map\" to list available headings, blocks, and frontmatter fields. Nested headings need Parent::Child syntax.";
133
+ readonly recovery: "Call obsidian_get_note with format \"document-map\" to list available headings, blocks, and frontmatter fields, then retry with one of those locators.";
134
134
  }], undefined> | import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
135
135
  path: import("zod").ZodOptional<import("zod").ZodString>;
136
136
  extension: import("zod").ZodOptional<import("zod").ZodString>;
@@ -141,8 +141,8 @@ export declare const readToolDefinitions: (import("@cyanheads/mcp-ts-core").Tool
141
141
  entries: import("zod").ZodArray<import("zod").ZodObject<{
142
142
  path: import("zod").ZodString;
143
143
  type: import("zod").ZodEnum<{
144
- file: "file";
145
144
  directory: "directory";
145
+ file: "file";
146
146
  }>;
147
147
  truncated: import("zod").ZodOptional<import("zod").ZodBoolean>;
148
148
  }, import("zod/v4/core").$strip>>;
@@ -240,9 +240,106 @@ export declare const writeToolDefinitions: (import("@cyanheads/mcp-ts-core").Too
240
240
  type: import("zod").ZodLiteral<"periodic">;
241
241
  period: import("zod").ZodEnum<{
242
242
  daily: "daily";
243
+ monthly: "monthly";
244
+ quarterly: "quarterly";
243
245
  weekly: "weekly";
246
+ yearly: "yearly";
247
+ }>;
248
+ date: import("zod").ZodOptional<import("zod").ZodString>;
249
+ }, import("zod/v4/core").$strip>], "type">;
250
+ section: import("zod").ZodObject<{
251
+ type: import("zod").ZodEnum<{
252
+ block: "block";
253
+ frontmatter: "frontmatter";
254
+ heading: "heading";
255
+ }>;
256
+ target: import("zod").ZodString;
257
+ }, import("zod/v4/core").$strip>;
258
+ operation: import("zod").ZodEnum<{
259
+ append: "append";
260
+ prepend: "prepend";
261
+ replace: "replace";
262
+ }>;
263
+ content: import("zod").ZodString;
264
+ contentType: import("zod").ZodDefault<import("zod").ZodEnum<{
265
+ json: "json";
266
+ markdown: "markdown";
267
+ }>>;
268
+ patchOptions: import("zod").ZodOptional<import("zod").ZodObject<{
269
+ createTargetIfMissing: import("zod").ZodDefault<import("zod").ZodBoolean>;
270
+ applyIfContentPreexists: import("zod").ZodDefault<import("zod").ZodBoolean>;
271
+ trimTargetWhitespace: import("zod").ZodDefault<import("zod").ZodBoolean>;
272
+ }, import("zod/v4/core").$strip>>;
273
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
274
+ path: import("zod").ZodString;
275
+ section: import("zod").ZodObject<{
276
+ type: import("zod").ZodEnum<{
277
+ block: "block";
278
+ frontmatter: "frontmatter";
279
+ heading: "heading";
280
+ }>;
281
+ target: import("zod").ZodString;
282
+ }, import("zod/v4/core").$strip>;
283
+ operation: import("zod").ZodEnum<{
284
+ append: "append";
285
+ prepend: "prepend";
286
+ replace: "replace";
287
+ }>;
288
+ previousSizeInBytes: import("zod").ZodNumber;
289
+ currentSizeInBytes: import("zod").ZodNumber;
290
+ }, import("zod/v4/core").$strip>, readonly [{
291
+ readonly reason: "path_forbidden";
292
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.Forbidden;
293
+ readonly when: "The target path is outside OBSIDIAN_WRITE_PATHS, or OBSIDIAN_READ_ONLY=true denies all writes.";
294
+ readonly recovery: "Use a path inside the configured write scope. The error data echoes the active scope.";
295
+ }, {
296
+ readonly reason: "note_missing";
297
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
298
+ readonly when: "The vault path does not resolve to an existing note.";
299
+ readonly recovery: "Verify the path with obsidian_list_notes or use obsidian_search_notes to locate the note.";
300
+ }, {
301
+ readonly reason: "no_active_file";
302
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
303
+ readonly when: "Target was `active` but no file is currently open in Obsidian.";
304
+ readonly recovery: "Call obsidian_open_in_ui to focus a file, or pass an explicit path target instead.";
305
+ }, {
306
+ readonly reason: "periodic_not_found";
307
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
308
+ readonly when: "Target was `periodic` but no matching periodic note exists.";
309
+ readonly recovery: "Create the periodic note first or pass an explicit path target.";
310
+ }, {
311
+ readonly reason: "periodic_disabled";
312
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
313
+ readonly when: "Target was `periodic` but the requested period is not enabled in Obsidian's Periodic Notes plugin settings.";
314
+ readonly recovery: "Pass an explicit path target — the requested period is disabled in the operator's Periodic Notes plugin.";
315
+ }, {
316
+ readonly reason: "section_target_missing";
317
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
318
+ 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.";
319
+ readonly recovery: "Call obsidian_get_note with format document-map to discover the available targets.";
320
+ }, {
321
+ readonly reason: "ambiguous_section";
322
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.Conflict;
323
+ readonly when: "A bare heading leaf name matches more than one heading in the note, so the write target is undetermined.";
324
+ readonly recovery: "Retry with one of the full Parent::Child heading paths listed in `candidates` on the error data.";
325
+ }, {
326
+ readonly reason: "content_preexists";
327
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
328
+ readonly when: "The supplied content already appears at the target — the patch was rejected to keep retries idempotent (the default).";
329
+ readonly recovery: "Pass `patchOptions.applyIfContentPreexists: true` to force-apply over preexisting content, or change the content to something not already present.";
330
+ }], undefined> | import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
331
+ target: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
332
+ type: import("zod").ZodLiteral<"path">;
333
+ path: import("zod").ZodString;
334
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
335
+ type: import("zod").ZodLiteral<"active">;
336
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
337
+ type: import("zod").ZodLiteral<"periodic">;
338
+ period: import("zod").ZodEnum<{
339
+ daily: "daily";
244
340
  monthly: "monthly";
245
341
  quarterly: "quarterly";
342
+ weekly: "weekly";
246
343
  yearly: "yearly";
247
344
  }>;
248
345
  date: import("zod").ZodOptional<import("zod").ZodString>;
@@ -250,20 +347,99 @@ export declare const writeToolDefinitions: (import("@cyanheads/mcp-ts-core").Too
250
347
  content: import("zod").ZodString;
251
348
  section: import("zod").ZodOptional<import("zod").ZodObject<{
252
349
  type: import("zod").ZodEnum<{
253
- heading: "heading";
254
350
  block: "block";
255
351
  frontmatter: "frontmatter";
352
+ heading: "heading";
256
353
  }>;
257
354
  target: import("zod").ZodString;
258
355
  }, import("zod/v4/core").$strip>>;
259
356
  contentType: import("zod").ZodDefault<import("zod").ZodEnum<{
357
+ json: "json";
260
358
  markdown: "markdown";
359
+ }>>;
360
+ overwrite: import("zod").ZodDefault<import("zod").ZodBoolean>;
361
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
362
+ path: import("zod").ZodString;
363
+ sectionTargeted: import("zod").ZodBoolean;
364
+ sectionTarget: import("zod").ZodOptional<import("zod").ZodString>;
365
+ created: import("zod").ZodBoolean;
366
+ previousSizeInBytes: import("zod").ZodNumber;
367
+ currentSizeInBytes: import("zod").ZodNumber;
368
+ }, import("zod/v4/core").$strip>, readonly [{
369
+ readonly reason: "file_exists";
370
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.Conflict;
371
+ readonly when: "Whole-file write was attempted against an existing note and `overwrite` was not set to `true`.";
372
+ readonly recovery: "Retry with overwrite true or use obsidian_patch_note for in-place edits.";
373
+ }, {
374
+ readonly reason: "path_forbidden";
375
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.Forbidden;
376
+ readonly when: "The target path is outside OBSIDIAN_WRITE_PATHS, or OBSIDIAN_READ_ONLY=true denies all writes.";
377
+ readonly recovery: "Use a path inside the configured write scope. The error data echoes the active scope.";
378
+ }, {
379
+ readonly reason: "note_missing";
380
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
381
+ readonly when: "Section replace targets a path that does not resolve to an existing note (PATCH requires the file to exist).";
382
+ readonly recovery: "Verify the path with obsidian_list_notes, or omit `section` to fall back to whole-file write (which creates the note when it is absent).";
383
+ }, {
384
+ readonly reason: "no_active_file";
385
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
386
+ readonly when: "Target was `active` but no file is currently open in Obsidian.";
387
+ readonly recovery: "Call obsidian_open_in_ui to focus a file, or pass an explicit path target instead.";
388
+ }, {
389
+ readonly reason: "periodic_not_found";
390
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
391
+ readonly when: "Target was `periodic` but no matching periodic note exists.";
392
+ readonly recovery: "Create the periodic note first or pass an explicit path target.";
393
+ }, {
394
+ readonly reason: "periodic_disabled";
395
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
396
+ readonly when: "Target was `periodic` but the requested period is not enabled in Obsidian's Periodic Notes plugin settings.";
397
+ readonly recovery: "Pass an explicit path target — the requested period is disabled in the operator's Periodic Notes plugin.";
398
+ }, {
399
+ readonly reason: "section_target_missing";
400
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
401
+ readonly when: "`section` was provided but the named heading/block/frontmatter field does not exist in the note.";
402
+ readonly recovery: "Call obsidian_get_note with format document-map to discover available targets.";
403
+ }, {
404
+ readonly reason: "ambiguous_section";
405
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.Conflict;
406
+ readonly when: "A bare heading leaf name matches more than one heading in the note, so the replacement target is undetermined.";
407
+ readonly recovery: "Retry with one of the full Parent::Child heading paths listed in `candidates` on the error data.";
408
+ }], undefined> | import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
409
+ target: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
410
+ type: import("zod").ZodLiteral<"path">;
411
+ path: import("zod").ZodString;
412
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
413
+ type: import("zod").ZodLiteral<"active">;
414
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
415
+ type: import("zod").ZodLiteral<"periodic">;
416
+ period: import("zod").ZodEnum<{
417
+ daily: "daily";
418
+ monthly: "monthly";
419
+ quarterly: "quarterly";
420
+ weekly: "weekly";
421
+ yearly: "yearly";
422
+ }>;
423
+ date: import("zod").ZodOptional<import("zod").ZodString>;
424
+ }, import("zod/v4/core").$strip>], "type">;
425
+ content: import("zod").ZodString;
426
+ section: import("zod").ZodOptional<import("zod").ZodObject<{
427
+ type: import("zod").ZodEnum<{
428
+ block: "block";
429
+ frontmatter: "frontmatter";
430
+ heading: "heading";
431
+ }>;
432
+ target: import("zod").ZodString;
433
+ }, import("zod/v4/core").$strip>>;
434
+ contentType: import("zod").ZodDefault<import("zod").ZodEnum<{
261
435
  json: "json";
436
+ markdown: "markdown";
262
437
  }>>;
263
438
  createTargetIfMissing: import("zod").ZodDefault<import("zod").ZodBoolean>;
264
439
  }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
265
440
  path: import("zod").ZodString;
266
441
  sectionTargeted: import("zod").ZodBoolean;
442
+ sectionTarget: import("zod").ZodOptional<import("zod").ZodString>;
267
443
  created: import("zod").ZodBoolean;
268
444
  previousSizeInBytes: import("zod").ZodNumber;
269
445
  currentSizeInBytes: import("zod").ZodNumber;
@@ -297,6 +473,11 @@ export declare const writeToolDefinitions: (import("@cyanheads/mcp-ts-core").Too
297
473
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
298
474
  readonly when: "`section` was provided but the named heading/block/frontmatter field does not exist in the note.";
299
475
  readonly recovery: "Call obsidian_get_note with format document-map to discover available targets, or pass createTargetIfMissing: true to bring it into existence.";
476
+ }, {
477
+ readonly reason: "ambiguous_section";
478
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.Conflict;
479
+ readonly when: "A bare heading leaf name matches more than one heading in the note, so the append target is undetermined.";
480
+ readonly recovery: "Retry with one of the full Parent::Child heading paths listed in `candidates` on the error data.";
300
481
  }, {
301
482
  readonly reason: "content_preexists";
302
483
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
@@ -312,28 +493,46 @@ export declare const writeToolDefinitions: (import("@cyanheads/mcp-ts-core").Too
312
493
  type: import("zod").ZodLiteral<"periodic">;
313
494
  period: import("zod").ZodEnum<{
314
495
  daily: "daily";
315
- weekly: "weekly";
316
496
  monthly: "monthly";
317
497
  quarterly: "quarterly";
498
+ weekly: "weekly";
318
499
  yearly: "yearly";
319
500
  }>;
320
501
  date: import("zod").ZodOptional<import("zod").ZodString>;
321
502
  }, import("zod/v4/core").$strip>], "type">;
503
+ replacements: import("zod").ZodArray<import("zod").ZodObject<{
504
+ search: import("zod").ZodString;
505
+ replace: import("zod").ZodString;
506
+ useRegex: import("zod").ZodDefault<import("zod").ZodBoolean>;
507
+ caseSensitive: import("zod").ZodDefault<import("zod").ZodBoolean>;
508
+ wholeWord: import("zod").ZodDefault<import("zod").ZodBoolean>;
509
+ flexibleWhitespace: import("zod").ZodDefault<import("zod").ZodBoolean>;
510
+ replaceAll: import("zod").ZodDefault<import("zod").ZodBoolean>;
511
+ }, import("zod/v4/core").$strip>>;
322
512
  }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
323
513
  path: import("zod").ZodString;
324
- deleted: import("zod").ZodBoolean;
514
+ totalReplacements: import("zod").ZodNumber;
515
+ perReplacement: import("zod").ZodArray<import("zod").ZodObject<{
516
+ search: import("zod").ZodString;
517
+ count: import("zod").ZodNumber;
518
+ }, import("zod/v4/core").$strip>>;
325
519
  previousSizeInBytes: import("zod").ZodNumber;
326
520
  currentSizeInBytes: import("zod").ZodNumber;
327
521
  }, import("zod/v4/core").$strip>, readonly [{
328
522
  readonly reason: "path_forbidden";
329
523
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.Forbidden;
330
- readonly when: "The target path is outside OBSIDIAN_WRITE_PATHS, or OBSIDIAN_READ_ONLY=true denies all writes.";
524
+ readonly when: "The target path is outside OBSIDIAN_WRITE_PATHS, or OBSIDIAN_READ_ONLY=true denies all writes. (The pre-read also requires the path to be readable.)";
331
525
  readonly recovery: "Use a path inside the configured write scope. The error data echoes the active scope.";
332
526
  }, {
333
- readonly reason: "cancelled";
334
- readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.InvalidRequest;
335
- readonly when: "User declined the deletion via interactive elicitation.";
336
- readonly recovery: "Re-run the tool when the user is ready to confirm deletion.";
527
+ readonly reason: "regex_invalid";
528
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
529
+ readonly when: "A `useRegex: true` replacement supplied a `search` pattern that is not a valid ECMAScript regex.";
530
+ readonly recovery: "Use a valid ECMAScript regex, or set useRegex to false to match `search` as a literal string.";
531
+ }, {
532
+ readonly reason: "regex_unsafe";
533
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
534
+ readonly when: "A `useRegex: true` replacement supplied a `search` pattern that is well-formed but exceeds the 1024-character limit or contains nested quantifiers known to cause catastrophic backtracking against the note body.";
535
+ readonly recovery: "Avoid nested quantifiers like `(a+)+` or `(.*)*`. Use a simpler pattern, or set useRegex to false to match `search` as a literal string.";
337
536
  }, {
338
537
  readonly reason: "note_missing";
339
538
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
@@ -348,7 +547,7 @@ export declare const writeToolDefinitions: (import("@cyanheads/mcp-ts-core").Too
348
547
  readonly reason: "periodic_not_found";
349
548
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
350
549
  readonly when: "Target was `periodic` but no matching periodic note exists.";
351
- readonly recovery: "Pass an explicit path target periodic notes must already exist.";
550
+ readonly recovery: "Create the periodic note first or pass an explicit path target.";
352
551
  }, {
353
552
  readonly reason: "periodic_disabled";
354
553
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
@@ -356,9 +555,9 @@ export declare const writeToolDefinitions: (import("@cyanheads/mcp-ts-core").Too
356
555
  readonly recovery: "Pass an explicit path target — the requested period is disabled in the operator's Periodic Notes plugin.";
357
556
  }], undefined> | import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
358
557
  operation: import("zod").ZodEnum<{
359
- set: "set";
360
558
  delete: "delete";
361
559
  get: "get";
560
+ set: "set";
362
561
  }>;
363
562
  target: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
364
563
  type: import("zod").ZodLiteral<"path">;
@@ -369,9 +568,9 @@ export declare const writeToolDefinitions: (import("@cyanheads/mcp-ts-core").Too
369
568
  type: import("zod").ZodLiteral<"periodic">;
370
569
  period: import("zod").ZodEnum<{
371
570
  daily: "daily";
372
- weekly: "weekly";
373
571
  monthly: "monthly";
374
572
  quarterly: "quarterly";
573
+ weekly: "weekly";
375
574
  yearly: "yearly";
376
575
  }>;
377
576
  date: import("zod").ZodOptional<import("zod").ZodString>;
@@ -440,23 +639,23 @@ export declare const writeToolDefinitions: (import("@cyanheads/mcp-ts-core").Too
440
639
  type: import("zod").ZodLiteral<"periodic">;
441
640
  period: import("zod").ZodEnum<{
442
641
  daily: "daily";
443
- weekly: "weekly";
444
642
  monthly: "monthly";
445
643
  quarterly: "quarterly";
644
+ weekly: "weekly";
446
645
  yearly: "yearly";
447
646
  }>;
448
647
  date: import("zod").ZodOptional<import("zod").ZodString>;
449
648
  }, import("zod/v4/core").$strip>], "type">;
450
649
  operation: import("zod").ZodEnum<{
451
- list: "list";
452
650
  add: "add";
651
+ list: "list";
453
652
  remove: "remove";
454
653
  }>;
455
654
  tags: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
456
655
  location: import("zod").ZodDefault<import("zod").ZodEnum<{
656
+ both: "both";
457
657
  frontmatter: "frontmatter";
458
658
  inline: "inline";
459
- both: "both";
460
659
  }>>;
461
660
  }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
462
661
  result: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
@@ -524,138 +723,28 @@ export declare const writeToolDefinitions: (import("@cyanheads/mcp-ts-core").Too
524
723
  type: import("zod").ZodLiteral<"periodic">;
525
724
  period: import("zod").ZodEnum<{
526
725
  daily: "daily";
527
- weekly: "weekly";
528
726
  monthly: "monthly";
529
727
  quarterly: "quarterly";
530
- yearly: "yearly";
531
- }>;
532
- date: import("zod").ZodOptional<import("zod").ZodString>;
533
- }, import("zod/v4/core").$strip>], "type">;
534
- section: import("zod").ZodObject<{
535
- type: import("zod").ZodEnum<{
536
- heading: "heading";
537
- block: "block";
538
- frontmatter: "frontmatter";
539
- }>;
540
- target: import("zod").ZodString;
541
- }, import("zod/v4/core").$strip>;
542
- operation: import("zod").ZodEnum<{
543
- replace: "replace";
544
- append: "append";
545
- prepend: "prepend";
546
- }>;
547
- content: import("zod").ZodString;
548
- contentType: import("zod").ZodDefault<import("zod").ZodEnum<{
549
- markdown: "markdown";
550
- json: "json";
551
- }>>;
552
- patchOptions: import("zod").ZodOptional<import("zod").ZodObject<{
553
- createTargetIfMissing: import("zod").ZodDefault<import("zod").ZodBoolean>;
554
- applyIfContentPreexists: import("zod").ZodDefault<import("zod").ZodBoolean>;
555
- trimTargetWhitespace: import("zod").ZodDefault<import("zod").ZodBoolean>;
556
- }, import("zod/v4/core").$strip>>;
557
- }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
558
- path: import("zod").ZodString;
559
- section: import("zod").ZodObject<{
560
- type: import("zod").ZodEnum<{
561
- heading: "heading";
562
- block: "block";
563
- frontmatter: "frontmatter";
564
- }>;
565
- target: import("zod").ZodString;
566
- }, import("zod/v4/core").$strip>;
567
- operation: import("zod").ZodEnum<{
568
- replace: "replace";
569
- append: "append";
570
- prepend: "prepend";
571
- }>;
572
- previousSizeInBytes: import("zod").ZodNumber;
573
- currentSizeInBytes: import("zod").ZodNumber;
574
- }, import("zod/v4/core").$strip>, readonly [{
575
- readonly reason: "path_forbidden";
576
- readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.Forbidden;
577
- readonly when: "The target path is outside OBSIDIAN_WRITE_PATHS, or OBSIDIAN_READ_ONLY=true denies all writes.";
578
- readonly recovery: "Use a path inside the configured write scope. The error data echoes the active scope.";
579
- }, {
580
- readonly reason: "note_missing";
581
- readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
582
- readonly when: "The vault path does not resolve to an existing note.";
583
- readonly recovery: "Verify the path with obsidian_list_notes or use obsidian_search_notes to locate the note.";
584
- }, {
585
- readonly reason: "no_active_file";
586
- readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
587
- readonly when: "Target was `active` but no file is currently open in Obsidian.";
588
- readonly recovery: "Call obsidian_open_in_ui to focus a file, or pass an explicit path target instead.";
589
- }, {
590
- readonly reason: "periodic_not_found";
591
- readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
592
- readonly when: "Target was `periodic` but no matching periodic note exists.";
593
- readonly recovery: "Create the periodic note first or pass an explicit path target.";
594
- }, {
595
- readonly reason: "periodic_disabled";
596
- readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
597
- readonly when: "Target was `periodic` but the requested period is not enabled in Obsidian's Periodic Notes plugin settings.";
598
- readonly recovery: "Pass an explicit path target — the requested period is disabled in the operator's Periodic Notes plugin.";
599
- }, {
600
- readonly reason: "section_target_missing";
601
- readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
602
- 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.";
603
- readonly recovery: "Call obsidian_get_note with format document-map to discover the available targets.";
604
- }, {
605
- readonly reason: "content_preexists";
606
- readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
607
- readonly when: "The supplied content already appears at the target — the patch was rejected to keep retries idempotent (the default).";
608
- readonly recovery: "Pass `patchOptions.applyIfContentPreexists: true` to force-apply over preexisting content, or change the content to something not already present.";
609
- }], undefined> | import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
610
- target: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
611
- type: import("zod").ZodLiteral<"path">;
612
- path: import("zod").ZodString;
613
- }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
614
- type: import("zod").ZodLiteral<"active">;
615
- }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
616
- type: import("zod").ZodLiteral<"periodic">;
617
- period: import("zod").ZodEnum<{
618
- daily: "daily";
619
728
  weekly: "weekly";
620
- monthly: "monthly";
621
- quarterly: "quarterly";
622
729
  yearly: "yearly";
623
730
  }>;
624
731
  date: import("zod").ZodOptional<import("zod").ZodString>;
625
732
  }, import("zod/v4/core").$strip>], "type">;
626
- replacements: import("zod").ZodArray<import("zod").ZodObject<{
627
- search: import("zod").ZodString;
628
- replace: import("zod").ZodString;
629
- useRegex: import("zod").ZodDefault<import("zod").ZodBoolean>;
630
- caseSensitive: import("zod").ZodDefault<import("zod").ZodBoolean>;
631
- wholeWord: import("zod").ZodDefault<import("zod").ZodBoolean>;
632
- flexibleWhitespace: import("zod").ZodDefault<import("zod").ZodBoolean>;
633
- replaceAll: import("zod").ZodDefault<import("zod").ZodBoolean>;
634
- }, import("zod/v4/core").$strip>>;
635
733
  }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
636
734
  path: import("zod").ZodString;
637
- totalReplacements: import("zod").ZodNumber;
638
- perReplacement: import("zod").ZodArray<import("zod").ZodObject<{
639
- search: import("zod").ZodString;
640
- count: import("zod").ZodNumber;
641
- }, import("zod/v4/core").$strip>>;
735
+ deleted: import("zod").ZodBoolean;
642
736
  previousSizeInBytes: import("zod").ZodNumber;
643
737
  currentSizeInBytes: import("zod").ZodNumber;
644
738
  }, import("zod/v4/core").$strip>, readonly [{
645
739
  readonly reason: "path_forbidden";
646
740
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.Forbidden;
647
- readonly when: "The target path is outside OBSIDIAN_WRITE_PATHS, or OBSIDIAN_READ_ONLY=true denies all writes. (The pre-read also requires the path to be readable.)";
741
+ readonly when: "The target path is outside OBSIDIAN_WRITE_PATHS, or OBSIDIAN_READ_ONLY=true denies all writes.";
648
742
  readonly recovery: "Use a path inside the configured write scope. The error data echoes the active scope.";
649
743
  }, {
650
- readonly reason: "regex_invalid";
651
- readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
652
- readonly when: "A `useRegex: true` replacement supplied a `search` pattern that is not a valid ECMAScript regex.";
653
- readonly recovery: "Use a valid ECMAScript regex, or set useRegex to false to match `search` as a literal string.";
654
- }, {
655
- readonly reason: "regex_unsafe";
656
- readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
657
- readonly when: "A `useRegex: true` replacement supplied a `search` pattern that is well-formed but exceeds the 1024-character limit or contains nested quantifiers known to cause catastrophic backtracking against the note body.";
658
- readonly recovery: "Avoid nested quantifiers like `(a+)+` or `(.*)*`. Use a simpler pattern, or set useRegex to false to match `search` as a literal string.";
744
+ readonly reason: "cancelled";
745
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.InvalidRequest;
746
+ readonly when: "User declined the deletion via interactive elicitation.";
747
+ readonly recovery: "Re-run the tool when the user is ready to confirm deletion.";
659
748
  }, {
660
749
  readonly reason: "note_missing";
661
750
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
@@ -670,97 +759,15 @@ export declare const writeToolDefinitions: (import("@cyanheads/mcp-ts-core").Too
670
759
  readonly reason: "periodic_not_found";
671
760
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
672
761
  readonly when: "Target was `periodic` but no matching periodic note exists.";
673
- readonly recovery: "Create the periodic note first or pass an explicit path target.";
674
- }, {
675
- readonly reason: "periodic_disabled";
676
- readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
677
- readonly when: "Target was `periodic` but the requested period is not enabled in Obsidian's Periodic Notes plugin settings.";
678
- readonly recovery: "Pass an explicit path target — the requested period is disabled in the operator's Periodic Notes plugin.";
679
- }], undefined> | import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
680
- target: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
681
- type: import("zod").ZodLiteral<"path">;
682
- path: import("zod").ZodString;
683
- }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
684
- type: import("zod").ZodLiteral<"active">;
685
- }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
686
- type: import("zod").ZodLiteral<"periodic">;
687
- period: import("zod").ZodEnum<{
688
- daily: "daily";
689
- weekly: "weekly";
690
- monthly: "monthly";
691
- quarterly: "quarterly";
692
- yearly: "yearly";
693
- }>;
694
- date: import("zod").ZodOptional<import("zod").ZodString>;
695
- }, import("zod/v4/core").$strip>], "type">;
696
- content: import("zod").ZodString;
697
- section: import("zod").ZodOptional<import("zod").ZodObject<{
698
- type: import("zod").ZodEnum<{
699
- heading: "heading";
700
- block: "block";
701
- frontmatter: "frontmatter";
702
- }>;
703
- target: import("zod").ZodString;
704
- }, import("zod/v4/core").$strip>>;
705
- contentType: import("zod").ZodDefault<import("zod").ZodEnum<{
706
- markdown: "markdown";
707
- json: "json";
708
- }>>;
709
- overwrite: import("zod").ZodDefault<import("zod").ZodBoolean>;
710
- }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
711
- path: import("zod").ZodString;
712
- sectionTargeted: import("zod").ZodBoolean;
713
- created: import("zod").ZodBoolean;
714
- previousSizeInBytes: import("zod").ZodNumber;
715
- currentSizeInBytes: import("zod").ZodNumber;
716
- }, import("zod/v4/core").$strip>, readonly [{
717
- readonly reason: "file_exists";
718
- readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.Conflict;
719
- readonly when: "Whole-file write was attempted against an existing note and `overwrite` was not set to `true`.";
720
- readonly recovery: "Retry with overwrite true or use obsidian_patch_note for in-place edits.";
721
- }, {
722
- readonly reason: "path_forbidden";
723
- readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.Forbidden;
724
- readonly when: "The target path is outside OBSIDIAN_WRITE_PATHS, or OBSIDIAN_READ_ONLY=true denies all writes.";
725
- readonly recovery: "Use a path inside the configured write scope. The error data echoes the active scope.";
726
- }, {
727
- readonly reason: "note_missing";
728
- readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
729
- readonly when: "Section replace targets a path that does not resolve to an existing note (PATCH requires the file to exist).";
730
- readonly recovery: "Verify the path with obsidian_list_notes, or omit `section` to fall back to whole-file write (which creates the note when it is absent).";
731
- }, {
732
- readonly reason: "no_active_file";
733
- readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
734
- readonly when: "Target was `active` but no file is currently open in Obsidian.";
735
- readonly recovery: "Call obsidian_open_in_ui to focus a file, or pass an explicit path target instead.";
736
- }, {
737
- readonly reason: "periodic_not_found";
738
- readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
739
- readonly when: "Target was `periodic` but no matching periodic note exists.";
740
- readonly recovery: "Create the periodic note first or pass an explicit path target.";
762
+ readonly recovery: "Pass an explicit path target periodic notes must already exist.";
741
763
  }, {
742
764
  readonly reason: "periodic_disabled";
743
765
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
744
766
  readonly when: "Target was `periodic` but the requested period is not enabled in Obsidian's Periodic Notes plugin settings.";
745
767
  readonly recovery: "Pass an explicit path target — the requested period is disabled in the operator's Periodic Notes plugin.";
746
- }, {
747
- readonly reason: "section_target_missing";
748
- readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
749
- readonly when: "`section` was provided but the named heading/block/frontmatter field does not exist in the note.";
750
- readonly recovery: "Call obsidian_get_note with format document-map to discover available targets.";
751
768
  }], undefined>)[];
752
769
  /** Command-palette tools — opt-in via `OBSIDIAN_ENABLE_COMMANDS=true`; suppressed by `OBSIDIAN_READ_ONLY=true`. */
753
770
  export declare const commandToolDefinitions: (import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
754
- commandId: import("zod").ZodString;
755
- }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
756
- commandId: import("zod").ZodString;
757
- executed: import("zod").ZodBoolean;
758
- }, import("zod/v4/core").$strip>, readonly [{
759
- readonly reason: "command_unknown";
760
- readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
761
- readonly when: "The supplied `commandId` is not registered in Obsidian. Use `obsidian_list_commands` to discover valid IDs.";
762
- readonly recovery: "Call obsidian_list_commands to discover the registered command IDs.";
763
- }], undefined> | import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
764
771
  nameRegex: import("zod").ZodOptional<import("zod").ZodString>;
765
772
  }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
766
773
  commands: import("zod").ZodArray<import("zod").ZodObject<{
@@ -780,5 +787,15 @@ export declare const commandToolDefinitions: (import("@cyanheads/mcp-ts-core").T
780
787
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
781
788
  readonly when: "The supplied `nameRegex` is well-formed but exceeds the 256-character limit or contains nested quantifiers known to cause catastrophic backtracking.";
782
789
  readonly recovery: "Avoid nested quantifiers like `(a+)+` or `(.*)*`. Use a simpler pattern (e.g. `^Templater`), or omit nameRegex to disable filtering.";
790
+ }], undefined> | import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
791
+ commandId: import("zod").ZodString;
792
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
793
+ commandId: import("zod").ZodString;
794
+ executed: import("zod").ZodBoolean;
795
+ }, import("zod/v4/core").$strip>, readonly [{
796
+ readonly reason: "command_unknown";
797
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
798
+ readonly when: "The supplied `commandId` is not registered in Obsidian. Use `obsidian_list_commands` to discover valid IDs.";
799
+ readonly recovery: "Call obsidian_list_commands to discover the registered command IDs.";
783
800
  }], undefined>)[];
784
801
  //# sourceMappingURL=index.d.ts.map