obsidian-mcp-server 3.6.1 → 3.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +40 -22
- package/CLAUDE.md +40 -22
- package/Dockerfile +3 -3
- package/README.md +29 -17
- package/changelog/3.7.x/3.7.0.md +34 -0
- package/changelog/3.7.x/3.7.1.md +40 -0
- package/dist/config/server-config.d.ts +1 -0
- package/dist/config/server-config.d.ts.map +1 -1
- package/dist/config/server-config.js +5 -1
- package/dist/config/server-config.js.map +1 -1
- package/dist/index.js +35 -35
- package/dist/index.js.map +1 -1
- package/dist/instructions.d.ts +20 -0
- package/dist/instructions.d.ts.map +1 -0
- package/dist/instructions.js +40 -0
- package/dist/instructions.js.map +1 -0
- package/dist/mcp-server/resources/definitions/obsidian-tags.resource.d.ts +7 -5
- package/dist/mcp-server/resources/definitions/obsidian-tags.resource.d.ts.map +1 -1
- package/dist/mcp-server/resources/definitions/obsidian-tags.resource.js +12 -8
- package/dist/mcp-server/resources/definitions/obsidian-tags.resource.js.map +1 -1
- package/dist/mcp-server/tools/definitions/_shared/suggest-paths.d.ts +69 -9
- package/dist/mcp-server/tools/definitions/_shared/suggest-paths.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/_shared/suggest-paths.js +88 -7
- package/dist/mcp-server/tools/definitions/_shared/suggest-paths.js.map +1 -1
- package/dist/mcp-server/tools/definitions/index.d.ts +256 -309
- package/dist/mcp-server/tools/definitions/index.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/index.js +9 -3
- package/dist/mcp-server/tools/definitions/index.js.map +1 -1
- package/dist/mcp-server/tools/definitions/obsidian-append-to-note.tool.d.ts +6 -0
- 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 +12 -4
- 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 +107 -10
- 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 +237 -162
- package/dist/mcp-server/tools/definitions/obsidian-delete-note.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/obsidian-get-note.tool.d.ts +1 -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 +70 -24
- 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 +8 -10
- package/dist/mcp-server/tools/definitions/obsidian-list-notes.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/obsidian-list-tags.tool.d.ts +7 -5
- package/dist/mcp-server/tools/definitions/obsidian-list-tags.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/obsidian-list-tags.tool.js +13 -7
- package/dist/mcp-server/tools/definitions/obsidian-list-tags.tool.js.map +1 -1
- 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 +6 -4
- 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.map +1 -1
- package/dist/mcp-server/tools/definitions/obsidian-manage-tags.tool.js +4 -2
- 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 -1
- 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 +15 -4
- 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.js +2 -2
- 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.map +1 -1
- package/dist/mcp-server/tools/definitions/obsidian-replace-in-note.tool.js +4 -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 +26 -2
- 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 +47 -15
- 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 +5 -0
- 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 +21 -4
- package/dist/mcp-server/tools/definitions/obsidian-write-note.tool.js.map +1 -1
- package/dist/services/obsidian/frontmatter-ops.d.ts +15 -1
- package/dist/services/obsidian/frontmatter-ops.d.ts.map +1 -1
- package/dist/services/obsidian/frontmatter-ops.js +55 -10
- package/dist/services/obsidian/frontmatter-ops.js.map +1 -1
- package/dist/services/obsidian/jsonlogic-evaluator.d.ts +83 -0
- package/dist/services/obsidian/jsonlogic-evaluator.d.ts.map +1 -0
- package/dist/services/obsidian/jsonlogic-evaluator.js +192 -0
- package/dist/services/obsidian/jsonlogic-evaluator.js.map +1 -0
- package/dist/services/obsidian/jsonlogic-worker.d.ts +53 -0
- package/dist/services/obsidian/jsonlogic-worker.d.ts.map +1 -0
- package/dist/services/obsidian/jsonlogic-worker.js +237 -0
- package/dist/services/obsidian/jsonlogic-worker.js.map +1 -0
- package/dist/services/obsidian/obsidian-service.d.ts +61 -6
- package/dist/services/obsidian/obsidian-service.d.ts.map +1 -1
- package/dist/services/obsidian/obsidian-service.js +301 -53
- package/dist/services/obsidian/obsidian-service.js.map +1 -1
- package/dist/services/obsidian/patch-instruction.d.ts +20 -1
- package/dist/services/obsidian/patch-instruction.d.ts.map +1 -1
- package/dist/services/obsidian/patch-instruction.js +30 -0
- package/dist/services/obsidian/patch-instruction.js.map +1 -1
- package/dist/services/obsidian/path-policy.d.ts +55 -5
- package/dist/services/obsidian/path-policy.d.ts.map +1 -1
- package/dist/services/obsidian/path-policy.js +143 -19
- package/dist/services/obsidian/path-policy.js.map +1 -1
- package/dist/services/obsidian/section-extractor.d.ts +24 -0
- package/dist/services/obsidian/section-extractor.d.ts.map +1 -1
- package/dist/services/obsidian/section-extractor.js +37 -0
- package/dist/services/obsidian/section-extractor.js.map +1 -1
- package/dist/services/obsidian/types.d.ts +12 -3
- package/dist/services/obsidian/types.d.ts.map +1 -1
- package/manifest.json +10 -2
- package/package.json +18 -14
- package/server.json +19 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/index.ts"],"names":[],"mappings":"AAAA
|
|
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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|
9
9
|
* Omnisearch reachability, which is only known after the startup probe runs.
|
|
10
|
+
* `obsidian_delete_note` is exposed as a factory (`buildDeleteNoteTool`)
|
|
11
|
+
* because its description and confirmation round follow
|
|
12
|
+
* `OBSIDIAN_DELETE_ELICITATION`, which the entry point reads.
|
|
10
13
|
* @module mcp-server/tools/definitions/index
|
|
11
14
|
*/
|
|
12
15
|
import { obsidianAppendToNote } from './obsidian-append-to-note.tool.js';
|
|
13
|
-
import { obsidianDeleteNote } from './obsidian-delete-note.tool.js';
|
|
14
16
|
import { obsidianExecuteCommand } from './obsidian-execute-command.tool.js';
|
|
15
17
|
import { obsidianGetNote } from './obsidian-get-note.tool.js';
|
|
16
18
|
import { obsidianListCommands } from './obsidian-list-commands.tool.js';
|
|
@@ -22,6 +24,7 @@ import { obsidianOpenInUi } from './obsidian-open-in-ui.tool.js';
|
|
|
22
24
|
import { obsidianPatchNote } from './obsidian-patch-note.tool.js';
|
|
23
25
|
import { obsidianReplaceInNote } from './obsidian-replace-in-note.tool.js';
|
|
24
26
|
import { obsidianWriteNote } from './obsidian-write-note.tool.js';
|
|
27
|
+
export { buildDeleteNoteTool } from './obsidian-delete-note.tool.js';
|
|
25
28
|
export { buildSearchNotesTool } from './obsidian-search-notes.tool.js';
|
|
26
29
|
/**
|
|
27
30
|
* Tools that don't depend on runtime probes — always registered, even with
|
|
@@ -42,7 +45,11 @@ export const readToolDefinitions = [
|
|
|
42
45
|
obsidianListTags,
|
|
43
46
|
obsidianOpenInUi,
|
|
44
47
|
];
|
|
45
|
-
/**
|
|
48
|
+
/**
|
|
49
|
+
* Write tools — wrapped with `disabledTool()` when `OBSIDIAN_READ_ONLY=true`.
|
|
50
|
+
* `obsidian_delete_note` joins this set in the entry point, built via
|
|
51
|
+
* `buildDeleteNoteTool`.
|
|
52
|
+
*/
|
|
46
53
|
export const writeToolDefinitions = [
|
|
47
54
|
obsidianWriteNote,
|
|
48
55
|
obsidianAppendToNote,
|
|
@@ -50,7 +57,6 @@ export const writeToolDefinitions = [
|
|
|
50
57
|
obsidianReplaceInNote,
|
|
51
58
|
obsidianManageFrontmatter,
|
|
52
59
|
obsidianManageTags,
|
|
53
|
-
obsidianDeleteNote,
|
|
54
60
|
];
|
|
55
61
|
/** Command-palette tools — opt-in via `OBSIDIAN_ENABLE_COMMANDS=true`; suppressed by `OBSIDIAN_READ_ONLY=true`. */
|
|
56
62
|
export const commandToolDefinitions = [obsidianListCommands, obsidianExecuteCommand];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAC5E,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AACxE,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,yBAAyB,EAAE,MAAM,uCAAuC,CAAC;AAClF,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAElE,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AAEvE;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,eAAe;IACf,iBAAiB;IACjB,gBAAgB;IAChB,gBAAgB;CACjB,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,iBAAiB;IACjB,oBAAoB;IACpB,iBAAiB;IACjB,qBAAqB;IACrB,yBAAyB;IACzB,kBAAkB;CACnB,CAAC;AAEF,mHAAmH;AACnH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,oBAAoB,EAAE,sBAAsB,CAAC,CAAC"}
|
|
@@ -47,6 +47,12 @@ export declare const obsidianAppendToNote: import("@cyanheads/mcp-ts-core").Tool
|
|
|
47
47
|
previousSizeInBytes: z.ZodNumber;
|
|
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;
|
|
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;AAKjE,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA4N/B,CAAC"}
|
|
@@ -10,8 +10,9 @@ import { tool, z } from '@cyanheads/mcp-ts-core';
|
|
|
10
10
|
import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
|
|
11
11
|
import { getObsidianService } from '../../../services/obsidian/obsidian-service.js';
|
|
12
12
|
import { ContentTypeSchema, SectionSchema, TargetSchema } from './_shared/schemas.js';
|
|
13
|
+
import { withCaseVariantNamed } from './_shared/suggest-paths.js';
|
|
13
14
|
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.',
|
|
15
|
+
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
16
|
annotations: { destructiveHint: true },
|
|
16
17
|
input: z.object({
|
|
17
18
|
target: TargetSchema.describe('Where the note lives.'),
|
|
@@ -44,6 +45,13 @@ export const obsidianAppendToNote = tool('obsidian_append_to_note', {
|
|
|
44
45
|
}),
|
|
45
46
|
auth: ['tool:obsidian_append_to_note:write'],
|
|
46
47
|
errors: [
|
|
48
|
+
{
|
|
49
|
+
reason: 'case_variant_exists',
|
|
50
|
+
thrownBy: 'service',
|
|
51
|
+
code: JsonRpcErrorCode.Conflict,
|
|
52
|
+
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.',
|
|
53
|
+
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.',
|
|
54
|
+
},
|
|
47
55
|
{
|
|
48
56
|
reason: 'path_forbidden',
|
|
49
57
|
thrownBy: 'service',
|
|
@@ -143,8 +151,8 @@ export const obsidianAppendToNote = tool('obsidian_append_to_note', {
|
|
|
143
151
|
* presence probe and the write itself act on the same concrete file —
|
|
144
152
|
* avoids re-resolving `active` / `periodic` targets across calls.
|
|
145
153
|
*/
|
|
146
|
-
const
|
|
147
|
-
const
|
|
154
|
+
const pathTarget = await svc.resolveTarget(ctx, input.target);
|
|
155
|
+
const { path } = pathTarget;
|
|
148
156
|
if (input.section) {
|
|
149
157
|
const previousSizeInBytes = await svc.getSize(ctx, pathTarget);
|
|
150
158
|
const sectionTarget = await svc.patchNote(ctx, pathTarget, input.content, {
|
|
@@ -165,7 +173,7 @@ export const obsidianAppendToNote = tool('obsidian_append_to_note', {
|
|
|
165
173
|
};
|
|
166
174
|
}
|
|
167
175
|
const previousSizeInBytes = await svc.tryGetSize(ctx, pathTarget);
|
|
168
|
-
await svc.appendToNote(ctx, pathTarget, input.content, input.contentType);
|
|
176
|
+
await withCaseVariantNamed(ctx, svc, path, () => svc.appendToNote(ctx, pathTarget, input.content, input.contentType));
|
|
169
177
|
const currentSizeInBytes = await svc.getSize(ctx, pathTarget);
|
|
170
178
|
return {
|
|
171
179
|
path,
|
|
@@ -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;
|
|
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;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,WAAW,EAAE,iBAAiB;QAC9B,qBAAqB,EAAE,CAAC;aACrB,OAAO,EAAE;aACT,OAAO,CAAC,KAAK,CAAC;aACd,QAAQ,CACP,qIAAqI,CACtI;KACJ,CAAC;IACF,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,2CAA2C,CAAC;QACtE,eAAe,EAAE,CAAC;aACf,OAAO,EAAE;aACT,QAAQ,CACP,gHAAgH,CACjH;QACH,aAAa,EAAE,CAAC;aACb,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CACP,iMAAiM,CAClM;QACH,OAAO,E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B,GAAG,MAAM,GAAG,CAAC,OAAO,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC;QAC9D,OAAO;YACL,IAAI;YACJ,eAAe,EAAE,KAAK;YACtB,OAAO,EAAE,mBAAmB,KAAK,IAAI;YACrC,mBAAmB,EAAE,mBAAmB,IAAI,CAAC;YAC7C,kBAAkB;SACnB,CAAC;IACJ,CAAC;IAED,MAAM,EAAE,CAAC,MAAM,EAAE,EAAE;QACjB,MAAM,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,aAAa,CAAC;QAC1D,MAAM,KAAK,GAAG,CAAC,KAAK,MAAM,IAAI,MAAM,CAAC,IAAI,IAAI,CAAC,CAAC;QAC/C,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;YACnB,KAAK,CAAC,IAAI,CACR,kJAAkJ,CACnJ,CAAC;QACJ,CAAC;QACD,KAAK,CAAC,IAAI,CAAC,WAAW,MAAM,CAAC,mBAAmB,MAAM,MAAM,CAAC,kBAAkB,QAAQ,CAAC,CAAC;QACzF,KAAK,CAAC,IAAI,CAAC,cAAc,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,13 +1,23 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @fileoverview obsidian_delete_note — permanently delete a note.
|
|
2
|
+
* @fileoverview obsidian_delete_note — permanently delete a note. Built by a
|
|
3
|
+
* factory because the confirmation is an operator choice
|
|
4
|
+
* (`OBSIDIAN_DELETE_ELICITATION`, read in the entry point): off, the handler
|
|
5
|
+
* checks write scope, reads the note, and deletes. On, it suspends via
|
|
3
6
|
* `ctx.requestInput` to confirm with the user before the DELETE, and is
|
|
4
|
-
* re-entered with the answer on `ctx.inputs
|
|
7
|
+
* re-entered with the answer on `ctx.inputs`; the answer counts only on a
|
|
5
8
|
* round that redeems the consent record this handler stored when it asked.
|
|
6
9
|
* @module mcp-server/tools/definitions/obsidian-delete-note.tool
|
|
7
10
|
*/
|
|
8
11
|
import { z } from '@cyanheads/mcp-ts-core';
|
|
9
12
|
import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
|
|
10
|
-
|
|
13
|
+
/**
|
|
14
|
+
* `elicitation` mirrors `OBSIDIAN_DELETE_ELICITATION`. Off, the operator's
|
|
15
|
+
* `OBSIDIAN_WRITE_PATHS` / `OBSIDIAN_READ_ONLY` are what bound a delete — the
|
|
16
|
+
* same bound `obsidian_write_note` with `overwrite: true` already has.
|
|
17
|
+
*/
|
|
18
|
+
export declare function buildDeleteNoteTool({ elicitation }: {
|
|
19
|
+
elicitation: boolean;
|
|
20
|
+
}): import("@cyanheads/mcp-ts-core").ToolDefinition<z.ZodObject<{
|
|
11
21
|
target: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
12
22
|
type: z.ZodLiteral<"path">;
|
|
13
23
|
path: z.ZodString;
|
|
@@ -35,18 +45,105 @@ export declare const obsidianDeleteNote: import("@cyanheads/mcp-ts-core").ToolDe
|
|
|
35
45
|
readonly code: JsonRpcErrorCode.Forbidden;
|
|
36
46
|
readonly when: "The target path is outside OBSIDIAN_WRITE_PATHS, or OBSIDIAN_READ_ONLY=true denies all writes.";
|
|
37
47
|
readonly recovery: "Use a path inside the configured write scope. The error data echoes the active scope.";
|
|
38
|
-
}, {
|
|
39
|
-
readonly reason:
|
|
48
|
+
}, ...{
|
|
49
|
+
readonly reason: 'cancelled';
|
|
40
50
|
readonly code: JsonRpcErrorCode.InvalidRequest;
|
|
41
|
-
readonly when:
|
|
42
|
-
readonly severity:
|
|
43
|
-
readonly recovery:
|
|
51
|
+
readonly when: 'User declined, cancelled, or answered false to the confirmation request.';
|
|
52
|
+
readonly severity: 'notice';
|
|
53
|
+
readonly recovery: 'Re-run the tool when the user is ready to confirm deletion.';
|
|
54
|
+
}[], {
|
|
55
|
+
readonly reason: "note_missing";
|
|
56
|
+
readonly thrownBy: "service";
|
|
57
|
+
readonly code: JsonRpcErrorCode.NotFound;
|
|
58
|
+
readonly when: "No note has exactly this vault path, letter case included. Near matches in the same folder, such as a different-case spelling, are listed in `suggestions` and never deleted in its place.";
|
|
59
|
+
readonly recovery: "Verify the path with obsidian_list_notes or use obsidian_search_notes to locate the note. Deletes match the path exactly, letter case included; pass a path from `suggestions` as given.";
|
|
60
|
+
}, {
|
|
61
|
+
readonly reason: "no_active_file";
|
|
62
|
+
readonly thrownBy: "service";
|
|
63
|
+
readonly code: JsonRpcErrorCode.NotFound;
|
|
64
|
+
readonly when: "Target was `active` but no file is currently open in Obsidian.";
|
|
65
|
+
readonly recovery: "Call obsidian_open_in_ui to focus a file, or pass an explicit path target instead.";
|
|
66
|
+
}, {
|
|
67
|
+
readonly reason: "periodic_unsupported";
|
|
68
|
+
readonly thrownBy: "service";
|
|
69
|
+
readonly code: JsonRpcErrorCode.NotFound;
|
|
70
|
+
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.";
|
|
71
|
+
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.";
|
|
72
|
+
}, {
|
|
73
|
+
readonly reason: "periodic_not_found";
|
|
74
|
+
readonly thrownBy: "service";
|
|
75
|
+
readonly code: JsonRpcErrorCode.NotFound;
|
|
76
|
+
readonly when: "Target was `periodic`, the `/periodic/` routes are served on this vault, and no note exists for the requested period.";
|
|
77
|
+
readonly recovery: "Pass an explicit path target — periodic notes must already exist.";
|
|
78
|
+
}, {
|
|
79
|
+
readonly reason: "periodic_disabled";
|
|
80
|
+
readonly thrownBy: "service";
|
|
81
|
+
readonly code: JsonRpcErrorCode.ValidationError;
|
|
82
|
+
readonly when: "Target was `periodic` but the requested period is not enabled in Obsidian's Periodic Notes plugin settings.";
|
|
83
|
+
readonly recovery: "Pass an explicit path target — the requested period is disabled in the operator's Periodic Notes plugin.";
|
|
84
|
+
}, {
|
|
85
|
+
readonly reason: "path_is_directory";
|
|
86
|
+
readonly thrownBy: "service";
|
|
87
|
+
readonly code: JsonRpcErrorCode.ValidationError;
|
|
88
|
+
readonly when: "The supplied path names a folder rather than a note file. Deleting a folder is not offered — the upstream removes it and everything inside it in one unrecoverable step.";
|
|
89
|
+
readonly recovery: "Call obsidian_list_notes with this path to list the folder, then delete files one at a time by their full paths.";
|
|
44
90
|
}, {
|
|
91
|
+
readonly reason: "path_traversal";
|
|
92
|
+
readonly thrownBy: "service";
|
|
93
|
+
readonly code: JsonRpcErrorCode.ValidationError;
|
|
94
|
+
readonly when: "The path contains a `.` or `..` segment, which is rejected to prevent vault escape.";
|
|
95
|
+
readonly recovery: "Supply a vault-relative path with no `.` or `..` segments, e.g. \"Projects/Note.md\". Use obsidian_list_notes to browse the vault.";
|
|
96
|
+
}], undefined>;
|
|
97
|
+
/**
|
|
98
|
+
* Static specimen for the MCP definition linter (which duck-types tool
|
|
99
|
+
* exports out of each `.tool.ts` file) and for tests that import the tool
|
|
100
|
+
* directly. Built with the confirmation off — the default, and what an
|
|
101
|
+
* unconfigured install registers. The entry point (`src/index.ts`) builds the
|
|
102
|
+
* live tool via `buildDeleteNoteTool` from `OBSIDIAN_DELETE_ELICITATION`; this
|
|
103
|
+
* export is not the registered tool. The confirming variant is exercised by
|
|
104
|
+
* tests rather than the linter (two exports under the same tool name would
|
|
105
|
+
* collide on `name-unique`).
|
|
106
|
+
*/
|
|
107
|
+
export declare const obsidianDeleteNote: import("@cyanheads/mcp-ts-core").ToolDefinition<z.ZodObject<{
|
|
108
|
+
target: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
109
|
+
type: z.ZodLiteral<"path">;
|
|
110
|
+
path: z.ZodString;
|
|
111
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
112
|
+
type: z.ZodLiteral<"active">;
|
|
113
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
114
|
+
type: z.ZodLiteral<"periodic">;
|
|
115
|
+
period: z.ZodEnum<{
|
|
116
|
+
daily: "daily";
|
|
117
|
+
monthly: "monthly";
|
|
118
|
+
quarterly: "quarterly";
|
|
119
|
+
weekly: "weekly";
|
|
120
|
+
yearly: "yearly";
|
|
121
|
+
}>;
|
|
122
|
+
date: z.ZodOptional<z.ZodString>;
|
|
123
|
+
}, z.core.$strip>], "type">;
|
|
124
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
125
|
+
path: z.ZodString;
|
|
126
|
+
deleted: z.ZodBoolean;
|
|
127
|
+
previousSizeInBytes: z.ZodNumber;
|
|
128
|
+
currentSizeInBytes: z.ZodNumber;
|
|
129
|
+
}, z.core.$strip>, readonly [{
|
|
130
|
+
readonly reason: "path_forbidden";
|
|
131
|
+
readonly thrownBy: "service";
|
|
132
|
+
readonly code: JsonRpcErrorCode.Forbidden;
|
|
133
|
+
readonly when: "The target path is outside OBSIDIAN_WRITE_PATHS, or OBSIDIAN_READ_ONLY=true denies all writes.";
|
|
134
|
+
readonly recovery: "Use a path inside the configured write scope. The error data echoes the active scope.";
|
|
135
|
+
}, ...{
|
|
136
|
+
readonly reason: 'cancelled';
|
|
137
|
+
readonly code: JsonRpcErrorCode.InvalidRequest;
|
|
138
|
+
readonly when: 'User declined, cancelled, or answered false to the confirmation request.';
|
|
139
|
+
readonly severity: 'notice';
|
|
140
|
+
readonly recovery: 'Re-run the tool when the user is ready to confirm deletion.';
|
|
141
|
+
}[], {
|
|
45
142
|
readonly reason: "note_missing";
|
|
46
143
|
readonly thrownBy: "service";
|
|
47
144
|
readonly code: JsonRpcErrorCode.NotFound;
|
|
48
|
-
readonly when: "
|
|
49
|
-
readonly recovery: "Verify the path with obsidian_list_notes or use obsidian_search_notes to locate the note.";
|
|
145
|
+
readonly when: "No note has exactly this vault path, letter case included. Near matches in the same folder, such as a different-case spelling, are listed in `suggestions` and never deleted in its place.";
|
|
146
|
+
readonly recovery: "Verify the path with obsidian_list_notes or use obsidian_search_notes to locate the note. Deletes match the path exactly, letter case included; pass a path from `suggestions` as given.";
|
|
50
147
|
}, {
|
|
51
148
|
readonly reason: "no_active_file";
|
|
52
149
|
readonly thrownBy: "service";
|
|
@@ -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
|
|
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"}
|