obsidian-mcp-server 3.7.0 → 3.7.2

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 (94) hide show
  1. package/AGENTS.md +31 -11
  2. package/CLAUDE.md +31 -11
  3. package/Dockerfile +10 -3
  4. package/README.md +30 -91
  5. package/changelog/3.7.x/3.7.1.md +40 -0
  6. package/changelog/3.7.x/3.7.2.md +34 -0
  7. package/dist/config/server-config.js +1 -1
  8. package/dist/config/server-config.js.map +1 -1
  9. package/dist/index.js +13 -32
  10. package/dist/index.js.map +1 -1
  11. package/dist/instructions.d.ts +20 -0
  12. package/dist/instructions.d.ts.map +1 -0
  13. package/dist/instructions.js +40 -0
  14. package/dist/instructions.js.map +1 -0
  15. package/dist/mcp-server/tools/definitions/_shared/markdown.d.ts +14 -0
  16. package/dist/mcp-server/tools/definitions/_shared/markdown.d.ts.map +1 -0
  17. package/dist/mcp-server/tools/definitions/_shared/markdown.js +17 -0
  18. package/dist/mcp-server/tools/definitions/_shared/markdown.js.map +1 -0
  19. package/dist/mcp-server/tools/definitions/_shared/suggest-paths.d.ts +39 -0
  20. package/dist/mcp-server/tools/definitions/_shared/suggest-paths.d.ts.map +1 -1
  21. package/dist/mcp-server/tools/definitions/_shared/suggest-paths.js +63 -2
  22. package/dist/mcp-server/tools/definitions/_shared/suggest-paths.js.map +1 -1
  23. package/dist/mcp-server/tools/definitions/index.d.ts +127 -116
  24. package/dist/mcp-server/tools/definitions/index.d.ts.map +1 -1
  25. package/dist/mcp-server/tools/definitions/obsidian-append-to-note.tool.d.ts +6 -0
  26. package/dist/mcp-server/tools/definitions/obsidian-append-to-note.tool.d.ts.map +1 -1
  27. package/dist/mcp-server/tools/definitions/obsidian-append-to-note.tool.js +15 -6
  28. package/dist/mcp-server/tools/definitions/obsidian-append-to-note.tool.js.map +1 -1
  29. package/dist/mcp-server/tools/definitions/obsidian-delete-note.tool.d.ts.map +1 -1
  30. package/dist/mcp-server/tools/definitions/obsidian-delete-note.tool.js +5 -4
  31. package/dist/mcp-server/tools/definitions/obsidian-delete-note.tool.js.map +1 -1
  32. package/dist/mcp-server/tools/definitions/obsidian-execute-command.tool.d.ts.map +1 -1
  33. package/dist/mcp-server/tools/definitions/obsidian-execute-command.tool.js +2 -1
  34. package/dist/mcp-server/tools/definitions/obsidian-execute-command.tool.js.map +1 -1
  35. package/dist/mcp-server/tools/definitions/obsidian-get-note.tool.d.ts.map +1 -1
  36. package/dist/mcp-server/tools/definitions/obsidian-get-note.tool.js +51 -40
  37. package/dist/mcp-server/tools/definitions/obsidian-get-note.tool.js.map +1 -1
  38. package/dist/mcp-server/tools/definitions/obsidian-list-commands.tool.d.ts.map +1 -1
  39. package/dist/mcp-server/tools/definitions/obsidian-list-commands.tool.js +7 -4
  40. package/dist/mcp-server/tools/definitions/obsidian-list-commands.tool.js.map +1 -1
  41. package/dist/mcp-server/tools/definitions/obsidian-list-notes.tool.d.ts.map +1 -1
  42. package/dist/mcp-server/tools/definitions/obsidian-list-notes.tool.js +7 -6
  43. package/dist/mcp-server/tools/definitions/obsidian-list-notes.tool.js.map +1 -1
  44. package/dist/mcp-server/tools/definitions/obsidian-list-tags.tool.d.ts.map +1 -1
  45. package/dist/mcp-server/tools/definitions/obsidian-list-tags.tool.js +3 -2
  46. package/dist/mcp-server/tools/definitions/obsidian-list-tags.tool.js.map +1 -1
  47. package/dist/mcp-server/tools/definitions/obsidian-manage-frontmatter.tool.d.ts.map +1 -1
  48. package/dist/mcp-server/tools/definitions/obsidian-manage-frontmatter.tool.js +13 -9
  49. package/dist/mcp-server/tools/definitions/obsidian-manage-frontmatter.tool.js.map +1 -1
  50. package/dist/mcp-server/tools/definitions/obsidian-manage-tags.tool.d.ts.map +1 -1
  51. package/dist/mcp-server/tools/definitions/obsidian-manage-tags.tool.js +9 -5
  52. package/dist/mcp-server/tools/definitions/obsidian-manage-tags.tool.js.map +1 -1
  53. package/dist/mcp-server/tools/definitions/obsidian-open-in-ui.tool.d.ts.map +1 -1
  54. package/dist/mcp-server/tools/definitions/obsidian-open-in-ui.tool.js +2 -1
  55. package/dist/mcp-server/tools/definitions/obsidian-open-in-ui.tool.js.map +1 -1
  56. package/dist/mcp-server/tools/definitions/obsidian-patch-note.tool.d.ts.map +1 -1
  57. package/dist/mcp-server/tools/definitions/obsidian-patch-note.tool.js +5 -4
  58. package/dist/mcp-server/tools/definitions/obsidian-patch-note.tool.js.map +1 -1
  59. package/dist/mcp-server/tools/definitions/obsidian-replace-in-note.tool.d.ts.map +1 -1
  60. package/dist/mcp-server/tools/definitions/obsidian-replace-in-note.tool.js +12 -4
  61. package/dist/mcp-server/tools/definitions/obsidian-replace-in-note.tool.js.map +1 -1
  62. package/dist/mcp-server/tools/definitions/obsidian-search-notes.tool.d.ts +26 -2
  63. package/dist/mcp-server/tools/definitions/obsidian-search-notes.tool.d.ts.map +1 -1
  64. package/dist/mcp-server/tools/definitions/obsidian-search-notes.tool.js +61 -34
  65. package/dist/mcp-server/tools/definitions/obsidian-search-notes.tool.js.map +1 -1
  66. package/dist/mcp-server/tools/definitions/obsidian-write-note.tool.d.ts +5 -0
  67. package/dist/mcp-server/tools/definitions/obsidian-write-note.tool.d.ts.map +1 -1
  68. package/dist/mcp-server/tools/definitions/obsidian-write-note.tool.js +24 -6
  69. package/dist/mcp-server/tools/definitions/obsidian-write-note.tool.js.map +1 -1
  70. package/dist/services/obsidian/frontmatter-ops.d.ts +15 -1
  71. package/dist/services/obsidian/frontmatter-ops.d.ts.map +1 -1
  72. package/dist/services/obsidian/frontmatter-ops.js +55 -10
  73. package/dist/services/obsidian/frontmatter-ops.js.map +1 -1
  74. package/dist/services/obsidian/jsonlogic-evaluator.d.ts +83 -0
  75. package/dist/services/obsidian/jsonlogic-evaluator.d.ts.map +1 -0
  76. package/dist/services/obsidian/jsonlogic-evaluator.js +192 -0
  77. package/dist/services/obsidian/jsonlogic-evaluator.js.map +1 -0
  78. package/dist/services/obsidian/jsonlogic-worker.d.ts +53 -0
  79. package/dist/services/obsidian/jsonlogic-worker.d.ts.map +1 -0
  80. package/dist/services/obsidian/jsonlogic-worker.js +237 -0
  81. package/dist/services/obsidian/jsonlogic-worker.js.map +1 -0
  82. package/dist/services/obsidian/obsidian-service.d.ts +56 -8
  83. package/dist/services/obsidian/obsidian-service.d.ts.map +1 -1
  84. package/dist/services/obsidian/obsidian-service.js +254 -48
  85. package/dist/services/obsidian/obsidian-service.js.map +1 -1
  86. package/dist/services/obsidian/path-policy.d.ts +33 -5
  87. package/dist/services/obsidian/path-policy.d.ts.map +1 -1
  88. package/dist/services/obsidian/path-policy.js +99 -17
  89. package/dist/services/obsidian/path-policy.js.map +1 -1
  90. package/dist/services/obsidian/types.d.ts +12 -3
  91. package/dist/services/obsidian/types.d.ts.map +1 -1
  92. package/manifest.json +2 -2
  93. package/package.json +20 -15
  94. package/server.json +5 -5
@@ -307,122 +307,6 @@ export declare const readToolDefinitions: (import("@cyanheads/mcp-ts-core").Tool
307
307
  * `buildDeleteNoteTool`.
308
308
  */
309
309
  export declare const writeToolDefinitions: (import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
310
- target: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
311
- type: import("zod").ZodLiteral<"path">;
312
- path: import("zod").ZodString;
313
- }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
314
- type: import("zod").ZodLiteral<"active">;
315
- }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
316
- type: import("zod").ZodLiteral<"periodic">;
317
- period: import("zod").ZodEnum<{
318
- daily: "daily";
319
- monthly: "monthly";
320
- quarterly: "quarterly";
321
- weekly: "weekly";
322
- yearly: "yearly";
323
- }>;
324
- date: import("zod").ZodOptional<import("zod").ZodString>;
325
- }, import("zod/v4/core").$strip>], "type">;
326
- content: import("zod").ZodString;
327
- section: import("zod").ZodOptional<import("zod").ZodObject<{
328
- type: import("zod").ZodEnum<{
329
- block: "block";
330
- frontmatter: "frontmatter";
331
- heading: "heading";
332
- }>;
333
- target: import("zod").ZodString;
334
- }, import("zod/v4/core").$strip>>;
335
- contentType: import("zod").ZodDefault<import("zod").ZodEnum<{
336
- json: "json";
337
- markdown: "markdown";
338
- }>>;
339
- createTargetIfMissing: import("zod").ZodDefault<import("zod").ZodBoolean>;
340
- }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
341
- path: import("zod").ZodString;
342
- sectionTargeted: import("zod").ZodBoolean;
343
- sectionTarget: import("zod").ZodOptional<import("zod").ZodString>;
344
- created: import("zod").ZodBoolean;
345
- previousSizeInBytes: import("zod").ZodNumber;
346
- currentSizeInBytes: import("zod").ZodNumber;
347
- }, import("zod/v4/core").$strip>, readonly [{
348
- readonly reason: "path_forbidden";
349
- readonly thrownBy: "service";
350
- readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.Forbidden;
351
- readonly when: "The target path is outside OBSIDIAN_WRITE_PATHS, or OBSIDIAN_READ_ONLY=true denies all writes.";
352
- readonly recovery: "Use a path inside the configured write scope. The error data echoes the active scope.";
353
- }, {
354
- readonly reason: "note_missing";
355
- readonly thrownBy: "service";
356
- readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
357
- readonly when: "Section append targets a path that does not resolve to an existing note (PATCH requires the file to exist).";
358
- readonly recovery: "Verify the path with obsidian_list_notes, or omit `section` to fall back to whole-file append (which creates the note if missing).";
359
- }, {
360
- readonly reason: "no_active_file";
361
- readonly thrownBy: "service";
362
- readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
363
- readonly when: "Target was `active` but no file is currently open in Obsidian.";
364
- readonly recovery: "Call obsidian_open_in_ui to focus a file, or pass an explicit path target instead.";
365
- }, {
366
- readonly reason: "periodic_unsupported";
367
- readonly thrownBy: "service";
368
- readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
369
- readonly when: "Target was `periodic` and this vault runs Local REST API v5.0.2 or later without the companion periodic-notes extension, so the `/periodic/` routes are not served at all.";
370
- readonly recovery: "Install the periodic-notes extension from https://github.com/coddingtonbear/obsidian-local-rest-api-periodic-notes, or address the note by an explicit vault path.";
371
- }, {
372
- readonly reason: "periodic_not_found";
373
- readonly thrownBy: "service";
374
- readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
375
- readonly when: "Target was `periodic`, the `/periodic/` routes are served on this vault, and no note exists for the requested period.";
376
- readonly recovery: "Create the periodic note first or pass an explicit path target.";
377
- }, {
378
- readonly reason: "periodic_disabled";
379
- readonly thrownBy: "service";
380
- readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
381
- readonly when: "Target was `periodic` but the requested period is not enabled in Obsidian's Periodic Notes plugin settings.";
382
- readonly recovery: "Pass an explicit path target — the requested period is disabled in the operator's Periodic Notes plugin.";
383
- }, {
384
- readonly reason: "section_target_missing";
385
- readonly thrownBy: "service";
386
- readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
387
- readonly when: "`section` was provided but the named heading/block/frontmatter field does not exist in the note.";
388
- readonly recovery: "Call obsidian_get_note with format document-map to discover available targets, or pass createTargetIfMissing: true to bring it into existence.";
389
- }, {
390
- readonly reason: "ambiguous_section";
391
- readonly thrownBy: "service";
392
- readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.Conflict;
393
- readonly when: "A bare heading leaf name matches more than one heading in the note, or the resolved full heading path occurs more than once, so the append target is undetermined.";
394
- readonly recovery: "Retry with a distinct full Parent::Child heading path from `candidates` on the error data; when every candidate is the same path, rename the repeated headings first.";
395
- }, {
396
- readonly reason: "content_preexists";
397
- readonly thrownBy: "service";
398
- readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
399
- readonly when: "Section append where the supplied content already appears at the target — rejected to keep retries idempotent (the default for the section path).";
400
- readonly recovery: "Change the content to something not already present at the target, or use obsidian_patch_note with `patchOptions.applyIfContentPreexists: true` if a duplicate is intended.";
401
- }, {
402
- readonly reason: "heading_outside_section";
403
- readonly thrownBy: "service";
404
- readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
405
- readonly when: "On Local REST API v5.0 and later, content appended to a heading carries a heading at or above that section’s own level, which would have to sit outside the section.";
406
- readonly recovery: "Append the heading at the parent section or at the end of the note (no `section`), or write it one level below the target section or deeper.";
407
- }, {
408
- readonly reason: "patch_rejected";
409
- readonly thrownBy: "service";
410
- readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
411
- readonly when: "The section exists but the plugin refused the content for it — table rows for a block that is not a table, a row with the wrong cell count, a frontmatter value that cannot merge, or content of the wrong shape.";
412
- readonly recovery: "Read the target with obsidian_get_note format section, then send content that fits it — rows matching the table columns, or a value of the field’s own type.";
413
- }, {
414
- readonly reason: "path_is_directory";
415
- readonly thrownBy: "service";
416
- readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
417
- readonly when: "The supplied path names a folder rather than a note file.";
418
- readonly recovery: "Call obsidian_list_notes with this path to list the folder, then retry with the full path of one of the files it returns.";
419
- }, {
420
- readonly reason: "path_traversal";
421
- readonly thrownBy: "service";
422
- readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
423
- readonly when: "The path contains a `.` or `..` segment, which is rejected to prevent vault escape.";
424
- readonly recovery: "Supply a vault-relative path with no `.` or `..` segments, e.g. \"Projects/Note.md\". Use obsidian_list_notes to browse the vault.";
425
- }], undefined> | import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
426
310
  operation: import("zod").ZodEnum<{
427
311
  delete: "delete";
428
312
  get: "get";
@@ -674,6 +558,11 @@ export declare const writeToolDefinitions: (import("@cyanheads/mcp-ts-core").Too
674
558
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.Conflict;
675
559
  readonly when: "Whole-file write was attempted against an existing note and `overwrite` was not set to `true`.";
676
560
  readonly recovery: "Retry with overwrite true or use obsidian_patch_note for in-place edits.";
561
+ }, {
562
+ readonly reason: "case_variant_exists";
563
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.Conflict;
564
+ readonly when: "Whole-file write to a path that differs from an existing note only in letter case, on a case-insensitive filesystem (macOS, Windows) where both name one file. `existingPath` names that note when the parent folder listing shows exactly one case match; it is omitted when several match, and when a file Obsidian does not index, such as a dot-file, already sits at the path.";
565
+ readonly recovery: "Retry with the path in `existingPath` on the error data, which names the same file. Without `existingPath`, list the folder with obsidian_list_notes and use the spelling it shows, or choose another path.";
677
566
  }, {
678
567
  readonly reason: "path_forbidden";
679
568
  readonly thrownBy: "service";
@@ -746,6 +635,128 @@ export declare const writeToolDefinitions: (import("@cyanheads/mcp-ts-core").Too
746
635
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
747
636
  readonly when: "The path contains a `.` or `..` segment, which is rejected to prevent vault escape.";
748
637
  readonly recovery: "Supply a vault-relative path with no `.` or `..` segments, e.g. \"Projects/Note.md\". Use obsidian_list_notes to browse the vault.";
638
+ }], undefined> | import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
639
+ target: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
640
+ type: import("zod").ZodLiteral<"path">;
641
+ path: import("zod").ZodString;
642
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
643
+ type: import("zod").ZodLiteral<"active">;
644
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
645
+ type: import("zod").ZodLiteral<"periodic">;
646
+ period: import("zod").ZodEnum<{
647
+ daily: "daily";
648
+ monthly: "monthly";
649
+ quarterly: "quarterly";
650
+ weekly: "weekly";
651
+ yearly: "yearly";
652
+ }>;
653
+ date: import("zod").ZodOptional<import("zod").ZodString>;
654
+ }, import("zod/v4/core").$strip>], "type">;
655
+ content: import("zod").ZodString;
656
+ section: import("zod").ZodOptional<import("zod").ZodObject<{
657
+ type: import("zod").ZodEnum<{
658
+ block: "block";
659
+ frontmatter: "frontmatter";
660
+ heading: "heading";
661
+ }>;
662
+ target: import("zod").ZodString;
663
+ }, import("zod/v4/core").$strip>>;
664
+ contentType: import("zod").ZodDefault<import("zod").ZodEnum<{
665
+ json: "json";
666
+ markdown: "markdown";
667
+ }>>;
668
+ createTargetIfMissing: import("zod").ZodDefault<import("zod").ZodBoolean>;
669
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
670
+ path: import("zod").ZodString;
671
+ sectionTargeted: import("zod").ZodBoolean;
672
+ sectionTarget: import("zod").ZodOptional<import("zod").ZodString>;
673
+ created: import("zod").ZodBoolean;
674
+ previousSizeInBytes: import("zod").ZodNumber;
675
+ currentSizeInBytes: import("zod").ZodNumber;
676
+ }, import("zod/v4/core").$strip>, readonly [{
677
+ readonly reason: "case_variant_exists";
678
+ readonly thrownBy: "service";
679
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.Conflict;
680
+ readonly when: "Whole-file append to a path that differs from an existing note only in letter case, on a case-insensitive filesystem (macOS, Windows) where both name one file. `existingPath` names that note when the parent folder listing shows exactly one case match; it is omitted when several match, and when a file Obsidian does not index, such as a dot-file, already sits at the path.";
681
+ readonly recovery: "Retry with the path in `existingPath` on the error data, which names the same file. Without `existingPath`, list the folder with obsidian_list_notes and use the spelling it shows, or choose another path.";
682
+ }, {
683
+ readonly reason: "path_forbidden";
684
+ readonly thrownBy: "service";
685
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.Forbidden;
686
+ readonly when: "The target path is outside OBSIDIAN_WRITE_PATHS, or OBSIDIAN_READ_ONLY=true denies all writes.";
687
+ readonly recovery: "Use a path inside the configured write scope. The error data echoes the active scope.";
688
+ }, {
689
+ readonly reason: "note_missing";
690
+ readonly thrownBy: "service";
691
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
692
+ readonly when: "Section append targets a path that does not resolve to an existing note (PATCH requires the file to exist).";
693
+ readonly recovery: "Verify the path with obsidian_list_notes, or omit `section` to fall back to whole-file append (which creates the note if missing).";
694
+ }, {
695
+ readonly reason: "no_active_file";
696
+ readonly thrownBy: "service";
697
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
698
+ readonly when: "Target was `active` but no file is currently open in Obsidian.";
699
+ readonly recovery: "Call obsidian_open_in_ui to focus a file, or pass an explicit path target instead.";
700
+ }, {
701
+ readonly reason: "periodic_unsupported";
702
+ readonly thrownBy: "service";
703
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
704
+ readonly when: "Target was `periodic` and this vault runs Local REST API v5.0.2 or later without the companion periodic-notes extension, so the `/periodic/` routes are not served at all.";
705
+ readonly recovery: "Install the periodic-notes extension from https://github.com/coddingtonbear/obsidian-local-rest-api-periodic-notes, or address the note by an explicit vault path.";
706
+ }, {
707
+ readonly reason: "periodic_not_found";
708
+ readonly thrownBy: "service";
709
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
710
+ readonly when: "Target was `periodic`, the `/periodic/` routes are served on this vault, and no note exists for the requested period.";
711
+ readonly recovery: "Create the periodic note first or pass an explicit path target.";
712
+ }, {
713
+ readonly reason: "periodic_disabled";
714
+ readonly thrownBy: "service";
715
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
716
+ readonly when: "Target was `periodic` but the requested period is not enabled in Obsidian's Periodic Notes plugin settings.";
717
+ readonly recovery: "Pass an explicit path target — the requested period is disabled in the operator's Periodic Notes plugin.";
718
+ }, {
719
+ readonly reason: "section_target_missing";
720
+ readonly thrownBy: "service";
721
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
722
+ readonly when: "`section` was provided but the named heading/block/frontmatter field does not exist in the note.";
723
+ readonly recovery: "Call obsidian_get_note with format document-map to discover available targets, or pass createTargetIfMissing: true to bring it into existence.";
724
+ }, {
725
+ readonly reason: "ambiguous_section";
726
+ readonly thrownBy: "service";
727
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.Conflict;
728
+ readonly when: "A bare heading leaf name matches more than one heading in the note, or the resolved full heading path occurs more than once, so the append target is undetermined.";
729
+ readonly recovery: "Retry with a distinct full Parent::Child heading path from `candidates` on the error data; when every candidate is the same path, rename the repeated headings first.";
730
+ }, {
731
+ readonly reason: "content_preexists";
732
+ readonly thrownBy: "service";
733
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
734
+ readonly when: "Section append where the supplied content already appears at the target — rejected to keep retries idempotent (the default for the section path).";
735
+ readonly recovery: "Change the content to something not already present at the target, or use obsidian_patch_note with `patchOptions.applyIfContentPreexists: true` if a duplicate is intended.";
736
+ }, {
737
+ readonly reason: "heading_outside_section";
738
+ readonly thrownBy: "service";
739
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
740
+ readonly when: "On Local REST API v5.0 and later, content appended to a heading carries a heading at or above that section’s own level, which would have to sit outside the section.";
741
+ readonly recovery: "Append the heading at the parent section or at the end of the note (no `section`), or write it one level below the target section or deeper.";
742
+ }, {
743
+ readonly reason: "patch_rejected";
744
+ readonly thrownBy: "service";
745
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
746
+ readonly when: "The section exists but the plugin refused the content for it — table rows for a block that is not a table, a row with the wrong cell count, a frontmatter value that cannot merge, or content of the wrong shape.";
747
+ readonly recovery: "Read the target with obsidian_get_note format section, then send content that fits it — rows matching the table columns, or a value of the field’s own type.";
748
+ }, {
749
+ readonly reason: "path_is_directory";
750
+ readonly thrownBy: "service";
751
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
752
+ readonly when: "The supplied path names a folder rather than a note file.";
753
+ readonly recovery: "Call obsidian_list_notes with this path to list the folder, then retry with the full path of one of the files it returns.";
754
+ }, {
755
+ readonly reason: "path_traversal";
756
+ readonly thrownBy: "service";
757
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
758
+ readonly when: "The path contains a `.` or `..` segment, which is rejected to prevent vault escape.";
759
+ readonly recovery: "Supply a vault-relative path with no `.` or `..` segments, e.g. \"Projects/Note.md\". Use obsidian_list_notes to browse the vault.";
749
760
  }], undefined> | import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
750
761
  target: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
751
762
  type: import("zod").ZodLiteral<"path">;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAeH,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AAEvE;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAK/B,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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Number;
48
48
  currentSizeInBytes: z.ZodNumber;
49
49
  }, z.core.$strip>, readonly [{
50
+ readonly reason: "case_variant_exists";
51
+ readonly thrownBy: "service";
52
+ readonly code: JsonRpcErrorCode.Conflict;
53
+ readonly when: "Whole-file append to a path that differs from an existing note only in letter case, on a case-insensitive filesystem (macOS, Windows) where both name one file. `existingPath` names that note when the parent folder listing shows exactly one case match; it is omitted when several match, and when a file Obsidian does not index, such as a dot-file, already sits at the path.";
54
+ readonly recovery: "Retry with the path in `existingPath` on the error data, which names the same file. Without `existingPath`, list the folder with obsidian_list_notes and use the spelling it shows, or choose another path.";
55
+ }, {
50
56
  readonly reason: "path_forbidden";
51
57
  readonly thrownBy: "service";
52
58
  readonly code: JsonRpcErrorCode.Forbidden;
@@ -1 +1 @@
1
- {"version":3,"file":"obsidian-append-to-note.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/obsidian-append-to-note.tool.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAIjE,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAkN/B,CAAC"}
1
+ {"version":3,"file":"obsidian-append-to-note.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/obsidian-append-to-note.tool.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAMjE,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA4N/B,CAAC"}
@@ -8,10 +8,12 @@
8
8
  */
9
9
  import { tool, z } from '@cyanheads/mcp-ts-core';
10
10
  import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
11
+ import { escapeMarkdownInline } from '@cyanheads/mcp-ts-core/utils';
11
12
  import { getObsidianService } from '../../../services/obsidian/obsidian-service.js';
12
13
  import { ContentTypeSchema, SectionSchema, TargetSchema } from './_shared/schemas.js';
14
+ import { withCaseVariantNamed } from './_shared/suggest-paths.js';
13
15
  export const obsidianAppendToNote = tool('obsidian_append_to_note', {
14
- description: 'Append content to a note. **Without `section`: appends to the end of the file, or creates the file if it does not exist (your content becomes the full file).** When an existing file does not end in a line break, one is inserted before your content. With `section`: appends to the end of that heading/block/frontmatter (on Local REST API v5.0 and later, content appended to a heading is separated from the section’s existing content by a blank line, except a list item appended to a section that ends in a list and has no sub-headings, which continues that list) — use `obsidian_get_note` with `format: "document-map"` to discover available targets. Name a heading by its full `Parent::Child` path as the document map lists it, or by a bare leaf name matched at any depth. A leaf shared by several headings is rejected with `ambiguous_section`, unless one of them has no parent heading, in which case the write targets that one; a full path that occurs more than once in the note is rejected with `ambiguous_section` too. For block-reference targets, content is concatenated adjacent to the block line without inserting a separator — include a leading newline in `content` if you want one. Set `createTargetIfMissing` to bring the target section into existence rather than failing when it does not exist.',
16
+ description: 'Append content to a note. **Without `section`: appends to the end of the file, or creates the file if it does not exist (your content becomes the full file).** When an existing file does not end in a line break, one is inserted before your content. On a case-insensitive filesystem, a path that differs from an existing note only in letter case fails with `case_variant_exists` (`existingPath` names the note when the folder listing shows exactly one case match). With `section`: appends to the end of that heading/block/frontmatter (on Local REST API v5.0 and later, content appended to a heading is separated from the section’s existing content by a blank line, except a list item appended to a section that ends in a list and has no sub-headings, which continues that list) — use `obsidian_get_note` with `format: "document-map"` to discover available targets. Name a heading by its full `Parent::Child` path as the document map lists it, or by a bare leaf name matched at any depth. A leaf shared by several headings is rejected with `ambiguous_section`, unless one of them has no parent heading, in which case the write targets that one; a full path that occurs more than once in the note is rejected with `ambiguous_section` too. For block-reference targets, content is concatenated adjacent to the block line without inserting a separator — include a leading newline in `content` if you want one. Set `createTargetIfMissing` to bring the target section into existence rather than failing when it does not exist.',
15
17
  annotations: { destructiveHint: true },
16
18
  input: z.object({
17
19
  target: TargetSchema.describe('Where the note lives.'),
@@ -44,6 +46,13 @@ export const obsidianAppendToNote = tool('obsidian_append_to_note', {
44
46
  }),
45
47
  auth: ['tool:obsidian_append_to_note:write'],
46
48
  errors: [
49
+ {
50
+ reason: 'case_variant_exists',
51
+ thrownBy: 'service',
52
+ code: JsonRpcErrorCode.Conflict,
53
+ when: 'Whole-file append to a path that differs from an existing note only in letter case, on a case-insensitive filesystem (macOS, Windows) where both name one file. `existingPath` names that note when the parent folder listing shows exactly one case match; it is omitted when several match, and when a file Obsidian does not index, such as a dot-file, already sits at the path.',
54
+ recovery: 'Retry with the path in `existingPath` on the error data, which names the same file. Without `existingPath`, list the folder with obsidian_list_notes and use the spelling it shows, or choose another path.',
55
+ },
47
56
  {
48
57
  reason: 'path_forbidden',
49
58
  thrownBy: 'service',
@@ -143,8 +152,8 @@ export const obsidianAppendToNote = tool('obsidian_append_to_note', {
143
152
  * presence probe and the write itself act on the same concrete file —
144
153
  * avoids re-resolving `active` / `periodic` targets across calls.
145
154
  */
146
- const path = await svc.resolvePath(ctx, input.target);
147
- const pathTarget = { type: 'path', path };
155
+ const pathTarget = await svc.resolveTarget(ctx, input.target);
156
+ const { path } = pathTarget;
148
157
  if (input.section) {
149
158
  const previousSizeInBytes = await svc.getSize(ctx, pathTarget);
150
159
  const sectionTarget = await svc.patchNote(ctx, pathTarget, input.content, {
@@ -165,7 +174,7 @@ export const obsidianAppendToNote = tool('obsidian_append_to_note', {
165
174
  };
166
175
  }
167
176
  const previousSizeInBytes = await svc.tryGetSize(ctx, pathTarget);
168
- await svc.appendToNote(ctx, pathTarget, input.content, input.contentType);
177
+ await withCaseVariantNamed(ctx, svc, path, () => svc.appendToNote(ctx, pathTarget, input.content, input.contentType));
169
178
  const currentSizeInBytes = await svc.getSize(ctx, pathTarget);
170
179
  return {
171
180
  path,
@@ -177,13 +186,13 @@ export const obsidianAppendToNote = tool('obsidian_append_to_note', {
177
186
  },
178
187
  format: (result) => {
179
188
  const action = result.created ? 'Created' : 'Appended to';
180
- const lines = [`**${action} ${result.path}**`];
189
+ const lines = [`**${action} ${escapeMarkdownInline(result.path)}**`];
181
190
  if (result.created) {
182
191
  lines.push('*Note:* this file did not exist before — your content is now the entire file. If you expected to add to existing content, double-check the path.');
183
192
  }
184
193
  lines.push(`*Size:* ${result.previousSizeInBytes} → ${result.currentSizeInBytes} bytes`);
185
194
  lines.push(`*Created:* ${result.created}`);
186
- lines.push(`*Section targeted:* ${result.sectionTargeted}${result.sectionTarget ? ` → ${result.sectionTarget}` : ''}`);
195
+ lines.push(`*Section targeted:* ${result.sectionTargeted}${result.sectionTarget ? ` → ${escapeMarkdownInline(result.sectionTarget)}` : ''}`);
187
196
  return [{ type: 'text', text: lines.join('\n') }];
188
197
  },
189
198
  });
@@ -1 +1 @@
1
- {"version":3,"file":"obsidian-append-to-note.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/obsidian-append-to-note.tool.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAC7E,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEtF,MAAM,CAAC,MAAM,oBAAoB,GAAG,IAAI,CAAC,yBAAyB,EAAE;IAClE,WAAW,EACT,yxCAAy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MAAM,CAAC,OAAO,EAAE,CAAC,CAAC;QAC3C,KAAK,CAAC,IAAI,CACR,uBAAuB,MAAM,CAAC,eAAe,GAAG,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,MAAM,MAAM,CAAC,aAAa,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAC3G,CAAC;QACF,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACpD,CAAC;CACF,CAAC,CAAC"}
1
+ {"version":3,"file":"obsidian-append-to-note.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/obsidian-append-to-note.tool.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAC7E,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACtF,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAElE,MAAM,CAAC,MAAM,oBAAoB,GAAG,IAAI,CAAC,yBAAyB,EAAE;IAClE,WAAW,EACT,g/CAAg/C;IACl/C,WAAW,EAAE,EAAE,eAAe,EAAE,IAAI,EAAE;IACtC,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,MAAM,EAAE,YAAY,CAAC,QAAQ,CAAC,uBAAuB,CAAC;QACtD,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,0DAA0D,CAAC;QACxF,OAAO,EAAE,aAAa,CAAC,QAAQ,EAAE,CAAC,QAAQ,CACxC,kGAAkG,CACnG;QACD,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AC,eAAe,GAAG,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,MAAM,oBAAoB,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CACjI,CAAC;QACF,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACpD,CAAC;CACF,CAAC,CAAC"}
@@ -1 +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;;;;;;;;;GASG;AAIH,OAAO,EAAqC,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAC9E,OAAO,EAAE,gBAAgB,EAAsB,MAAM,+BAA+B,CAAC;AA6DrF;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,EAAE,WAAW,EAAE,EAAE;IAAE,WAAW,EAAE,OAAO,CAAA;CAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAmCvD,WAAW;;mBAEb,0EAA0E;uBACtE,QAAQ;uBACR,6DAA6D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;eAgKpF;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAhLT,WAAW;;mBAEb,0EAA0E;uBACtE,QAAQ;uBACR,6DAA6D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA4KR,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;;;;;;;;;GASG;AAIH,OAAO,EAAqC,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAC9E,OAAO,EAAE,gBAAgB,EAAsB,MAAM,+BAA+B,CAAC;AA8DrF;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,EAAE,WAAW,EAAE,EAAE;IAAE,WAAW,EAAE,OAAO,CAAA;CAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAmCvD,WAAW;;mBAEb,0EAA0E;uBACtE,QAAQ;uBACR,6DAA6D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;eAgKpF;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAhLT,WAAW;;mBAEb,0EAA0E;uBACtE,QAAQ;uBACR,6DAA6D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA4KR,CAAC"}
@@ -12,6 +12,7 @@ import { createHash, randomUUID } from 'node:crypto';
12
12
  import { isDeepStrictEqual } from 'node:util';
13
13
  import { inputRequired, tool, z } from '@cyanheads/mcp-ts-core';
14
14
  import { JsonRpcErrorCode, McpError, notFound } from '@cyanheads/mcp-ts-core/errors';
15
+ import { escapeMarkdownInline } from '@cyanheads/mcp-ts-core/utils';
15
16
  import { getObsidianService } from '../../../services/obsidian/obsidian-service.js';
16
17
  import { TargetSchema } from './_shared/schemas.js';
17
18
  import { findSimilarPaths } from './_shared/suggest-paths.js';
@@ -191,9 +192,9 @@ export function buildDeleteNoteTool({ elicitation }) {
191
192
  * a prompt or a stored record.
192
193
  */
193
194
  const svc = getObsidianService();
194
- const path = await svc.resolvePath(ctx, input.target);
195
- svc.policy.assertWritable(path);
196
- const pathTarget = { type: 'path', path };
195
+ const pathTarget = await svc.resolveTarget(ctx, input.target);
196
+ const { path } = pathTarget;
197
+ svc.policy.assertWritable(path, pathTarget.resolvedFrom);
197
198
  /**
198
199
  * The read runs in both modes: it throws `path_is_directory` for a folder,
199
200
  * which the DELETE would remove with everything inside it, and
@@ -248,7 +249,7 @@ export function buildDeleteNoteTool({ elicitation }) {
248
249
  format: (result) => [
249
250
  {
250
251
  type: 'text',
251
- text: `**Deleted ${result.path}** (size: ${result.previousSizeInBytes} → ${result.currentSizeInBytes} bytes)`,
252
+ text: `**Deleted ${escapeMarkdownInline(result.path)}** (size: ${result.previousSizeInBytes} → ${result.currentSizeInBytes} bytes)`,
252
253
  },
253
254
  ],
254
255
  });
@@ -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;;;;;;;;;GASG;AAEH,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAgB,aAAa,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAC9E,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AACrF,OAAO,EAAE,kBAAkB,EAAwB,MAAM,yCAAyC,CAAC;AACnG,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAE9D,MAAM,SAAS,GAAG,sBAAsB,CAAC;AACzC,MAAM,mBAAmB,GAAG,GAAG,CAAC;AAChC,MAAM,IAAI,GAAG,gEAAgE,CAAC;AAE9E,kFAAkF;AAClF,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IAClC,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,CAAC,0DAA0D,CAAC;CAC1F,CAAC,CAAC;AAEH;;;GAGG;AACH,MAAM,aAAa,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7B,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,iCAAiC,CAAC;IACjE,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ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C,GAAG,EAAE,UAAU,CAAC,CAAC;YACtC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,CAAC,EAAE,CAAC;QAC7E,CAAC;QAED,MAAM,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC;YAClB;gBACE,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,aAAa,MAAM,CAAC,IAAI,aAAa,MAAM,CAAC,mBAAmB,MAAM,MAAM,CAAC,kBAAkB,SAAS;aAC9G;SACF;KACF,CAAC,CAAC;AACL,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,mBAAmB,CAAC,EAAE,WAAW,EAAE,KAAK,EAAE,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;;;;;;;;;GASG;AAEH,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAgB,aAAa,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAC9E,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AACrF,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACpE,OAAO,EAAE,kBAAkB,EAAwB,MAAM,yCAAyC,CAAC;AACnG,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAE9D,MAAM,SAAS,GAAG,sBAAsB,CAAC;AACzC,MAAM,mBAAmB,GAAG,GAAG,CAAC;AAChC,MAAM,IAAI,GAAG,gEAAgE,CAAC;AAE9E,kFAAkF;AAClF,MAAM,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AI,MAAM,mBAAmB,4FAA4F;gCACzJ,eAAe,EAAE,kBAAkB;6BACpC,CAAC;yBACH;wBACD,YAAY,EAAE,KAAK;qBACpB,CAAC,CAAC;gBACL,CAAC;gBAED,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;oBACpB,MAAM,GAAG,CAAC,IAAI,CAAC,WAAW,EAAE,6BAA6B,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC;gBACvE,CAAC;YACH,CAAC;YAED,MAAM,GAAG,CAAC,UAAU,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC;YACtC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,CAAC,EAAE,CAAC;QAC7E,CAAC;QAED,MAAM,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC;YAClB;gBACE,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,aAAa,oBAAoB,CAAC,MAAM,CAAC,IAAI,CAAC,aAAa,MAAM,CAAC,mBAAmB,MAAM,MAAM,CAAC,kBAAkB,SAAS;aACpI;SACF;KACF,CAAC,CAAC;AACL,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,mBAAmB,CAAC,EAAE,WAAW,EAAE,KAAK,EAAE,CAAC,CAAC"}
@@ -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;;;;;;;;;;;cAqCjC,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;AAIjE,eAAO,MAAM,sBAAsB;;;;;;;;;;;cAqCjC,CAAC"}
@@ -7,6 +7,7 @@
7
7
  import { tool, z } from '@cyanheads/mcp-ts-core';
8
8
  import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
9
9
  import { getObsidianService } from '../../../services/obsidian/obsidian-service.js';
10
+ import { inlineCode } from './_shared/markdown.js';
10
11
  export const obsidianExecuteCommand = tool('obsidian_execute_command', {
11
12
  description: 'Execute an Obsidian command by ID (from `obsidian_list_commands`). Behaviour depends on the command — some are destructive (delete file, close vault), some open UI. Commands run with the same authority as a user invoking them from the keyboard.',
12
13
  annotations: { openWorldHint: true, destructiveHint: true },
@@ -38,7 +39,7 @@ export const obsidianExecuteCommand = tool('obsidian_execute_command', {
38
39
  format: (result) => [
39
40
  {
40
41
  type: 'text',
41
- text: `**Executed \`${result.commandId}\`** (executed: ${result.executed})`,
42
+ text: `**Executed ${inlineCode(result.commandId)}** (executed: ${result.executed})`,
42
43
  },
43
44
  ],
44
45
  });
@@ -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,sPAAsP;IACxP,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,QAAQ,EAAE,SAAS;YACnB,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"}
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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M;YACZ,IAAI,EAAE,cAAc,UAAU,CAAC,MAAM,CAAC,SAAS,CAAC,iBAAiB,MAAM,CAAC,QAAQ,GAAG;SACpF;KACF;CACF,CAAC,CAAC"}
@@ -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,EAAY,MAAM,+BAA+B,CAAC;AAgB3E,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiY1B,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,EAAY,MAAM,+BAA+B,CAAC;AAmB3E,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4X1B,CAAC"}