obsidian-mcp-server 3.5.3 → 3.5.5
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.
- package/AGENTS.md +47 -6
- package/CLAUDE.md +47 -6
- package/Dockerfile +3 -2
- package/README.md +144 -100
- package/changelog/3.5.x/3.5.3.md +4 -3
- package/changelog/3.5.x/3.5.4.md +42 -0
- package/changelog/3.5.x/3.5.5.md +20 -0
- package/changelog/template.md +7 -7
- package/dist/config/server-config.d.ts +1 -1
- package/dist/config/server-config.d.ts.map +1 -1
- package/dist/config/server-config.js +9 -2
- package/dist/config/server-config.js.map +1 -1
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -1
- package/dist/mcp-server/resources/definitions/obsidian-vault-note.resource.d.ts.map +1 -1
- package/dist/mcp-server/resources/definitions/obsidian-vault-note.resource.js +19 -1
- package/dist/mcp-server/resources/definitions/obsidian-vault-note.resource.js.map +1 -1
- package/dist/mcp-server/tools/definitions/_shared/schemas.js +1 -1
- package/dist/mcp-server/tools/definitions/_shared/schemas.js.map +1 -1
- package/dist/mcp-server/tools/definitions/index.d.ts +157 -65
- package/dist/mcp-server/tools/definitions/index.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/obsidian-append-to-note.tool.d.ts +13 -2
- package/dist/mcp-server/tools/definitions/obsidian-append-to-note.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/obsidian-append-to-note.tool.js +14 -3
- package/dist/mcp-server/tools/definitions/obsidian-append-to-note.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/obsidian-delete-note.tool.d.ts +9 -0
- package/dist/mcp-server/tools/definitions/obsidian-delete-note.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/obsidian-delete-note.tool.js +9 -0
- package/dist/mcp-server/tools/definitions/obsidian-delete-note.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/obsidian-execute-command.tool.d.ts +1 -0
- package/dist/mcp-server/tools/definitions/obsidian-execute-command.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/obsidian-execute-command.tool.js +1 -0
- package/dist/mcp-server/tools/definitions/obsidian-execute-command.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/obsidian-get-note.tool.d.ts +9 -0
- package/dist/mcp-server/tools/definitions/obsidian-get-note.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/obsidian-get-note.tool.js +19 -26
- package/dist/mcp-server/tools/definitions/obsidian-get-note.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/obsidian-list-notes.tool.d.ts +3 -0
- package/dist/mcp-server/tools/definitions/obsidian-list-notes.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/obsidian-list-notes.tool.js +3 -0
- package/dist/mcp-server/tools/definitions/obsidian-list-notes.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/obsidian-manage-frontmatter.tool.d.ts +13 -0
- package/dist/mcp-server/tools/definitions/obsidian-manage-frontmatter.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/obsidian-manage-frontmatter.tool.js +19 -1
- package/dist/mcp-server/tools/definitions/obsidian-manage-frontmatter.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/obsidian-manage-tags.tool.d.ts +17 -2
- package/dist/mcp-server/tools/definitions/obsidian-manage-tags.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/obsidian-manage-tags.tool.js +22 -3
- package/dist/mcp-server/tools/definitions/obsidian-manage-tags.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/obsidian-open-in-ui.tool.d.ts +4 -0
- package/dist/mcp-server/tools/definitions/obsidian-open-in-ui.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/obsidian-open-in-ui.tool.js +4 -0
- package/dist/mcp-server/tools/definitions/obsidian-open-in-ui.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/obsidian-patch-note.tool.d.ts +13 -2
- package/dist/mcp-server/tools/definitions/obsidian-patch-note.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/obsidian-patch-note.tool.js +14 -3
- package/dist/mcp-server/tools/definitions/obsidian-patch-note.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/obsidian-replace-in-note.tool.d.ts +10 -2
- package/dist/mcp-server/tools/definitions/obsidian-replace-in-note.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/obsidian-replace-in-note.tool.js +10 -2
- package/dist/mcp-server/tools/definitions/obsidian-replace-in-note.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/obsidian-search-notes.tool.d.ts +12 -5
- package/dist/mcp-server/tools/definitions/obsidian-search-notes.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/obsidian-search-notes.tool.js +29 -24
- package/dist/mcp-server/tools/definitions/obsidian-search-notes.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/obsidian-write-note.tool.d.ts +12 -2
- package/dist/mcp-server/tools/definitions/obsidian-write-note.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/obsidian-write-note.tool.js +20 -10
- package/dist/mcp-server/tools/definitions/obsidian-write-note.tool.js.map +1 -1
- package/dist/services/obsidian/frontmatter-ops.d.ts +44 -11
- package/dist/services/obsidian/frontmatter-ops.d.ts.map +1 -1
- package/dist/services/obsidian/frontmatter-ops.js +370 -69
- package/dist/services/obsidian/frontmatter-ops.js.map +1 -1
- package/dist/services/obsidian/obsidian-service.d.ts +26 -5
- package/dist/services/obsidian/obsidian-service.d.ts.map +1 -1
- package/dist/services/obsidian/obsidian-service.js +469 -85
- package/dist/services/obsidian/obsidian-service.js.map +1 -1
- package/dist/services/obsidian/section-extractor.d.ts +33 -3
- package/dist/services/obsidian/section-extractor.d.ts.map +1 -1
- package/dist/services/obsidian/section-extractor.js +115 -75
- package/dist/services/obsidian/section-extractor.js.map +1 -1
- package/dist/services/obsidian/types.d.ts +11 -4
- package/dist/services/obsidian/types.d.ts.map +1 -1
- package/manifest.json +1 -1
- package/package.json +9 -9
- package/server.json +3 -3
|
@@ -39,6 +39,7 @@ export const obsidianOpenInUi = tool('obsidian_open_in_ui', {
|
|
|
39
39
|
errors: [
|
|
40
40
|
{
|
|
41
41
|
reason: 'path_forbidden',
|
|
42
|
+
thrownBy: 'service',
|
|
42
43
|
code: JsonRpcErrorCode.Forbidden,
|
|
43
44
|
when: 'The path is outside OBSIDIAN_READ_PATHS, or — when the file does not exist and `failIfMissing: false` would have Obsidian create it — outside OBSIDIAN_WRITE_PATHS or blocked by OBSIDIAN_READ_ONLY=true.',
|
|
44
45
|
recovery: 'Open a path inside the configured scope. The error data echoes the active scope and whether read or write access was the one denied.',
|
|
@@ -51,18 +52,21 @@ export const obsidianOpenInUi = tool('obsidian_open_in_ui', {
|
|
|
51
52
|
},
|
|
52
53
|
{
|
|
53
54
|
reason: 'ambiguous_path',
|
|
55
|
+
thrownBy: 'service',
|
|
54
56
|
code: JsonRpcErrorCode.Conflict,
|
|
55
57
|
when: 'The parent directory contains multiple files whose names differ only in case (case-sensitive filesystems only).',
|
|
56
58
|
recovery: 'Retry with one of the exact paths listed in `matches` on the error data.',
|
|
57
59
|
},
|
|
58
60
|
{
|
|
59
61
|
reason: 'path_is_directory',
|
|
62
|
+
thrownBy: 'service',
|
|
60
63
|
code: JsonRpcErrorCode.ValidationError,
|
|
61
64
|
when: 'The supplied path names a folder rather than a file.',
|
|
62
65
|
recovery: 'Call obsidian_list_notes with this path to list the folder, then open one of the files it returns.',
|
|
63
66
|
},
|
|
64
67
|
{
|
|
65
68
|
reason: 'path_traversal',
|
|
69
|
+
thrownBy: 'service',
|
|
66
70
|
code: JsonRpcErrorCode.ValidationError,
|
|
67
71
|
when: 'The path contains a `.` or `..` segment, which is rejected to prevent vault escape.',
|
|
68
72
|
recovery: 'Supply a vault-relative path with no `.` or `..` segments, e.g. "Projects/Note.md". Use obsidian_list_notes to browse the vault.',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"obsidian-open-in-ui.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SizeInBytes: z.ZodNumber;
|
|
66
66
|
}, z.core.$strip>, readonly [{
|
|
67
67
|
readonly reason: "path_forbidden";
|
|
68
|
+
readonly thrownBy: "service";
|
|
68
69
|
readonly code: JsonRpcErrorCode.Forbidden;
|
|
69
70
|
readonly when: "The target path is outside OBSIDIAN_WRITE_PATHS, or OBSIDIAN_READ_ONLY=true denies all writes.";
|
|
70
71
|
readonly recovery: "Use a path inside the configured write scope. The error data echoes the active scope.";
|
|
71
72
|
}, {
|
|
72
73
|
readonly reason: "note_missing";
|
|
74
|
+
readonly thrownBy: "service";
|
|
73
75
|
readonly code: JsonRpcErrorCode.NotFound;
|
|
74
76
|
readonly when: "The vault path does not resolve to an existing note.";
|
|
75
77
|
readonly recovery: "Verify the path with obsidian_list_notes or use obsidian_search_notes to locate the note.";
|
|
76
78
|
}, {
|
|
77
79
|
readonly reason: "no_active_file";
|
|
80
|
+
readonly thrownBy: "service";
|
|
78
81
|
readonly code: JsonRpcErrorCode.NotFound;
|
|
79
82
|
readonly when: "Target was `active` but no file is currently open in Obsidian.";
|
|
80
83
|
readonly recovery: "Call obsidian_open_in_ui to focus a file, or pass an explicit path target instead.";
|
|
81
84
|
}, {
|
|
82
85
|
readonly reason: "periodic_unsupported";
|
|
86
|
+
readonly thrownBy: "service";
|
|
83
87
|
readonly code: JsonRpcErrorCode.NotFound;
|
|
84
88
|
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.";
|
|
85
89
|
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.";
|
|
86
90
|
}, {
|
|
87
91
|
readonly reason: "periodic_not_found";
|
|
92
|
+
readonly thrownBy: "service";
|
|
88
93
|
readonly code: JsonRpcErrorCode.NotFound;
|
|
89
94
|
readonly when: "Target was `periodic`, the `/periodic/` routes are served on this vault, and no note exists for the requested period.";
|
|
90
95
|
readonly recovery: "Create the periodic note first or pass an explicit path target.";
|
|
91
96
|
}, {
|
|
92
97
|
readonly reason: "periodic_disabled";
|
|
98
|
+
readonly thrownBy: "service";
|
|
93
99
|
readonly code: JsonRpcErrorCode.ValidationError;
|
|
94
100
|
readonly when: "Target was `periodic` but the requested period is not enabled in Obsidian's Periodic Notes plugin settings.";
|
|
95
101
|
readonly recovery: "Pass an explicit path target — the requested period is disabled in the operator's Periodic Notes plugin.";
|
|
96
102
|
}, {
|
|
97
103
|
readonly reason: "section_target_missing";
|
|
104
|
+
readonly thrownBy: "service";
|
|
98
105
|
readonly code: JsonRpcErrorCode.ValidationError;
|
|
99
106
|
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.";
|
|
100
107
|
readonly recovery: "Call obsidian_get_note with format document-map to discover the available targets.";
|
|
101
108
|
}, {
|
|
102
109
|
readonly reason: "ambiguous_section";
|
|
110
|
+
readonly thrownBy: "service";
|
|
103
111
|
readonly code: JsonRpcErrorCode.Conflict;
|
|
104
|
-
readonly when: "A bare heading leaf name matches more than one heading in the note, so the write target is undetermined.";
|
|
105
|
-
readonly recovery: "Retry with
|
|
112
|
+
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 write target is undetermined.";
|
|
113
|
+
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.";
|
|
106
114
|
}, {
|
|
107
115
|
readonly reason: "content_preexists";
|
|
116
|
+
readonly thrownBy: "service";
|
|
108
117
|
readonly code: JsonRpcErrorCode.ValidationError;
|
|
109
118
|
readonly when: "The supplied content already appears at the target — the patch was rejected to keep retries idempotent (the default).";
|
|
110
119
|
readonly recovery: "Pass `patchOptions.applyIfContentPreexists: true` to force-apply over preexisting content, or change the content to something not already present.";
|
|
111
120
|
}, {
|
|
112
121
|
readonly reason: "path_is_directory";
|
|
122
|
+
readonly thrownBy: "service";
|
|
113
123
|
readonly code: JsonRpcErrorCode.ValidationError;
|
|
114
124
|
readonly when: "The supplied path names a folder rather than a note file.";
|
|
115
125
|
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.";
|
|
116
126
|
}, {
|
|
117
127
|
readonly reason: "path_traversal";
|
|
128
|
+
readonly thrownBy: "service";
|
|
118
129
|
readonly code: JsonRpcErrorCode.ValidationError;
|
|
119
130
|
readonly when: "The path contains a `.` or `..` segment, which is rejected to prevent vault escape.";
|
|
120
131
|
readonly recovery: "Supply a vault-relative path with no `.` or `..` segments, e.g. \"Projects/Note.md\". Use obsidian_list_notes to browse the vault.";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"obsidian-patch-note.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/obsidian-patch-note.tool.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AASjE,eAAO,MAAM,iBAAiB
|
|
1
|
+
{"version":3,"file":"obsidian-patch-note.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/obsidian-patch-note.tool.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AASjE,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAyK5B,CAAC"}
|
|
@@ -9,7 +9,7 @@ import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
|
|
|
9
9
|
import { getObsidianService } from '../../../services/obsidian/obsidian-service.js';
|
|
10
10
|
import { ContentTypeSchema, PatchOptionsSchema, SectionSchema, TargetSchema, } from './_shared/schemas.js';
|
|
11
11
|
export const obsidianPatchNote = tool('obsidian_patch_note', {
|
|
12
|
-
description: 'Edit a heading, block reference, or frontmatter field in place — append to, prepend to, or replace the target\'s body. Use `obsidian_get_note` with `format: "document-map"` to discover available targets first.
|
|
12
|
+
description: 'Edit a heading, block reference, or frontmatter field in place — append to, prepend to, or replace the target\'s body. Use `obsidian_get_note` with `format: "document-map"` to discover available targets first. Name a heading by its full `Parent::Child` path as the document map lists it, or by a bare leaf name matched at any depth. A leaf shared by several headings is rejected with `ambiguous_section`, unless one of them has no parent heading, in which case the write targets that one; a full path that occurs more than once in the note is rejected with `ambiguous_section` too.',
|
|
13
13
|
annotations: { destructiveHint: true },
|
|
14
14
|
input: z.object({
|
|
15
15
|
target: TargetSchema.describe('Where the note lives.'),
|
|
@@ -38,66 +38,77 @@ export const obsidianPatchNote = tool('obsidian_patch_note', {
|
|
|
38
38
|
errors: [
|
|
39
39
|
{
|
|
40
40
|
reason: 'path_forbidden',
|
|
41
|
+
thrownBy: 'service',
|
|
41
42
|
code: JsonRpcErrorCode.Forbidden,
|
|
42
43
|
when: 'The target path is outside OBSIDIAN_WRITE_PATHS, or OBSIDIAN_READ_ONLY=true denies all writes.',
|
|
43
44
|
recovery: 'Use a path inside the configured write scope. The error data echoes the active scope.',
|
|
44
45
|
},
|
|
45
46
|
{
|
|
46
47
|
reason: 'note_missing',
|
|
48
|
+
thrownBy: 'service',
|
|
47
49
|
code: JsonRpcErrorCode.NotFound,
|
|
48
50
|
when: 'The vault path does not resolve to an existing note.',
|
|
49
51
|
recovery: 'Verify the path with obsidian_list_notes or use obsidian_search_notes to locate the note.',
|
|
50
52
|
},
|
|
51
53
|
{
|
|
52
54
|
reason: 'no_active_file',
|
|
55
|
+
thrownBy: 'service',
|
|
53
56
|
code: JsonRpcErrorCode.NotFound,
|
|
54
57
|
when: 'Target was `active` but no file is currently open in Obsidian.',
|
|
55
58
|
recovery: 'Call obsidian_open_in_ui to focus a file, or pass an explicit path target instead.',
|
|
56
59
|
},
|
|
57
60
|
{
|
|
58
61
|
reason: 'periodic_unsupported',
|
|
62
|
+
thrownBy: 'service',
|
|
59
63
|
code: JsonRpcErrorCode.NotFound,
|
|
60
64
|
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.',
|
|
61
65
|
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.',
|
|
62
66
|
},
|
|
63
67
|
{
|
|
64
68
|
reason: 'periodic_not_found',
|
|
69
|
+
thrownBy: 'service',
|
|
65
70
|
code: JsonRpcErrorCode.NotFound,
|
|
66
71
|
when: 'Target was `periodic`, the `/periodic/` routes are served on this vault, and no note exists for the requested period.',
|
|
67
72
|
recovery: 'Create the periodic note first or pass an explicit path target.',
|
|
68
73
|
},
|
|
69
74
|
{
|
|
70
75
|
reason: 'periodic_disabled',
|
|
76
|
+
thrownBy: 'service',
|
|
71
77
|
code: JsonRpcErrorCode.ValidationError,
|
|
72
78
|
when: "Target was `periodic` but the requested period is not enabled in Obsidian's Periodic Notes plugin settings.",
|
|
73
79
|
recovery: "Pass an explicit path target — the requested period is disabled in the operator's Periodic Notes plugin.",
|
|
74
80
|
},
|
|
75
81
|
{
|
|
76
82
|
reason: 'section_target_missing',
|
|
83
|
+
thrownBy: 'service',
|
|
77
84
|
code: JsonRpcErrorCode.ValidationError,
|
|
78
85
|
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.',
|
|
79
86
|
recovery: 'Call obsidian_get_note with format document-map to discover the available targets.',
|
|
80
87
|
},
|
|
81
88
|
{
|
|
82
89
|
reason: 'ambiguous_section',
|
|
90
|
+
thrownBy: 'service',
|
|
83
91
|
code: JsonRpcErrorCode.Conflict,
|
|
84
|
-
when: 'A bare heading leaf name matches more than one heading in the note, so the write target is undetermined.',
|
|
85
|
-
recovery: 'Retry with
|
|
92
|
+
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 write target is undetermined.',
|
|
93
|
+
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.',
|
|
86
94
|
},
|
|
87
95
|
{
|
|
88
96
|
reason: 'content_preexists',
|
|
97
|
+
thrownBy: 'service',
|
|
89
98
|
code: JsonRpcErrorCode.ValidationError,
|
|
90
99
|
when: 'The supplied content already appears at the target — the patch was rejected to keep retries idempotent (the default).',
|
|
91
100
|
recovery: 'Pass `patchOptions.applyIfContentPreexists: true` to force-apply over preexisting content, or change the content to something not already present.',
|
|
92
101
|
},
|
|
93
102
|
{
|
|
94
103
|
reason: 'path_is_directory',
|
|
104
|
+
thrownBy: 'service',
|
|
95
105
|
code: JsonRpcErrorCode.ValidationError,
|
|
96
106
|
when: 'The supplied path names a folder rather than a note file.',
|
|
97
107
|
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.',
|
|
98
108
|
},
|
|
99
109
|
{
|
|
100
110
|
reason: 'path_traversal',
|
|
111
|
+
thrownBy: 'service',
|
|
101
112
|
code: JsonRpcErrorCode.ValidationError,
|
|
102
113
|
when: 'The path contains a `.` or `..` segment, which is rejected to prevent vault escape.',
|
|
103
114
|
recovery: 'Supply a vault-relative path with no `.` or `..` segments, e.g. "Projects/Note.md". Use obsidian_list_notes to browse the vault.',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"obsidian-patch-note.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/obsidian-patch-note.tool.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAC7E,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,aAAa,EACb,YAAY,GACb,MAAM,sBAAsB,CAAC;AAE9B,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,CAAC,qBAAqB,EAAE;IAC3D,WAAW,EACT,
|
|
1
|
+
{"version":3,"file":"obsidian-patch-note.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/obsidian-patch-note.tool.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAC7E,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,aAAa,EACb,YAAY,GACb,MAAM,sBAAsB,CAAC;AAE9B,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,CAAC,qBAAqB,EAAE;IAC3D,WAAW,EACT,ukBAAukB;IACzkB,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,aAAa,CAAC,QAAQ,CAAC,gDAAgD,CAAC;QACjF,SAAS,EAAE,CAAC;aACT,IAAI,CAAC,CAAC,QAAQ,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC;aACtC,QAAQ,CACP,+QAA+Q,CAChR;QACH,OAAO,EAAE,CAAC;aACP,MAAM,EAAE;aACR,QAAQ,CAAC,kEAAkE,CAAC;QAC/E,WAAW,EAAE,iBAAiB;QAC9B,YAAY,EAAE,kBAAkB,CAAC,QAAQ,CACvC,uFAAuF,CACxF;KACF,CAAC;IACF,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,IAAI,EA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AC,kBAAkB,QAAQ;aAC7E,CAAC,IAAI,CAAC,IAAI,CAAC;SACb;KACF;CACF,CAAC,CAAC"}
|
|
@@ -51,8 +51,9 @@ export declare const obsidianReplaceInNote: import("@cyanheads/mcp-ts-core").Too
|
|
|
51
51
|
currentSizeInBytes: z.ZodNumber;
|
|
52
52
|
}, z.core.$strip>, readonly [{
|
|
53
53
|
readonly reason: "path_forbidden";
|
|
54
|
+
readonly thrownBy: "service";
|
|
54
55
|
readonly code: JsonRpcErrorCode.Forbidden;
|
|
55
|
-
readonly when: "The target path is outside OBSIDIAN_WRITE_PATHS, or OBSIDIAN_READ_ONLY=true denies all writes.
|
|
56
|
+
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.";
|
|
56
57
|
readonly recovery: "Use a path inside the configured write scope. The error data echoes the active scope.";
|
|
57
58
|
}, {
|
|
58
59
|
readonly reason: "regex_invalid";
|
|
@@ -67,40 +68,47 @@ export declare const obsidianReplaceInNote: import("@cyanheads/mcp-ts-core").Too
|
|
|
67
68
|
}, {
|
|
68
69
|
readonly reason: "frontmatter_invalid";
|
|
69
70
|
readonly code: JsonRpcErrorCode.ValidationError;
|
|
70
|
-
readonly when: "A `scope` of \"frontmatter\" or \"both\" produced YAML that no longer parses as a mapping of properties. Nothing is written — the note keeps its original bytes. The check reads the rewritten YAML only, so a replacement that renames a key or changes a scalar's type while still parsing is not caught by it.";
|
|
71
|
+
readonly when: "A `scope` of \"frontmatter\" or \"both\" produced YAML that no longer parses as a mapping of properties, or that parses but cannot be re-emitted (an alias whose anchor the replacement removed). Nothing is written — the note keeps its original bytes. The check reads the rewritten YAML only, so a replacement that renames a key or changes a scalar's type while still parsing is not caught by it.";
|
|
71
72
|
readonly recovery: "Narrow the search so it cannot match inside the YAML, or leave scope at \"body\" and edit the property with obsidian_manage_frontmatter.";
|
|
72
73
|
}, {
|
|
73
74
|
readonly reason: "note_missing";
|
|
75
|
+
readonly thrownBy: "service";
|
|
74
76
|
readonly code: JsonRpcErrorCode.NotFound;
|
|
75
77
|
readonly when: "The vault path does not resolve to an existing note.";
|
|
76
78
|
readonly recovery: "Verify the path with obsidian_list_notes or use obsidian_search_notes to locate the note.";
|
|
77
79
|
}, {
|
|
78
80
|
readonly reason: "no_active_file";
|
|
81
|
+
readonly thrownBy: "service";
|
|
79
82
|
readonly code: JsonRpcErrorCode.NotFound;
|
|
80
83
|
readonly when: "Target was `active` but no file is currently open in Obsidian.";
|
|
81
84
|
readonly recovery: "Call obsidian_open_in_ui to focus a file, or pass an explicit path target instead.";
|
|
82
85
|
}, {
|
|
83
86
|
readonly reason: "periodic_unsupported";
|
|
87
|
+
readonly thrownBy: "service";
|
|
84
88
|
readonly code: JsonRpcErrorCode.NotFound;
|
|
85
89
|
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.";
|
|
86
90
|
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.";
|
|
87
91
|
}, {
|
|
88
92
|
readonly reason: "periodic_not_found";
|
|
93
|
+
readonly thrownBy: "service";
|
|
89
94
|
readonly code: JsonRpcErrorCode.NotFound;
|
|
90
95
|
readonly when: "Target was `periodic`, the `/periodic/` routes are served on this vault, and no note exists for the requested period.";
|
|
91
96
|
readonly recovery: "Create the periodic note first or pass an explicit path target.";
|
|
92
97
|
}, {
|
|
93
98
|
readonly reason: "periodic_disabled";
|
|
99
|
+
readonly thrownBy: "service";
|
|
94
100
|
readonly code: JsonRpcErrorCode.ValidationError;
|
|
95
101
|
readonly when: "Target was `periodic` but the requested period is not enabled in Obsidian's Periodic Notes plugin settings.";
|
|
96
102
|
readonly recovery: "Pass an explicit path target — the requested period is disabled in the operator's Periodic Notes plugin.";
|
|
97
103
|
}, {
|
|
98
104
|
readonly reason: "path_is_directory";
|
|
105
|
+
readonly thrownBy: "service";
|
|
99
106
|
readonly code: JsonRpcErrorCode.ValidationError;
|
|
100
107
|
readonly when: "The supplied path names a folder rather than a note file.";
|
|
101
108
|
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.";
|
|
102
109
|
}, {
|
|
103
110
|
readonly reason: "path_traversal";
|
|
111
|
+
readonly thrownBy: "service";
|
|
104
112
|
readonly code: JsonRpcErrorCode.ValidationError;
|
|
105
113
|
readonly when: "The path contains a `.` or `..` segment, which is rejected to prevent vault escape.";
|
|
106
114
|
readonly recovery: "Supply a vault-relative path with no `.` or `..` segments, e.g. \"Projects/Note.md\". Use obsidian_list_notes to browse the vault.";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"obsidian-replace-in-note.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/obsidian-replace-in-note.tool.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAgDjE,eAAO,MAAM,qBAAqB
|
|
1
|
+
{"version":3,"file":"obsidian-replace-in-note.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/obsidian-replace-in-note.tool.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAgDjE,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAgShC,CAAC"}
|
|
@@ -81,8 +81,9 @@ export const obsidianReplaceInNote = tool('obsidian_replace_in_note', {
|
|
|
81
81
|
errors: [
|
|
82
82
|
{
|
|
83
83
|
reason: 'path_forbidden',
|
|
84
|
+
thrownBy: 'service',
|
|
84
85
|
code: JsonRpcErrorCode.Forbidden,
|
|
85
|
-
when: 'The target path is outside OBSIDIAN_WRITE_PATHS, or OBSIDIAN_READ_ONLY=true denies all writes.
|
|
86
|
+
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.',
|
|
86
87
|
recovery: 'Use a path inside the configured write scope. The error data echoes the active scope.',
|
|
87
88
|
},
|
|
88
89
|
{
|
|
@@ -100,47 +101,54 @@ export const obsidianReplaceInNote = tool('obsidian_replace_in_note', {
|
|
|
100
101
|
{
|
|
101
102
|
reason: 'frontmatter_invalid',
|
|
102
103
|
code: JsonRpcErrorCode.ValidationError,
|
|
103
|
-
when: 'A `scope` of "frontmatter" or "both" produced YAML that no longer parses as a mapping of properties. Nothing is written — the note keeps its original bytes. The check reads the rewritten YAML only, so a replacement that renames a key or changes a scalar\'s type while still parsing is not caught by it.',
|
|
104
|
+
when: 'A `scope` of "frontmatter" or "both" produced YAML that no longer parses as a mapping of properties, or that parses but cannot be re-emitted (an alias whose anchor the replacement removed). Nothing is written — the note keeps its original bytes. The check reads the rewritten YAML only, so a replacement that renames a key or changes a scalar\'s type while still parsing is not caught by it.',
|
|
104
105
|
recovery: 'Narrow the search so it cannot match inside the YAML, or leave scope at "body" and edit the property with obsidian_manage_frontmatter.',
|
|
105
106
|
},
|
|
106
107
|
{
|
|
107
108
|
reason: 'note_missing',
|
|
109
|
+
thrownBy: 'service',
|
|
108
110
|
code: JsonRpcErrorCode.NotFound,
|
|
109
111
|
when: 'The vault path does not resolve to an existing note.',
|
|
110
112
|
recovery: 'Verify the path with obsidian_list_notes or use obsidian_search_notes to locate the note.',
|
|
111
113
|
},
|
|
112
114
|
{
|
|
113
115
|
reason: 'no_active_file',
|
|
116
|
+
thrownBy: 'service',
|
|
114
117
|
code: JsonRpcErrorCode.NotFound,
|
|
115
118
|
when: 'Target was `active` but no file is currently open in Obsidian.',
|
|
116
119
|
recovery: 'Call obsidian_open_in_ui to focus a file, or pass an explicit path target instead.',
|
|
117
120
|
},
|
|
118
121
|
{
|
|
119
122
|
reason: 'periodic_unsupported',
|
|
123
|
+
thrownBy: 'service',
|
|
120
124
|
code: JsonRpcErrorCode.NotFound,
|
|
121
125
|
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.',
|
|
122
126
|
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.',
|
|
123
127
|
},
|
|
124
128
|
{
|
|
125
129
|
reason: 'periodic_not_found',
|
|
130
|
+
thrownBy: 'service',
|
|
126
131
|
code: JsonRpcErrorCode.NotFound,
|
|
127
132
|
when: 'Target was `periodic`, the `/periodic/` routes are served on this vault, and no note exists for the requested period.',
|
|
128
133
|
recovery: 'Create the periodic note first or pass an explicit path target.',
|
|
129
134
|
},
|
|
130
135
|
{
|
|
131
136
|
reason: 'periodic_disabled',
|
|
137
|
+
thrownBy: 'service',
|
|
132
138
|
code: JsonRpcErrorCode.ValidationError,
|
|
133
139
|
when: "Target was `periodic` but the requested period is not enabled in Obsidian's Periodic Notes plugin settings.",
|
|
134
140
|
recovery: "Pass an explicit path target — the requested period is disabled in the operator's Periodic Notes plugin.",
|
|
135
141
|
},
|
|
136
142
|
{
|
|
137
143
|
reason: 'path_is_directory',
|
|
144
|
+
thrownBy: 'service',
|
|
138
145
|
code: JsonRpcErrorCode.ValidationError,
|
|
139
146
|
when: 'The supplied path names a folder rather than a note file.',
|
|
140
147
|
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.',
|
|
141
148
|
},
|
|
142
149
|
{
|
|
143
150
|
reason: 'path_traversal',
|
|
151
|
+
thrownBy: 'service',
|
|
144
152
|
code: JsonRpcErrorCode.ValidationError,
|
|
145
153
|
when: 'The path contains a `.` or `..` segment, which is rejected to prevent vault escape.',
|
|
146
154
|
recovery: 'Supply a vault-relative path with no `.` or `..` segments, e.g. "Projects/Note.md". Use obsidian_list_notes to browse the vault.',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"obsidian-replace-in-note.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/obsidian-replace-in-note.tool.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,qBAAqB,EAAE,MAAM,EAAE,MAAM,wCAAwC,CAAC;AACvF,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAC7E,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEpD;;;;GAIG;AACH,MAAM,wBAAwB,GAAG,IAAI,CAAC;AAEtC,MAAM,iBAAiB,GAAG,CAAC;KACxB,MAAM,CAAC;IACN,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,sCAAsC,CAAC;IAC1E,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,iDAAiD,CAAC;IAC/E,QAAQ,EAAE,CAAC;SACR,OAAO,EAAE;SACT,OAAO,CAAC,KAAK,CAAC;SACd,QAAQ,CACP,oIAAoI,CACrI;IACH,aAAa,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,uCAAuC,CAAC;IAC1F,SAAS,EAAE,CAAC;SACT,OAAO,EAAE;SACT,OAAO,CAAC,KAAK,CAAC;SACd,QAAQ,CACP,wHAAwH,CACzH;IACH,kBAAkB,EAAE,CAAC;SAClB,OA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pE,gBAAgB,EAAE,CAAC;iBAChB,MAAM,EAAE;iBACR,QAAQ,CACP,8FAA8F,CAC/F;SACJ,CAAC;aACD,QAAQ,CAAC,mCAAmC,CAAC,CACjD;aACA,QAAQ,CAAC,0DAA0D,CAAC;QACvE,mBAAmB,EAAE,CAAC;aACnB,MAAM,EAAE;aACR,QAAQ,CAAC,yDAAyD,CAAC;QACtE,kBAAkB,EAAE,CAAC;aAClB,MAAM,EAAE;aACR,QAAQ,CACP,yIAAyI,CAC1I;KACJ,CAAC;IACF,IAAI,EAAE,CAAC,qCAAqC,CAAC;IAC7C,MAAM,EAAE;QACN;YACE,MAAM,EAAE,gBAAgB;YACxB,IAAI,EAAE,gBAAgB,CAAC,SAAS;YAChC,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"obsidian-replace-in-note.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/obsidian-replace-in-note.tool.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,qBAAqB,EAAE,MAAM,EAAE,MAAM,wCAAwC,CAAC;AACvF,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAC7E,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEpD;;;;GAIG;AACH,MAAM,wBAAwB,GAAG,IAAI,CAAC;AAEtC,MAAM,iBAAiB,GAAG,CAAC;KACxB,MAAM,CAAC;IACN,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,sCAAsC,CAAC;IAC1E,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,iDAAiD,CAAC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,GAAG,EAAE,CAAC;QACT,MAAM,GAAG,GAAG,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QACrC,IAAI,GAAG,KAAK,CAAC,CAAC;YAAE,OAAO,QAAQ,CAAC;QAChC,OAAO,EAAE,CAAC;QACV,OAAO,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,GAAG,WAAW,GAAG,QAAQ,CAAC,KAAK,CAAC,GAAG,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC;IACpF,CAAC;IACD,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IACrC,IAAI,KAAK,CAAC,MAAM,IAAI,CAAC;QAAE,OAAO,QAAQ,CAAC;IACvC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,EAAE;QAAE,OAAO,EAAE,CAAC;IACrD,OAAO,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;AACjC,CAAC;AAED,SAAS,6BAA6B,CACpC,QAAgB,EAChB,MAAc,EACd,WAAmB,EACnB,GAAY,EACZ,OAAmB;IAEnB,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,qBAAqB,EAAE,MAAM,CAAC,CAAC;IAC9D,MAAM,EAAE,GAAG,IAAI,MAAM,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;IACjD,OAAO,QAAQ,CAAC,OAAO,CAAC,EAAE,EAAE,GAAG,EAAE;QAC/B,OAAO,EAAE,CAAC;QACV,OAAO,WAAW,CAAC;IACrB,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
* @fileoverview obsidian_search_notes — text/jsonlogic/omnisearch search with
|
|
3
3
|
* MCP-spec cursor pagination. The `omnisearch` mode is added conditionally by
|
|
4
4
|
* the entry point only when the Omnisearch plugin's HTTP server is reachable
|
|
5
|
-
* at startup. Text-mode hits
|
|
6
|
-
*
|
|
7
|
-
*
|
|
5
|
+
* at startup. Text-mode hits carry match locations (the service merges a
|
|
6
|
+
* multi-token query's per-token spans) and additionally clip per file via
|
|
7
|
+
* `maxMatchesPerHit` so a single match-heavy note can't blow the response
|
|
8
|
+
* budget — clipped hits carry `truncated: true` and `totalMatches`.
|
|
8
9
|
* @module mcp-server/tools/definitions/obsidian-search-notes.tool
|
|
9
10
|
*/
|
|
10
11
|
import { z } from '@cyanheads/mcp-ts-core';
|
|
@@ -108,9 +109,10 @@ export declare function buildSearchNotesTool({ omnisearchReachable }: {
|
|
|
108
109
|
readonly reason: 'query_required';
|
|
109
110
|
readonly code: JsonRpcErrorCode.ValidationError;
|
|
110
111
|
readonly when: '`query` is missing for `text` or `omnisearch` mode (required for both).';
|
|
111
|
-
readonly recovery: 'Pass `query` —
|
|
112
|
+
readonly recovery: 'Pass `query` — whitespace-separated tokens, all required, for text mode, or BM25 query syntax (quoted phrases, `-exclusion`, `path:` / `ext:` filters) for omnisearch.';
|
|
112
113
|
}, {
|
|
113
114
|
readonly reason: 'context_length_too_large';
|
|
115
|
+
readonly thrownBy: 'service';
|
|
114
116
|
readonly code: JsonRpcErrorCode.ValidationError;
|
|
115
117
|
readonly when: 'The Local REST API exhausted its string capacity building one context window per match, so the whole text search failed.';
|
|
116
118
|
readonly recovery: 'Lower `contextLength`, or narrow the query so fewer notes match. The ceiling is the product of the two, so a broad query fails at a much smaller window than a narrow one does.';
|
|
@@ -121,11 +123,13 @@ export declare function buildSearchNotesTool({ omnisearchReachable }: {
|
|
|
121
123
|
readonly recovery: 'Pass a JSONLogic tree as `logic`. `glob` and `regexp` take `[PATTERN, VALUE]` — pattern first, e.g. `{"glob": ["Projects/*.md", {"var": "path"}]}`.';
|
|
122
124
|
}, {
|
|
123
125
|
readonly reason: 'logic_invalid';
|
|
126
|
+
readonly thrownBy: 'service';
|
|
124
127
|
readonly code: JsonRpcErrorCode.ValidationError;
|
|
125
128
|
readonly when: 'The Local REST API rejected the JSONLogic tree — an unrecognized operator, or an operand it could not evaluate (an uncompilable `regexp` pattern). A mis-arity operator is not rejected: it evaluates to false and the search returns zero hits.';
|
|
126
129
|
readonly recovery: 'Check the operator names and arity. `glob` and `regexp` take `[PATTERN, VALUE]` — pattern first, e.g. `{"regexp": ["^Inbox/", {"var": "path"}]}`; the reverse order compiles the note field as the pattern.';
|
|
127
130
|
}, {
|
|
128
131
|
readonly reason: 'omnisearch_unreachable';
|
|
132
|
+
readonly thrownBy: 'service';
|
|
129
133
|
readonly code: JsonRpcErrorCode.ServiceUnavailable;
|
|
130
134
|
readonly when: 'Omnisearch was reachable at startup but is now unreachable (Obsidian quit, plugin disabled, or mobile session).';
|
|
131
135
|
readonly retryable: true;
|
|
@@ -236,9 +240,10 @@ export declare const obsidianSearchNotes: import("@cyanheads/mcp-ts-core").ToolD
|
|
|
236
240
|
readonly reason: 'query_required';
|
|
237
241
|
readonly code: JsonRpcErrorCode.ValidationError;
|
|
238
242
|
readonly when: '`query` is missing for `text` or `omnisearch` mode (required for both).';
|
|
239
|
-
readonly recovery: 'Pass `query` —
|
|
243
|
+
readonly recovery: 'Pass `query` — whitespace-separated tokens, all required, for text mode, or BM25 query syntax (quoted phrases, `-exclusion`, `path:` / `ext:` filters) for omnisearch.';
|
|
240
244
|
}, {
|
|
241
245
|
readonly reason: 'context_length_too_large';
|
|
246
|
+
readonly thrownBy: 'service';
|
|
242
247
|
readonly code: JsonRpcErrorCode.ValidationError;
|
|
243
248
|
readonly when: 'The Local REST API exhausted its string capacity building one context window per match, so the whole text search failed.';
|
|
244
249
|
readonly recovery: 'Lower `contextLength`, or narrow the query so fewer notes match. The ceiling is the product of the two, so a broad query fails at a much smaller window than a narrow one does.';
|
|
@@ -249,11 +254,13 @@ export declare const obsidianSearchNotes: import("@cyanheads/mcp-ts-core").ToolD
|
|
|
249
254
|
readonly recovery: 'Pass a JSONLogic tree as `logic`. `glob` and `regexp` take `[PATTERN, VALUE]` — pattern first, e.g. `{"glob": ["Projects/*.md", {"var": "path"}]}`.';
|
|
250
255
|
}, {
|
|
251
256
|
readonly reason: 'logic_invalid';
|
|
257
|
+
readonly thrownBy: 'service';
|
|
252
258
|
readonly code: JsonRpcErrorCode.ValidationError;
|
|
253
259
|
readonly when: 'The Local REST API rejected the JSONLogic tree — an unrecognized operator, or an operand it could not evaluate (an uncompilable `regexp` pattern). A mis-arity operator is not rejected: it evaluates to false and the search returns zero hits.';
|
|
254
260
|
readonly recovery: 'Check the operator names and arity. `glob` and `regexp` take `[PATTERN, VALUE]` — pattern first, e.g. `{"regexp": ["^Inbox/", {"var": "path"}]}`; the reverse order compiles the note field as the pattern.';
|
|
255
261
|
}, {
|
|
256
262
|
readonly reason: 'omnisearch_unreachable';
|
|
263
|
+
readonly thrownBy: 'service';
|
|
257
264
|
readonly code: JsonRpcErrorCode.ServiceUnavailable;
|
|
258
265
|
readonly when: 'Omnisearch was reachable at startup but is now unreachable (Obsidian quit, plugin disabled, or mobile session).';
|
|
259
266
|
readonly retryable: true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"obsidian-search-notes.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/obsidian-search-notes.tool.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"obsidian-search-notes.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/obsidian-search-notes.tool.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAsB,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAwGjE;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,EAAE,mBAAmB,EAAE,EAAE;IAAE,mBAAmB,EAAE,OAAO,CAAA;CAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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