@ankimcp/anki-mcp-server 0.10.0 → 0.11.0
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/dist/mcp/primitives/essential/index.d.ts +3 -1
- package/dist/mcp/primitives/essential/index.js +5 -1
- package/dist/mcp/primitives/essential/index.js.map +1 -1
- package/dist/mcp/primitives/essential/tools/tagActions/actions/addTags.action.d.ts +12 -0
- package/dist/mcp/primitives/essential/tools/tagActions/actions/addTags.action.js +25 -0
- package/dist/mcp/primitives/essential/tools/tagActions/actions/addTags.action.js.map +1 -0
- package/dist/mcp/primitives/essential/tools/tagActions/actions/clearUnusedTags.action.d.ts +7 -0
- package/dist/mcp/primitives/essential/tools/tagActions/actions/clearUnusedTags.action.js +11 -0
- package/dist/mcp/primitives/essential/tools/tagActions/actions/clearUnusedTags.action.js.map +1 -0
- package/dist/mcp/primitives/essential/tools/tagActions/actions/removeTags.action.d.ts +12 -0
- package/dist/mcp/primitives/essential/tools/tagActions/actions/removeTags.action.js +25 -0
- package/dist/mcp/primitives/essential/tools/tagActions/actions/removeTags.action.js.map +1 -0
- package/dist/mcp/primitives/essential/tools/tagActions/actions/replaceTags.action.d.ts +14 -0
- package/dist/mcp/primitives/essential/tools/tagActions/actions/replaceTags.action.js +33 -0
- package/dist/mcp/primitives/essential/tools/tagActions/actions/replaceTags.action.js.map +1 -0
- package/dist/mcp/primitives/essential/tools/tagActions/index.d.ts +5 -0
- package/dist/mcp/primitives/essential/tools/tagActions/index.js +6 -0
- package/dist/mcp/primitives/essential/tools/tagActions/index.js.map +1 -0
- package/dist/mcp/primitives/essential/tools/tagActions/tagActions.tool.d.ts +109 -0
- package/dist/mcp/primitives/essential/tools/tagActions/tagActions.tool.js +138 -0
- package/dist/mcp/primitives/essential/tools/tagActions/tagActions.tool.js.map +1 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -22,6 +22,7 @@ export { UpdateNoteFieldsTool } from "./tools/update-note-fields.tool";
|
|
|
22
22
|
export { DeleteNotesTool } from "./tools/delete-notes.tool";
|
|
23
23
|
export { MediaActionsTool } from "./tools/mediaActions";
|
|
24
24
|
export { GetTagsTool } from "./tools/get-tags.tool";
|
|
25
|
+
export { TagActionsTool } from "./tools/tagActions";
|
|
25
26
|
export { ReviewSessionPrompt } from "./prompts/review-session.prompt";
|
|
26
27
|
export { TwentyRulesPrompt } from "./prompts/twenty-rules.prompt";
|
|
27
28
|
export { SystemInfoResource } from "./resources/system-info.resource";
|
|
@@ -45,10 +46,11 @@ import { UpdateNoteFieldsTool } from "./tools/update-note-fields.tool";
|
|
|
45
46
|
import { DeleteNotesTool } from "./tools/delete-notes.tool";
|
|
46
47
|
import { MediaActionsTool } from "./tools/mediaActions";
|
|
47
48
|
import { GetTagsTool } from "./tools/get-tags.tool";
|
|
49
|
+
import { TagActionsTool } from "./tools/tagActions";
|
|
48
50
|
import { ReviewSessionPrompt } from "./prompts/review-session.prompt";
|
|
49
51
|
import { TwentyRulesPrompt } from "./prompts/twenty-rules.prompt";
|
|
50
52
|
import { SystemInfoResource } from "./resources/system-info.resource";
|
|
51
|
-
export declare const ESSENTIAL_MCP_TOOLS: (typeof SyncTool | typeof ListDecksTool | typeof CreateDeckTool | typeof GetDueCardsTool | typeof GetCardsTool | typeof PresentCardTool | typeof RateCardTool | typeof ModelNamesTool | typeof ModelFieldNamesTool | typeof ModelStylingTool | typeof CreateModelTool | typeof UpdateModelStylingTool | typeof AddNoteTool | typeof FindNotesTool | typeof NotesInfoTool | typeof UpdateNoteFieldsTool | typeof DeleteNotesTool | typeof MediaActionsTool | typeof GetTagsTool | typeof ReviewSessionPrompt | typeof TwentyRulesPrompt | typeof SystemInfoResource)[];
|
|
53
|
+
export declare const ESSENTIAL_MCP_TOOLS: (typeof SyncTool | typeof ListDecksTool | typeof CreateDeckTool | typeof GetDueCardsTool | typeof GetCardsTool | typeof PresentCardTool | typeof RateCardTool | typeof ModelNamesTool | typeof ModelFieldNamesTool | typeof ModelStylingTool | typeof CreateModelTool | typeof UpdateModelStylingTool | typeof AddNoteTool | typeof FindNotesTool | typeof NotesInfoTool | typeof UpdateNoteFieldsTool | typeof DeleteNotesTool | typeof MediaActionsTool | typeof GetTagsTool | typeof TagActionsTool | typeof ReviewSessionPrompt | typeof TwentyRulesPrompt | typeof SystemInfoResource)[];
|
|
52
54
|
export interface McpPrimitivesAnkiEssentialModuleOptions {
|
|
53
55
|
ankiConfigProvider: Provider;
|
|
54
56
|
}
|
|
@@ -21,7 +21,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
21
21
|
};
|
|
22
22
|
var McpPrimitivesAnkiEssentialModule_1;
|
|
23
23
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
|
-
exports.McpPrimitivesAnkiEssentialModule = exports.ESSENTIAL_MCP_TOOLS = exports.SystemInfoResource = exports.TwentyRulesPrompt = exports.ReviewSessionPrompt = exports.GetTagsTool = exports.MediaActionsTool = exports.DeleteNotesTool = exports.UpdateNoteFieldsTool = exports.NotesInfoTool = exports.FindNotesTool = exports.AddNoteTool = exports.UpdateModelStylingTool = exports.CreateModelTool = exports.ModelStylingTool = exports.ModelFieldNamesTool = exports.ModelNamesTool = exports.RateCardTool = exports.PresentCardTool = exports.GetCardsTool = exports.GetDueCardsTool = exports.CreateDeckTool = exports.ListDecksTool = exports.SyncTool = exports.AnkiConnectError = exports.AnkiConnectClient = exports.ANKI_CONFIG = void 0;
|
|
24
|
+
exports.McpPrimitivesAnkiEssentialModule = exports.ESSENTIAL_MCP_TOOLS = exports.SystemInfoResource = exports.TwentyRulesPrompt = exports.ReviewSessionPrompt = exports.TagActionsTool = exports.GetTagsTool = exports.MediaActionsTool = exports.DeleteNotesTool = exports.UpdateNoteFieldsTool = exports.NotesInfoTool = exports.FindNotesTool = exports.AddNoteTool = exports.UpdateModelStylingTool = exports.CreateModelTool = exports.ModelStylingTool = exports.ModelFieldNamesTool = exports.ModelNamesTool = exports.RateCardTool = exports.PresentCardTool = exports.GetCardsTool = exports.GetDueCardsTool = exports.CreateDeckTool = exports.ListDecksTool = exports.SyncTool = exports.AnkiConnectError = exports.AnkiConnectClient = exports.ANKI_CONFIG = void 0;
|
|
25
25
|
var anki_config_interface_1 = require("../../config/anki-config.interface");
|
|
26
26
|
Object.defineProperty(exports, "ANKI_CONFIG", { enumerable: true, get: function () { return anki_config_interface_1.ANKI_CONFIG; } });
|
|
27
27
|
__exportStar(require("../../types/anki.types"), exports);
|
|
@@ -67,6 +67,8 @@ var mediaActions_1 = require("./tools/mediaActions");
|
|
|
67
67
|
Object.defineProperty(exports, "MediaActionsTool", { enumerable: true, get: function () { return mediaActions_1.MediaActionsTool; } });
|
|
68
68
|
var get_tags_tool_1 = require("./tools/get-tags.tool");
|
|
69
69
|
Object.defineProperty(exports, "GetTagsTool", { enumerable: true, get: function () { return get_tags_tool_1.GetTagsTool; } });
|
|
70
|
+
var tagActions_1 = require("./tools/tagActions");
|
|
71
|
+
Object.defineProperty(exports, "TagActionsTool", { enumerable: true, get: function () { return tagActions_1.TagActionsTool; } });
|
|
70
72
|
var review_session_prompt_1 = require("./prompts/review-session.prompt");
|
|
71
73
|
Object.defineProperty(exports, "ReviewSessionPrompt", { enumerable: true, get: function () { return review_session_prompt_1.ReviewSessionPrompt; } });
|
|
72
74
|
var twenty_rules_prompt_1 = require("./prompts/twenty-rules.prompt");
|
|
@@ -94,6 +96,7 @@ const update_note_fields_tool_2 = require("./tools/update-note-fields.tool");
|
|
|
94
96
|
const delete_notes_tool_2 = require("./tools/delete-notes.tool");
|
|
95
97
|
const mediaActions_2 = require("./tools/mediaActions");
|
|
96
98
|
const get_tags_tool_2 = require("./tools/get-tags.tool");
|
|
99
|
+
const tagActions_2 = require("./tools/tagActions");
|
|
97
100
|
const review_session_prompt_2 = require("./prompts/review-session.prompt");
|
|
98
101
|
const twenty_rules_prompt_2 = require("./prompts/twenty-rules.prompt");
|
|
99
102
|
const system_info_resource_2 = require("./resources/system-info.resource");
|
|
@@ -117,6 +120,7 @@ exports.ESSENTIAL_MCP_TOOLS = [
|
|
|
117
120
|
delete_notes_tool_2.DeleteNotesTool,
|
|
118
121
|
mediaActions_2.MediaActionsTool,
|
|
119
122
|
get_tags_tool_2.GetTagsTool,
|
|
123
|
+
tagActions_2.TagActionsTool,
|
|
120
124
|
review_session_prompt_2.ReviewSessionPrompt,
|
|
121
125
|
twenty_rules_prompt_2.TwentyRulesPrompt,
|
|
122
126
|
system_info_resource_2.SystemInfoResource,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/mcp/primitives/essential/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AACA,4EAAiE;AAAxD,oHAAA,WAAW,OAAA;AAIpB,yDAAuC;AAGvC,yDAAuC;AAGvC,yEAG2C;AAFzC,wHAAA,iBAAiB,OAAA;AACjB,uHAAA,gBAAgB,OAAA;AAIlB,+CAA6C;AAApC,qGAAA,QAAQ,OAAA;AACjB,2DAAwD;AAA/C,gHAAA,aAAa,OAAA;AACtB,6DAA0D;AAAjD,kHAAA,cAAc,OAAA;AACvB,iEAA6D;AAApD,qHAAA,eAAe,OAAA;AACxB,yDAAsD;AAA7C,8GAAA,YAAY,OAAA;AACrB,+DAA4D;AAAnD,oHAAA,eAAe,OAAA;AACxB,yDAAsD;AAA7C,8GAAA,YAAY,OAAA;AACrB,6DAA0D;AAAjD,kHAAA,cAAc,OAAA;AACvB,yEAAqE;AAA5D,6HAAA,mBAAmB,OAAA;AAC5B,iEAA8D;AAArD,sHAAA,gBAAgB,OAAA;AACzB,+DAA4D;AAAnD,oHAAA,eAAe,OAAA;AACxB,+EAA2E;AAAlE,mIAAA,sBAAsB,OAAA;AAC/B,uDAAoD;AAA3C,4GAAA,WAAW,OAAA;AACpB,2DAAwD;AAA/C,gHAAA,aAAa,OAAA;AACtB,2DAAwD;AAA/C,gHAAA,aAAa,OAAA;AACtB,2E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,IAAA,eAAM,EAAC,EAAE,CAAC;GACE,gCAAgC,CAU5C"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { AnkiConnectClient } from "@/mcp/clients/anki-connect.client";
|
|
2
|
+
export interface AddTagsParams {
|
|
3
|
+
notes: number[];
|
|
4
|
+
tags: string;
|
|
5
|
+
}
|
|
6
|
+
export interface AddTagsResult {
|
|
7
|
+
success: boolean;
|
|
8
|
+
message: string;
|
|
9
|
+
notesAffected: number;
|
|
10
|
+
tagsAdded: string[];
|
|
11
|
+
}
|
|
12
|
+
export declare function addTags(params: AddTagsParams, client: AnkiConnectClient): Promise<AddTagsResult>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.addTags = addTags;
|
|
4
|
+
async function addTags(params, client) {
|
|
5
|
+
const { notes, tags } = params;
|
|
6
|
+
if (!notes || notes.length === 0) {
|
|
7
|
+
throw new Error("notes array cannot be empty");
|
|
8
|
+
}
|
|
9
|
+
if (!tags || tags.trim() === "") {
|
|
10
|
+
throw new Error("tags string cannot be empty");
|
|
11
|
+
}
|
|
12
|
+
const trimmedTags = tags.trim();
|
|
13
|
+
const tagList = trimmedTags.split(/\s+/).filter(Boolean);
|
|
14
|
+
await client.invoke("addTags", {
|
|
15
|
+
notes,
|
|
16
|
+
tags: trimmedTags,
|
|
17
|
+
});
|
|
18
|
+
return {
|
|
19
|
+
success: true,
|
|
20
|
+
message: `Successfully added ${tagList.length} tag(s) to ${notes.length} note(s)`,
|
|
21
|
+
notesAffected: notes.length,
|
|
22
|
+
tagsAdded: tagList,
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=addTags.action.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"addTags.action.js","sourceRoot":"","sources":["../../../../../../../src/mcp/primitives/essential/tools/tagActions/actions/addTags.action.ts"],"names":[],"mappings":";;AA4BA,0BA+BC;AA/BM,KAAK,UAAU,OAAO,CAC3B,MAAqB,EACrB,MAAyB;IAEzB,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,MAAM,CAAC;IAG/B,IAAI,CAAC,KAAK,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACjC,MAAM,IAAI,KAAK,CAAC,6BAA6B,CAAC,CAAC;IACjD,CAAC;IAGD,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;QAChC,MAAM,IAAI,KAAK,CAAC,6BAA6B,CAAC,CAAC;IACjD,CAAC;IAED,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC;IAChC,MAAM,OAAO,GAAG,WAAW,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAGzD,MAAM,MAAM,CAAC,MAAM,CAAO,SAAS,EAAE;QACnC,KAAK;QACL,IAAI,EAAE,WAAW;KAClB,CAAC,CAAC;IAEH,OAAO;QACL,OAAO,EAAE,IAAI;QACb,OAAO,EAAE,sBAAsB,OAAO,CAAC,MAAM,cAAc,KAAK,CAAC,MAAM,UAAU;QACjF,aAAa,EAAE,KAAK,CAAC,MAAM;QAC3B,SAAS,EAAE,OAAO;KACnB,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { AnkiConnectClient } from "@/mcp/clients/anki-connect.client";
|
|
2
|
+
export type ClearUnusedTagsParams = Record<string, never>;
|
|
3
|
+
export interface ClearUnusedTagsResult {
|
|
4
|
+
success: boolean;
|
|
5
|
+
message: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function clearUnusedTags(_params: ClearUnusedTagsParams, client: AnkiConnectClient): Promise<ClearUnusedTagsResult>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.clearUnusedTags = clearUnusedTags;
|
|
4
|
+
async function clearUnusedTags(_params, client) {
|
|
5
|
+
await client.invoke("clearUnusedTags");
|
|
6
|
+
return {
|
|
7
|
+
success: true,
|
|
8
|
+
message: "Successfully cleared unused tags from the collection",
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=clearUnusedTags.action.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clearUnusedTags.action.js","sourceRoot":"","sources":["../../../../../../../src/mcp/primitives/essential/tools/tagActions/actions/clearUnusedTags.action.ts"],"names":[],"mappings":";;AAwBA,0CAWC;AAXM,KAAK,UAAU,eAAe,CACnC,OAA8B,EAC9B,MAAyB;IAGzB,MAAM,MAAM,CAAC,MAAM,CAAO,iBAAiB,CAAC,CAAC;IAE7C,OAAO;QACL,OAAO,EAAE,IAAI;QACb,OAAO,EAAE,sDAAsD;KAChE,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { AnkiConnectClient } from "@/mcp/clients/anki-connect.client";
|
|
2
|
+
export interface RemoveTagsParams {
|
|
3
|
+
notes: number[];
|
|
4
|
+
tags: string;
|
|
5
|
+
}
|
|
6
|
+
export interface RemoveTagsResult {
|
|
7
|
+
success: boolean;
|
|
8
|
+
message: string;
|
|
9
|
+
notesAffected: number;
|
|
10
|
+
tagsRemoved: string[];
|
|
11
|
+
}
|
|
12
|
+
export declare function removeTags(params: RemoveTagsParams, client: AnkiConnectClient): Promise<RemoveTagsResult>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.removeTags = removeTags;
|
|
4
|
+
async function removeTags(params, client) {
|
|
5
|
+
const { notes, tags } = params;
|
|
6
|
+
if (!notes || notes.length === 0) {
|
|
7
|
+
throw new Error("notes array cannot be empty");
|
|
8
|
+
}
|
|
9
|
+
if (!tags || tags.trim() === "") {
|
|
10
|
+
throw new Error("tags string cannot be empty");
|
|
11
|
+
}
|
|
12
|
+
const trimmedTags = tags.trim();
|
|
13
|
+
const tagList = trimmedTags.split(/\s+/).filter(Boolean);
|
|
14
|
+
await client.invoke("removeTags", {
|
|
15
|
+
notes,
|
|
16
|
+
tags: trimmedTags,
|
|
17
|
+
});
|
|
18
|
+
return {
|
|
19
|
+
success: true,
|
|
20
|
+
message: `Successfully removed ${tagList.length} tag(s) from ${notes.length} note(s)`,
|
|
21
|
+
notesAffected: notes.length,
|
|
22
|
+
tagsRemoved: tagList,
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=removeTags.action.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"removeTags.action.js","sourceRoot":"","sources":["../../../../../../../src/mcp/primitives/essential/tools/tagActions/actions/removeTags.action.ts"],"names":[],"mappings":";;AA4BA,gCA+BC;AA/BM,KAAK,UAAU,UAAU,CAC9B,MAAwB,EACxB,MAAyB;IAEzB,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,MAAM,CAAC;IAG/B,IAAI,CAAC,KAAK,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACjC,MAAM,IAAI,KAAK,CAAC,6BAA6B,CAAC,CAAC;IACjD,CAAC;IAGD,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;QAChC,MAAM,IAAI,KAAK,CAAC,6BAA6B,CAAC,CAAC;IACjD,CAAC;IAED,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC;IAChC,MAAM,OAAO,GAAG,WAAW,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAGzD,MAAM,MAAM,CAAC,MAAM,CAAO,YAAY,EAAE;QACtC,KAAK;QACL,IAAI,EAAE,WAAW;KAClB,CAAC,CAAC;IAEH,OAAO;QACL,OAAO,EAAE,IAAI;QACb,OAAO,EAAE,wBAAwB,OAAO,CAAC,MAAM,gBAAgB,KAAK,CAAC,MAAM,UAAU;QACrF,aAAa,EAAE,KAAK,CAAC,MAAM;QAC3B,WAAW,EAAE,OAAO;KACrB,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { AnkiConnectClient } from "@/mcp/clients/anki-connect.client";
|
|
2
|
+
export interface ReplaceTagsParams {
|
|
3
|
+
notes: number[];
|
|
4
|
+
tagToReplace: string;
|
|
5
|
+
replaceWithTag: string;
|
|
6
|
+
}
|
|
7
|
+
export interface ReplaceTagsResult {
|
|
8
|
+
success: boolean;
|
|
9
|
+
message: string;
|
|
10
|
+
notesAffected: number;
|
|
11
|
+
tagToReplace: string;
|
|
12
|
+
replaceWithTag: string;
|
|
13
|
+
}
|
|
14
|
+
export declare function replaceTags(params: ReplaceTagsParams, client: AnkiConnectClient): Promise<ReplaceTagsResult>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.replaceTags = replaceTags;
|
|
4
|
+
async function replaceTags(params, client) {
|
|
5
|
+
const { notes, tagToReplace, replaceWithTag } = params;
|
|
6
|
+
if (!notes || notes.length === 0) {
|
|
7
|
+
throw new Error("notes array cannot be empty");
|
|
8
|
+
}
|
|
9
|
+
if (!tagToReplace || tagToReplace.trim() === "") {
|
|
10
|
+
throw new Error("tagToReplace cannot be empty");
|
|
11
|
+
}
|
|
12
|
+
if (!replaceWithTag || replaceWithTag.trim() === "") {
|
|
13
|
+
throw new Error("replaceWithTag cannot be empty");
|
|
14
|
+
}
|
|
15
|
+
const trimmedOld = tagToReplace.trim();
|
|
16
|
+
const trimmedNew = replaceWithTag.trim();
|
|
17
|
+
if (trimmedOld.includes(" ") || trimmedNew.includes(" ")) {
|
|
18
|
+
throw new Error("Tags cannot contain spaces. Use single tags only.");
|
|
19
|
+
}
|
|
20
|
+
await client.invoke("replaceTags", {
|
|
21
|
+
notes,
|
|
22
|
+
tag_to_replace: trimmedOld,
|
|
23
|
+
replace_with_tag: trimmedNew,
|
|
24
|
+
});
|
|
25
|
+
return {
|
|
26
|
+
success: true,
|
|
27
|
+
message: `Successfully replaced "${trimmedOld}" with "${trimmedNew}" in ${notes.length} note(s)`,
|
|
28
|
+
notesAffected: notes.length,
|
|
29
|
+
tagToReplace: trimmedOld,
|
|
30
|
+
replaceWithTag: trimmedNew,
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=replaceTags.action.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"replaceTags.action.js","sourceRoot":"","sources":["../../../../../../../src/mcp/primitives/essential/tools/tagActions/actions/replaceTags.action.ts"],"names":[],"mappings":";;AAkCA,kCA2CC;AA3CM,KAAK,UAAU,WAAW,CAC/B,MAAyB,EACzB,MAAyB;IAEzB,MAAM,EAAE,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,GAAG,MAAM,CAAC;IAGvD,IAAI,CAAC,KAAK,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACjC,MAAM,IAAI,KAAK,CAAC,6BAA6B,CAAC,CAAC;IACjD,CAAC;IAGD,IAAI,CAAC,YAAY,IAAI,YAAY,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;QAChD,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;IAClD,CAAC;IAGD,IAAI,CAAC,cAAc,IAAI,cAAc,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;QACpD,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAC;IACpD,CAAC;IAED,MAAM,UAAU,GAAG,YAAY,CAAC,IAAI,EAAE,CAAC;IACvC,MAAM,UAAU,GAAG,cAAc,CAAC,IAAI,EAAE,CAAC;IAGzC,IAAI,UAAU,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,UAAU,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;QACzD,MAAM,IAAI,KAAK,CAAC,mDAAmD,CAAC,CAAC;IACvE,CAAC;IAGD,MAAM,MAAM,CAAC,MAAM,CAAO,aAAa,EAAE;QACvC,KAAK;QACL,cAAc,EAAE,UAAU;QAC1B,gBAAgB,EAAE,UAAU;KAC7B,CAAC,CAAC;IAEH,OAAO;QACL,OAAO,EAAE,IAAI;QACb,OAAO,EAAE,0BAA0B,UAAU,WAAW,UAAU,QAAQ,KAAK,CAAC,MAAM,UAAU;QAChG,aAAa,EAAE,KAAK,CAAC,MAAM;QAC3B,YAAY,EAAE,UAAU;QACxB,cAAc,EAAE,UAAU;KAC3B,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { TagActionsTool } from "./tagActions.tool";
|
|
2
|
+
export type { AddTagsParams, AddTagsResult } from "./actions/addTags.action";
|
|
3
|
+
export type { RemoveTagsParams, RemoveTagsResult, } from "./actions/removeTags.action";
|
|
4
|
+
export type { ReplaceTagsParams, ReplaceTagsResult, } from "./actions/replaceTags.action";
|
|
5
|
+
export type { ClearUnusedTagsParams, ClearUnusedTagsResult, } from "./actions/clearUnusedTags.action";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TagActionsTool = void 0;
|
|
4
|
+
var tagActions_tool_1 = require("./tagActions.tool");
|
|
5
|
+
Object.defineProperty(exports, "TagActionsTool", { enumerable: true, get: function () { return tagActions_tool_1.TagActionsTool; } });
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/mcp/primitives/essential/tools/tagActions/index.ts"],"names":[],"mappings":";;;AAIA,qDAAmD;AAA1C,iHAAA,cAAc,OAAA"}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import type { Context } from "@rekog/mcp-nest";
|
|
2
|
+
import { AnkiConnectClient } from "@/mcp/clients/anki-connect.client";
|
|
3
|
+
export declare class TagActionsTool {
|
|
4
|
+
private readonly ankiClient;
|
|
5
|
+
private readonly logger;
|
|
6
|
+
constructor(ankiClient: AnkiConnectClient);
|
|
7
|
+
execute(params: {
|
|
8
|
+
action: "addTags" | "removeTags" | "replaceTags" | "clearUnusedTags";
|
|
9
|
+
notes?: number[];
|
|
10
|
+
tags?: string;
|
|
11
|
+
tagToReplace?: string;
|
|
12
|
+
replaceWithTag?: string;
|
|
13
|
+
}, context: Context): Promise<{
|
|
14
|
+
[x: string]: unknown;
|
|
15
|
+
content: ({
|
|
16
|
+
type: "text";
|
|
17
|
+
text: string;
|
|
18
|
+
annotations?: {
|
|
19
|
+
audience?: ("user" | "assistant")[] | undefined;
|
|
20
|
+
priority?: number | undefined;
|
|
21
|
+
lastModified?: string | undefined;
|
|
22
|
+
} | undefined;
|
|
23
|
+
_meta?: {
|
|
24
|
+
[x: string]: unknown;
|
|
25
|
+
} | undefined;
|
|
26
|
+
} | {
|
|
27
|
+
type: "image";
|
|
28
|
+
data: string;
|
|
29
|
+
mimeType: string;
|
|
30
|
+
annotations?: {
|
|
31
|
+
audience?: ("user" | "assistant")[] | undefined;
|
|
32
|
+
priority?: number | undefined;
|
|
33
|
+
lastModified?: string | undefined;
|
|
34
|
+
} | undefined;
|
|
35
|
+
_meta?: {
|
|
36
|
+
[x: string]: unknown;
|
|
37
|
+
} | undefined;
|
|
38
|
+
} | {
|
|
39
|
+
type: "audio";
|
|
40
|
+
data: string;
|
|
41
|
+
mimeType: string;
|
|
42
|
+
annotations?: {
|
|
43
|
+
audience?: ("user" | "assistant")[] | undefined;
|
|
44
|
+
priority?: number | undefined;
|
|
45
|
+
lastModified?: string | undefined;
|
|
46
|
+
} | undefined;
|
|
47
|
+
_meta?: {
|
|
48
|
+
[x: string]: unknown;
|
|
49
|
+
} | undefined;
|
|
50
|
+
} | {
|
|
51
|
+
uri: string;
|
|
52
|
+
name: string;
|
|
53
|
+
type: "resource_link";
|
|
54
|
+
description?: string | undefined;
|
|
55
|
+
mimeType?: string | undefined;
|
|
56
|
+
annotations?: {
|
|
57
|
+
audience?: ("user" | "assistant")[] | undefined;
|
|
58
|
+
priority?: number | undefined;
|
|
59
|
+
lastModified?: string | undefined;
|
|
60
|
+
} | undefined;
|
|
61
|
+
_meta?: {
|
|
62
|
+
[x: string]: unknown;
|
|
63
|
+
} | undefined;
|
|
64
|
+
icons?: {
|
|
65
|
+
src: string;
|
|
66
|
+
mimeType?: string | undefined;
|
|
67
|
+
sizes?: string[] | undefined;
|
|
68
|
+
theme?: "light" | "dark" | undefined;
|
|
69
|
+
}[] | undefined;
|
|
70
|
+
title?: string | undefined;
|
|
71
|
+
} | {
|
|
72
|
+
type: "resource";
|
|
73
|
+
resource: {
|
|
74
|
+
uri: string;
|
|
75
|
+
text: string;
|
|
76
|
+
mimeType?: string | undefined;
|
|
77
|
+
_meta?: {
|
|
78
|
+
[x: string]: unknown;
|
|
79
|
+
} | undefined;
|
|
80
|
+
} | {
|
|
81
|
+
uri: string;
|
|
82
|
+
blob: string;
|
|
83
|
+
mimeType?: string | undefined;
|
|
84
|
+
_meta?: {
|
|
85
|
+
[x: string]: unknown;
|
|
86
|
+
} | undefined;
|
|
87
|
+
};
|
|
88
|
+
annotations?: {
|
|
89
|
+
audience?: ("user" | "assistant")[] | undefined;
|
|
90
|
+
priority?: number | undefined;
|
|
91
|
+
lastModified?: string | undefined;
|
|
92
|
+
} | undefined;
|
|
93
|
+
_meta?: {
|
|
94
|
+
[x: string]: unknown;
|
|
95
|
+
} | undefined;
|
|
96
|
+
})[];
|
|
97
|
+
_meta?: {
|
|
98
|
+
[x: string]: unknown;
|
|
99
|
+
progressToken?: string | number | undefined;
|
|
100
|
+
"io.modelcontextprotocol/related-task"?: {
|
|
101
|
+
taskId: string;
|
|
102
|
+
} | undefined;
|
|
103
|
+
} | undefined;
|
|
104
|
+
structuredContent?: {
|
|
105
|
+
[x: string]: unknown;
|
|
106
|
+
} | undefined;
|
|
107
|
+
isError?: boolean | undefined;
|
|
108
|
+
}>;
|
|
109
|
+
}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var TagActionsTool_1;
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
exports.TagActionsTool = void 0;
|
|
14
|
+
const common_1 = require("@nestjs/common");
|
|
15
|
+
const mcp_nest_1 = require("@rekog/mcp-nest");
|
|
16
|
+
const zod_1 = require("zod");
|
|
17
|
+
const anki_connect_client_1 = require("../../../../clients/anki-connect.client");
|
|
18
|
+
const anki_utils_1 = require("../../../../utils/anki.utils");
|
|
19
|
+
const addTags_action_1 = require("./actions/addTags.action");
|
|
20
|
+
const removeTags_action_1 = require("./actions/removeTags.action");
|
|
21
|
+
const replaceTags_action_1 = require("./actions/replaceTags.action");
|
|
22
|
+
const clearUnusedTags_action_1 = require("./actions/clearUnusedTags.action");
|
|
23
|
+
let TagActionsTool = TagActionsTool_1 = class TagActionsTool {
|
|
24
|
+
ankiClient;
|
|
25
|
+
logger = new common_1.Logger(TagActionsTool_1.name);
|
|
26
|
+
constructor(ankiClient) {
|
|
27
|
+
this.ankiClient = ankiClient;
|
|
28
|
+
}
|
|
29
|
+
async execute(params, context) {
|
|
30
|
+
try {
|
|
31
|
+
this.logger.log(`Executing tag action: ${params.action}`);
|
|
32
|
+
let result;
|
|
33
|
+
switch (params.action) {
|
|
34
|
+
case "addTags":
|
|
35
|
+
if (!params.notes || params.notes.length === 0) {
|
|
36
|
+
throw new Error("notes array is required for addTags action");
|
|
37
|
+
}
|
|
38
|
+
if (!params.tags) {
|
|
39
|
+
throw new Error("tags string is required for addTags action");
|
|
40
|
+
}
|
|
41
|
+
await context.reportProgress({ progress: 25, total: 100 });
|
|
42
|
+
result = await (0, addTags_action_1.addTags)({ notes: params.notes, tags: params.tags }, this.ankiClient);
|
|
43
|
+
await context.reportProgress({ progress: 100, total: 100 });
|
|
44
|
+
break;
|
|
45
|
+
case "removeTags":
|
|
46
|
+
if (!params.notes || params.notes.length === 0) {
|
|
47
|
+
throw new Error("notes array is required for removeTags action");
|
|
48
|
+
}
|
|
49
|
+
if (!params.tags) {
|
|
50
|
+
throw new Error("tags string is required for removeTags action");
|
|
51
|
+
}
|
|
52
|
+
await context.reportProgress({ progress: 25, total: 100 });
|
|
53
|
+
result = await (0, removeTags_action_1.removeTags)({ notes: params.notes, tags: params.tags }, this.ankiClient);
|
|
54
|
+
await context.reportProgress({ progress: 100, total: 100 });
|
|
55
|
+
break;
|
|
56
|
+
case "replaceTags":
|
|
57
|
+
if (!params.notes || params.notes.length === 0) {
|
|
58
|
+
throw new Error("notes array is required for replaceTags action");
|
|
59
|
+
}
|
|
60
|
+
if (!params.tagToReplace) {
|
|
61
|
+
throw new Error("tagToReplace is required for replaceTags action");
|
|
62
|
+
}
|
|
63
|
+
if (!params.replaceWithTag) {
|
|
64
|
+
throw new Error("replaceWithTag is required for replaceTags action");
|
|
65
|
+
}
|
|
66
|
+
await context.reportProgress({ progress: 25, total: 100 });
|
|
67
|
+
result = await (0, replaceTags_action_1.replaceTags)({
|
|
68
|
+
notes: params.notes,
|
|
69
|
+
tagToReplace: params.tagToReplace,
|
|
70
|
+
replaceWithTag: params.replaceWithTag,
|
|
71
|
+
}, this.ankiClient);
|
|
72
|
+
await context.reportProgress({ progress: 100, total: 100 });
|
|
73
|
+
break;
|
|
74
|
+
case "clearUnusedTags":
|
|
75
|
+
await context.reportProgress({ progress: 50, total: 100 });
|
|
76
|
+
result = await (0, clearUnusedTags_action_1.clearUnusedTags)({}, this.ankiClient);
|
|
77
|
+
await context.reportProgress({ progress: 100, total: 100 });
|
|
78
|
+
break;
|
|
79
|
+
default: {
|
|
80
|
+
const _exhaustive = params.action;
|
|
81
|
+
throw new Error(`Unknown action: ${_exhaustive}`);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
this.logger.log(`Successfully executed ${params.action}`);
|
|
85
|
+
return (0, anki_utils_1.createSuccessResponse)(result);
|
|
86
|
+
}
|
|
87
|
+
catch (error) {
|
|
88
|
+
this.logger.error(`Failed to execute ${params.action}`, error);
|
|
89
|
+
return (0, anki_utils_1.createErrorResponse)(error, {
|
|
90
|
+
action: params.action,
|
|
91
|
+
hint: "Make sure Anki is running and the note IDs are valid",
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
exports.TagActionsTool = TagActionsTool;
|
|
97
|
+
__decorate([
|
|
98
|
+
(0, mcp_nest_1.Tool)({
|
|
99
|
+
name: "tagActions",
|
|
100
|
+
description: `Manage tags on Anki notes. Supports four actions:
|
|
101
|
+
- addTags: Add tags to specified notes (notes: number[], tags: string)
|
|
102
|
+
- removeTags: Remove tags from specified notes (notes: number[], tags: string)
|
|
103
|
+
- replaceTags: Rename a tag across specified notes (notes: number[], tagToReplace: string, replaceWithTag: string)
|
|
104
|
+
- clearUnusedTags: Remove orphaned tags not used by any notes (no params)
|
|
105
|
+
|
|
106
|
+
For discovering existing tags, use the separate getTags tool.
|
|
107
|
+
Tags in addTags/removeTags are space-separated strings (e.g., "tag1 tag2 tag3").`,
|
|
108
|
+
parameters: zod_1.z.object({
|
|
109
|
+
action: zod_1.z
|
|
110
|
+
.enum(["addTags", "removeTags", "replaceTags", "clearUnusedTags"])
|
|
111
|
+
.describe("The tag action to perform"),
|
|
112
|
+
notes: zod_1.z
|
|
113
|
+
.array(zod_1.z.number())
|
|
114
|
+
.optional()
|
|
115
|
+
.describe("[addTags, removeTags, replaceTags] Array of note IDs to modify"),
|
|
116
|
+
tags: zod_1.z
|
|
117
|
+
.string()
|
|
118
|
+
.optional()
|
|
119
|
+
.describe('[addTags, removeTags] Space-separated tags (e.g., "tag1 tag2")'),
|
|
120
|
+
tagToReplace: zod_1.z
|
|
121
|
+
.string()
|
|
122
|
+
.optional()
|
|
123
|
+
.describe("[replaceTags] The tag to search for and replace"),
|
|
124
|
+
replaceWithTag: zod_1.z
|
|
125
|
+
.string()
|
|
126
|
+
.optional()
|
|
127
|
+
.describe("[replaceTags] The tag to replace with"),
|
|
128
|
+
}),
|
|
129
|
+
}),
|
|
130
|
+
__metadata("design:type", Function),
|
|
131
|
+
__metadata("design:paramtypes", [Object, Object]),
|
|
132
|
+
__metadata("design:returntype", Promise)
|
|
133
|
+
], TagActionsTool.prototype, "execute", null);
|
|
134
|
+
exports.TagActionsTool = TagActionsTool = TagActionsTool_1 = __decorate([
|
|
135
|
+
(0, common_1.Injectable)(),
|
|
136
|
+
__metadata("design:paramtypes", [anki_connect_client_1.AnkiConnectClient])
|
|
137
|
+
], TagActionsTool);
|
|
138
|
+
//# sourceMappingURL=tagActions.tool.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tagActions.tool.js","sourceRoot":"","sources":["../../../../../../src/mcp/primitives/essential/tools/tagActions/tagActions.tool.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAoD;AACpD,8CAAuC;AAEvC,6BAAwB;AACxB,iFA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