obsidian-mcp-server 3.2.8 → 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.
- package/AGENTS.md +19 -12
- package/CLAUDE.md +19 -12
- package/Dockerfile +11 -7
- package/README.md +6 -3
- package/changelog/3.2.x/3.2.10.md +47 -0
- package/changelog/3.2.x/3.2.9.md +30 -0
- package/changelog/template.md +5 -3
- package/dist/mcp-server/resources/definitions/index.d.ts +20 -20
- package/dist/mcp-server/resources/definitions/index.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/_shared/regex-safety.d.ts +11 -6
- package/dist/mcp-server/tools/definitions/_shared/regex-safety.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/_shared/regex-safety.js +13 -8
- package/dist/mcp-server/tools/definitions/_shared/regex-safety.js.map +1 -1
- package/dist/mcp-server/tools/definitions/_shared/schemas.d.ts +3 -3
- package/dist/mcp-server/tools/definitions/_shared/schemas.js +2 -2
- package/dist/mcp-server/tools/definitions/_shared/schemas.js.map +1 -1
- package/dist/mcp-server/tools/definitions/index.d.ts +242 -215
- 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 +9 -3
- 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 +1 -1
- package/dist/mcp-server/tools/definitions/obsidian-get-note.tool.d.ts +6 -6
- 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 +3 -2
- 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 +6 -1
- 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 +15 -1
- 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 +2 -2
- package/dist/mcp-server/tools/definitions/obsidian-manage-tags.tool.d.ts +3 -3
- package/dist/mcp-server/tools/definitions/obsidian-patch-note.tool.d.ts +11 -6
- 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 +10 -4
- 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 +6 -1
- 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 +24 -1
- 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 +58 -58
- 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 +3 -3
- 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 +9 -3
- 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 +14 -3
- package/dist/mcp-server/tools/definitions/obsidian-write-note.tool.js.map +1 -1
- package/dist/services/obsidian/frontmatter-ops.d.ts.map +1 -1
- package/dist/services/obsidian/frontmatter-ops.js +24 -21
- package/dist/services/obsidian/frontmatter-ops.js.map +1 -1
- package/dist/services/obsidian/obsidian-service.d.ts +8 -1
- package/dist/services/obsidian/obsidian-service.d.ts.map +1 -1
- package/dist/services/obsidian/obsidian-service.js +74 -4
- package/dist/services/obsidian/obsidian-service.js.map +1 -1
- package/dist/services/obsidian/path-policy.d.ts.map +1 -1
- package/manifest.json +1 -1
- package/package.json +15 -14
- 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
|
|
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>>;
|
|
@@ -166,6 +166,11 @@ export declare const readToolDefinitions: (import("@cyanheads/mcp-ts-core").Tool
|
|
|
166
166
|
readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
|
|
167
167
|
readonly when: "The supplied `nameRegex` is not a valid ECMAScript regex.";
|
|
168
168
|
readonly recovery: "Use a valid ECMAScript regex (e.g. `^Project.*\\.md$`), or omit nameRegex to disable filtering.";
|
|
169
|
+
}, {
|
|
170
|
+
readonly reason: "regex_unsafe";
|
|
171
|
+
readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
|
|
172
|
+
readonly when: "The supplied `nameRegex` is well-formed but exceeds the 256-character limit or contains nested quantifiers known to cause catastrophic backtracking.";
|
|
173
|
+
readonly recovery: "Avoid nested quantifiers like `(a+)+` or `(.*)*`. Use a simpler pattern (e.g. `^Project.*\\.md$`), or omit nameRegex to disable filtering.";
|
|
169
174
|
}, {
|
|
170
175
|
readonly reason: "path_forbidden";
|
|
171
176
|
readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.Forbidden;
|
|
@@ -235,9 +240,106 @@ export declare const writeToolDefinitions: (import("@cyanheads/mcp-ts-core").Too
|
|
|
235
240
|
type: import("zod").ZodLiteral<"periodic">;
|
|
236
241
|
period: import("zod").ZodEnum<{
|
|
237
242
|
daily: "daily";
|
|
243
|
+
monthly: "monthly";
|
|
244
|
+
quarterly: "quarterly";
|
|
238
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";
|
|
239
340
|
monthly: "monthly";
|
|
240
341
|
quarterly: "quarterly";
|
|
342
|
+
weekly: "weekly";
|
|
241
343
|
yearly: "yearly";
|
|
242
344
|
}>;
|
|
243
345
|
date: import("zod").ZodOptional<import("zod").ZodString>;
|
|
@@ -245,20 +347,99 @@ export declare const writeToolDefinitions: (import("@cyanheads/mcp-ts-core").Too
|
|
|
245
347
|
content: import("zod").ZodString;
|
|
246
348
|
section: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
247
349
|
type: import("zod").ZodEnum<{
|
|
248
|
-
heading: "heading";
|
|
249
350
|
block: "block";
|
|
250
351
|
frontmatter: "frontmatter";
|
|
352
|
+
heading: "heading";
|
|
251
353
|
}>;
|
|
252
354
|
target: import("zod").ZodString;
|
|
253
355
|
}, import("zod/v4/core").$strip>>;
|
|
254
356
|
contentType: import("zod").ZodDefault<import("zod").ZodEnum<{
|
|
357
|
+
json: "json";
|
|
255
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<{
|
|
256
435
|
json: "json";
|
|
436
|
+
markdown: "markdown";
|
|
257
437
|
}>>;
|
|
258
438
|
createTargetIfMissing: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
|
259
439
|
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
260
440
|
path: import("zod").ZodString;
|
|
261
441
|
sectionTargeted: import("zod").ZodBoolean;
|
|
442
|
+
sectionTarget: import("zod").ZodOptional<import("zod").ZodString>;
|
|
262
443
|
created: import("zod").ZodBoolean;
|
|
263
444
|
previousSizeInBytes: import("zod").ZodNumber;
|
|
264
445
|
currentSizeInBytes: import("zod").ZodNumber;
|
|
@@ -292,6 +473,11 @@ export declare const writeToolDefinitions: (import("@cyanheads/mcp-ts-core").Too
|
|
|
292
473
|
readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
|
|
293
474
|
readonly when: "`section` was provided but the named heading/block/frontmatter field does not exist in the note.";
|
|
294
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.";
|
|
295
481
|
}, {
|
|
296
482
|
readonly reason: "content_preexists";
|
|
297
483
|
readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
|
|
@@ -307,28 +493,46 @@ export declare const writeToolDefinitions: (import("@cyanheads/mcp-ts-core").Too
|
|
|
307
493
|
type: import("zod").ZodLiteral<"periodic">;
|
|
308
494
|
period: import("zod").ZodEnum<{
|
|
309
495
|
daily: "daily";
|
|
310
|
-
weekly: "weekly";
|
|
311
496
|
monthly: "monthly";
|
|
312
497
|
quarterly: "quarterly";
|
|
498
|
+
weekly: "weekly";
|
|
313
499
|
yearly: "yearly";
|
|
314
500
|
}>;
|
|
315
501
|
date: import("zod").ZodOptional<import("zod").ZodString>;
|
|
316
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>>;
|
|
317
512
|
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
318
513
|
path: import("zod").ZodString;
|
|
319
|
-
|
|
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>>;
|
|
320
519
|
previousSizeInBytes: import("zod").ZodNumber;
|
|
321
520
|
currentSizeInBytes: import("zod").ZodNumber;
|
|
322
521
|
}, import("zod/v4/core").$strip>, readonly [{
|
|
323
522
|
readonly reason: "path_forbidden";
|
|
324
523
|
readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.Forbidden;
|
|
325
|
-
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.)";
|
|
326
525
|
readonly recovery: "Use a path inside the configured write scope. The error data echoes the active scope.";
|
|
327
526
|
}, {
|
|
328
|
-
readonly reason: "
|
|
329
|
-
readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.
|
|
330
|
-
readonly when: "
|
|
331
|
-
readonly recovery: "
|
|
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.";
|
|
332
536
|
}, {
|
|
333
537
|
readonly reason: "note_missing";
|
|
334
538
|
readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
|
|
@@ -343,7 +547,7 @@ export declare const writeToolDefinitions: (import("@cyanheads/mcp-ts-core").Too
|
|
|
343
547
|
readonly reason: "periodic_not_found";
|
|
344
548
|
readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
|
|
345
549
|
readonly when: "Target was `periodic` but no matching periodic note exists.";
|
|
346
|
-
readonly recovery: "
|
|
550
|
+
readonly recovery: "Create the periodic note first or pass an explicit path target.";
|
|
347
551
|
}, {
|
|
348
552
|
readonly reason: "periodic_disabled";
|
|
349
553
|
readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
|
|
@@ -351,9 +555,9 @@ export declare const writeToolDefinitions: (import("@cyanheads/mcp-ts-core").Too
|
|
|
351
555
|
readonly recovery: "Pass an explicit path target — the requested period is disabled in the operator's Periodic Notes plugin.";
|
|
352
556
|
}], undefined> | import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
|
|
353
557
|
operation: import("zod").ZodEnum<{
|
|
354
|
-
set: "set";
|
|
355
558
|
delete: "delete";
|
|
356
559
|
get: "get";
|
|
560
|
+
set: "set";
|
|
357
561
|
}>;
|
|
358
562
|
target: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
|
|
359
563
|
type: import("zod").ZodLiteral<"path">;
|
|
@@ -364,9 +568,9 @@ export declare const writeToolDefinitions: (import("@cyanheads/mcp-ts-core").Too
|
|
|
364
568
|
type: import("zod").ZodLiteral<"periodic">;
|
|
365
569
|
period: import("zod").ZodEnum<{
|
|
366
570
|
daily: "daily";
|
|
367
|
-
weekly: "weekly";
|
|
368
571
|
monthly: "monthly";
|
|
369
572
|
quarterly: "quarterly";
|
|
573
|
+
weekly: "weekly";
|
|
370
574
|
yearly: "yearly";
|
|
371
575
|
}>;
|
|
372
576
|
date: import("zod").ZodOptional<import("zod").ZodString>;
|
|
@@ -435,23 +639,23 @@ export declare const writeToolDefinitions: (import("@cyanheads/mcp-ts-core").Too
|
|
|
435
639
|
type: import("zod").ZodLiteral<"periodic">;
|
|
436
640
|
period: import("zod").ZodEnum<{
|
|
437
641
|
daily: "daily";
|
|
438
|
-
weekly: "weekly";
|
|
439
642
|
monthly: "monthly";
|
|
440
643
|
quarterly: "quarterly";
|
|
644
|
+
weekly: "weekly";
|
|
441
645
|
yearly: "yearly";
|
|
442
646
|
}>;
|
|
443
647
|
date: import("zod").ZodOptional<import("zod").ZodString>;
|
|
444
648
|
}, import("zod/v4/core").$strip>], "type">;
|
|
445
649
|
operation: import("zod").ZodEnum<{
|
|
446
|
-
list: "list";
|
|
447
650
|
add: "add";
|
|
651
|
+
list: "list";
|
|
448
652
|
remove: "remove";
|
|
449
653
|
}>;
|
|
450
654
|
tags: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
|
|
451
655
|
location: import("zod").ZodDefault<import("zod").ZodEnum<{
|
|
656
|
+
both: "both";
|
|
452
657
|
frontmatter: "frontmatter";
|
|
453
658
|
inline: "inline";
|
|
454
|
-
both: "both";
|
|
455
659
|
}>>;
|
|
456
660
|
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
457
661
|
result: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
|
|
@@ -519,133 +723,28 @@ export declare const writeToolDefinitions: (import("@cyanheads/mcp-ts-core").Too
|
|
|
519
723
|
type: import("zod").ZodLiteral<"periodic">;
|
|
520
724
|
period: import("zod").ZodEnum<{
|
|
521
725
|
daily: "daily";
|
|
522
|
-
weekly: "weekly";
|
|
523
726
|
monthly: "monthly";
|
|
524
727
|
quarterly: "quarterly";
|
|
525
|
-
yearly: "yearly";
|
|
526
|
-
}>;
|
|
527
|
-
date: import("zod").ZodOptional<import("zod").ZodString>;
|
|
528
|
-
}, import("zod/v4/core").$strip>], "type">;
|
|
529
|
-
section: import("zod").ZodObject<{
|
|
530
|
-
type: import("zod").ZodEnum<{
|
|
531
|
-
heading: "heading";
|
|
532
|
-
block: "block";
|
|
533
|
-
frontmatter: "frontmatter";
|
|
534
|
-
}>;
|
|
535
|
-
target: import("zod").ZodString;
|
|
536
|
-
}, import("zod/v4/core").$strip>;
|
|
537
|
-
operation: import("zod").ZodEnum<{
|
|
538
|
-
replace: "replace";
|
|
539
|
-
append: "append";
|
|
540
|
-
prepend: "prepend";
|
|
541
|
-
}>;
|
|
542
|
-
content: import("zod").ZodString;
|
|
543
|
-
contentType: import("zod").ZodDefault<import("zod").ZodEnum<{
|
|
544
|
-
markdown: "markdown";
|
|
545
|
-
json: "json";
|
|
546
|
-
}>>;
|
|
547
|
-
patchOptions: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
548
|
-
createTargetIfMissing: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
|
549
|
-
applyIfContentPreexists: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
|
550
|
-
trimTargetWhitespace: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
|
551
|
-
}, import("zod/v4/core").$strip>>;
|
|
552
|
-
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
553
|
-
path: import("zod").ZodString;
|
|
554
|
-
section: import("zod").ZodObject<{
|
|
555
|
-
type: import("zod").ZodEnum<{
|
|
556
|
-
heading: "heading";
|
|
557
|
-
block: "block";
|
|
558
|
-
frontmatter: "frontmatter";
|
|
559
|
-
}>;
|
|
560
|
-
target: import("zod").ZodString;
|
|
561
|
-
}, import("zod/v4/core").$strip>;
|
|
562
|
-
operation: import("zod").ZodEnum<{
|
|
563
|
-
replace: "replace";
|
|
564
|
-
append: "append";
|
|
565
|
-
prepend: "prepend";
|
|
566
|
-
}>;
|
|
567
|
-
previousSizeInBytes: import("zod").ZodNumber;
|
|
568
|
-
currentSizeInBytes: import("zod").ZodNumber;
|
|
569
|
-
}, import("zod/v4/core").$strip>, readonly [{
|
|
570
|
-
readonly reason: "path_forbidden";
|
|
571
|
-
readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.Forbidden;
|
|
572
|
-
readonly when: "The target path is outside OBSIDIAN_WRITE_PATHS, or OBSIDIAN_READ_ONLY=true denies all writes.";
|
|
573
|
-
readonly recovery: "Use a path inside the configured write scope. The error data echoes the active scope.";
|
|
574
|
-
}, {
|
|
575
|
-
readonly reason: "note_missing";
|
|
576
|
-
readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
|
|
577
|
-
readonly when: "The vault path does not resolve to an existing note.";
|
|
578
|
-
readonly recovery: "Verify the path with obsidian_list_notes or use obsidian_search_notes to locate the note.";
|
|
579
|
-
}, {
|
|
580
|
-
readonly reason: "no_active_file";
|
|
581
|
-
readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
|
|
582
|
-
readonly when: "Target was `active` but no file is currently open in Obsidian.";
|
|
583
|
-
readonly recovery: "Call obsidian_open_in_ui to focus a file, or pass an explicit path target instead.";
|
|
584
|
-
}, {
|
|
585
|
-
readonly reason: "periodic_not_found";
|
|
586
|
-
readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
|
|
587
|
-
readonly when: "Target was `periodic` but no matching periodic note exists.";
|
|
588
|
-
readonly recovery: "Create the periodic note first or pass an explicit path target.";
|
|
589
|
-
}, {
|
|
590
|
-
readonly reason: "periodic_disabled";
|
|
591
|
-
readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
|
|
592
|
-
readonly when: "Target was `periodic` but the requested period is not enabled in Obsidian's Periodic Notes plugin settings.";
|
|
593
|
-
readonly recovery: "Pass an explicit path target — the requested period is disabled in the operator's Periodic Notes plugin.";
|
|
594
|
-
}, {
|
|
595
|
-
readonly reason: "section_target_missing";
|
|
596
|
-
readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
|
|
597
|
-
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.";
|
|
598
|
-
readonly recovery: "Call obsidian_get_note with format document-map to discover the available targets.";
|
|
599
|
-
}, {
|
|
600
|
-
readonly reason: "content_preexists";
|
|
601
|
-
readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
|
|
602
|
-
readonly when: "The supplied content already appears at the target — the patch was rejected to keep retries idempotent (the default).";
|
|
603
|
-
readonly recovery: "Pass `patchOptions.applyIfContentPreexists: true` to force-apply over preexisting content, or change the content to something not already present.";
|
|
604
|
-
}], undefined> | import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
|
|
605
|
-
target: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
|
|
606
|
-
type: import("zod").ZodLiteral<"path">;
|
|
607
|
-
path: import("zod").ZodString;
|
|
608
|
-
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
609
|
-
type: import("zod").ZodLiteral<"active">;
|
|
610
|
-
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
611
|
-
type: import("zod").ZodLiteral<"periodic">;
|
|
612
|
-
period: import("zod").ZodEnum<{
|
|
613
|
-
daily: "daily";
|
|
614
728
|
weekly: "weekly";
|
|
615
|
-
monthly: "monthly";
|
|
616
|
-
quarterly: "quarterly";
|
|
617
729
|
yearly: "yearly";
|
|
618
730
|
}>;
|
|
619
731
|
date: import("zod").ZodOptional<import("zod").ZodString>;
|
|
620
732
|
}, import("zod/v4/core").$strip>], "type">;
|
|
621
|
-
replacements: import("zod").ZodArray<import("zod").ZodObject<{
|
|
622
|
-
search: import("zod").ZodString;
|
|
623
|
-
replace: import("zod").ZodString;
|
|
624
|
-
useRegex: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
|
625
|
-
caseSensitive: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
|
626
|
-
wholeWord: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
|
627
|
-
flexibleWhitespace: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
|
628
|
-
replaceAll: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
|
629
|
-
}, import("zod/v4/core").$strip>>;
|
|
630
733
|
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
631
734
|
path: import("zod").ZodString;
|
|
632
|
-
|
|
633
|
-
perReplacement: import("zod").ZodArray<import("zod").ZodObject<{
|
|
634
|
-
search: import("zod").ZodString;
|
|
635
|
-
count: import("zod").ZodNumber;
|
|
636
|
-
}, import("zod/v4/core").$strip>>;
|
|
735
|
+
deleted: import("zod").ZodBoolean;
|
|
637
736
|
previousSizeInBytes: import("zod").ZodNumber;
|
|
638
737
|
currentSizeInBytes: import("zod").ZodNumber;
|
|
639
738
|
}, import("zod/v4/core").$strip>, readonly [{
|
|
640
739
|
readonly reason: "path_forbidden";
|
|
641
740
|
readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.Forbidden;
|
|
642
|
-
readonly when: "The target path is outside OBSIDIAN_WRITE_PATHS, or OBSIDIAN_READ_ONLY=true denies all writes.
|
|
741
|
+
readonly when: "The target path is outside OBSIDIAN_WRITE_PATHS, or OBSIDIAN_READ_ONLY=true denies all writes.";
|
|
643
742
|
readonly recovery: "Use a path inside the configured write scope. The error data echoes the active scope.";
|
|
644
743
|
}, {
|
|
645
|
-
readonly reason: "
|
|
646
|
-
readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.
|
|
647
|
-
readonly when: "
|
|
648
|
-
readonly recovery: "
|
|
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.";
|
|
649
748
|
}, {
|
|
650
749
|
readonly reason: "note_missing";
|
|
651
750
|
readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
|
|
@@ -660,97 +759,15 @@ export declare const writeToolDefinitions: (import("@cyanheads/mcp-ts-core").Too
|
|
|
660
759
|
readonly reason: "periodic_not_found";
|
|
661
760
|
readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
|
|
662
761
|
readonly when: "Target was `periodic` but no matching periodic note exists.";
|
|
663
|
-
readonly recovery: "
|
|
664
|
-
}, {
|
|
665
|
-
readonly reason: "periodic_disabled";
|
|
666
|
-
readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
|
|
667
|
-
readonly when: "Target was `periodic` but the requested period is not enabled in Obsidian's Periodic Notes plugin settings.";
|
|
668
|
-
readonly recovery: "Pass an explicit path target — the requested period is disabled in the operator's Periodic Notes plugin.";
|
|
669
|
-
}], undefined> | import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
|
|
670
|
-
target: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
|
|
671
|
-
type: import("zod").ZodLiteral<"path">;
|
|
672
|
-
path: import("zod").ZodString;
|
|
673
|
-
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
674
|
-
type: import("zod").ZodLiteral<"active">;
|
|
675
|
-
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
676
|
-
type: import("zod").ZodLiteral<"periodic">;
|
|
677
|
-
period: import("zod").ZodEnum<{
|
|
678
|
-
daily: "daily";
|
|
679
|
-
weekly: "weekly";
|
|
680
|
-
monthly: "monthly";
|
|
681
|
-
quarterly: "quarterly";
|
|
682
|
-
yearly: "yearly";
|
|
683
|
-
}>;
|
|
684
|
-
date: import("zod").ZodOptional<import("zod").ZodString>;
|
|
685
|
-
}, import("zod/v4/core").$strip>], "type">;
|
|
686
|
-
content: import("zod").ZodString;
|
|
687
|
-
section: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
688
|
-
type: import("zod").ZodEnum<{
|
|
689
|
-
heading: "heading";
|
|
690
|
-
block: "block";
|
|
691
|
-
frontmatter: "frontmatter";
|
|
692
|
-
}>;
|
|
693
|
-
target: import("zod").ZodString;
|
|
694
|
-
}, import("zod/v4/core").$strip>>;
|
|
695
|
-
contentType: import("zod").ZodDefault<import("zod").ZodEnum<{
|
|
696
|
-
markdown: "markdown";
|
|
697
|
-
json: "json";
|
|
698
|
-
}>>;
|
|
699
|
-
overwrite: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
|
700
|
-
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
701
|
-
path: import("zod").ZodString;
|
|
702
|
-
sectionTargeted: import("zod").ZodBoolean;
|
|
703
|
-
created: import("zod").ZodBoolean;
|
|
704
|
-
previousSizeInBytes: import("zod").ZodNumber;
|
|
705
|
-
currentSizeInBytes: import("zod").ZodNumber;
|
|
706
|
-
}, import("zod/v4/core").$strip>, readonly [{
|
|
707
|
-
readonly reason: "file_exists";
|
|
708
|
-
readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.Conflict;
|
|
709
|
-
readonly when: "Whole-file write was attempted against an existing note and `overwrite` was not set to `true`.";
|
|
710
|
-
readonly recovery: "Retry with overwrite true or use obsidian_patch_note for in-place edits.";
|
|
711
|
-
}, {
|
|
712
|
-
readonly reason: "path_forbidden";
|
|
713
|
-
readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.Forbidden;
|
|
714
|
-
readonly when: "The target path is outside OBSIDIAN_WRITE_PATHS, or OBSIDIAN_READ_ONLY=true denies all writes.";
|
|
715
|
-
readonly recovery: "Use a path inside the configured write scope. The error data echoes the active scope.";
|
|
716
|
-
}, {
|
|
717
|
-
readonly reason: "note_missing";
|
|
718
|
-
readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
|
|
719
|
-
readonly when: "Section replace targets a path that does not resolve to an existing note (PATCH requires the file to exist).";
|
|
720
|
-
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).";
|
|
721
|
-
}, {
|
|
722
|
-
readonly reason: "no_active_file";
|
|
723
|
-
readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
|
|
724
|
-
readonly when: "Target was `active` but no file is currently open in Obsidian.";
|
|
725
|
-
readonly recovery: "Call obsidian_open_in_ui to focus a file, or pass an explicit path target instead.";
|
|
726
|
-
}, {
|
|
727
|
-
readonly reason: "periodic_not_found";
|
|
728
|
-
readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
|
|
729
|
-
readonly when: "Target was `periodic` but no matching periodic note exists.";
|
|
730
|
-
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.";
|
|
731
763
|
}, {
|
|
732
764
|
readonly reason: "periodic_disabled";
|
|
733
765
|
readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
|
|
734
766
|
readonly when: "Target was `periodic` but the requested period is not enabled in Obsidian's Periodic Notes plugin settings.";
|
|
735
767
|
readonly recovery: "Pass an explicit path target — the requested period is disabled in the operator's Periodic Notes plugin.";
|
|
736
|
-
}, {
|
|
737
|
-
readonly reason: "section_target_missing";
|
|
738
|
-
readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
|
|
739
|
-
readonly when: "`section` was provided but the named heading/block/frontmatter field does not exist in the note.";
|
|
740
|
-
readonly recovery: "Call obsidian_get_note with format document-map to discover available targets.";
|
|
741
768
|
}], undefined>)[];
|
|
742
769
|
/** Command-palette tools — opt-in via `OBSIDIAN_ENABLE_COMMANDS=true`; suppressed by `OBSIDIAN_READ_ONLY=true`. */
|
|
743
770
|
export declare const commandToolDefinitions: (import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
|
|
744
|
-
commandId: import("zod").ZodString;
|
|
745
|
-
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
746
|
-
commandId: import("zod").ZodString;
|
|
747
|
-
executed: import("zod").ZodBoolean;
|
|
748
|
-
}, import("zod/v4/core").$strip>, readonly [{
|
|
749
|
-
readonly reason: "command_unknown";
|
|
750
|
-
readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
|
|
751
|
-
readonly when: "The supplied `commandId` is not registered in Obsidian. Use `obsidian_list_commands` to discover valid IDs.";
|
|
752
|
-
readonly recovery: "Call obsidian_list_commands to discover the registered command IDs.";
|
|
753
|
-
}], undefined> | import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
|
|
754
771
|
nameRegex: import("zod").ZodOptional<import("zod").ZodString>;
|
|
755
772
|
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
756
773
|
commands: import("zod").ZodArray<import("zod").ZodObject<{
|
|
@@ -770,5 +787,15 @@ export declare const commandToolDefinitions: (import("@cyanheads/mcp-ts-core").T
|
|
|
770
787
|
readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
|
|
771
788
|
readonly when: "The supplied `nameRegex` is well-formed but exceeds the 256-character limit or contains nested quantifiers known to cause catastrophic backtracking.";
|
|
772
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.";
|
|
773
800
|
}], undefined>)[];
|
|
774
801
|
//# sourceMappingURL=index.d.ts.map
|