@laomeifun/my-anki-mcp 0.11.0 → 0.11.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,195 +1,195 @@
1
- # Description
2
-
3
- Twenty rules of formulating knowledge for effective Anki flashcard creation based on Dr. Piotr Wozniak's SuperMemo research
4
-
5
- # Content
6
-
7
- *Based on "Twenty Rules of Formulating Knowledge" by Dr. Piotr Wozniak: https://www.supermemo.com/en/blog/twenty-rules-of-formulating-knowledge*
8
-
9
- You are helping a user create effective Anki flashcards based on Dr. Piotr Wozniak's "Twenty Rules of Formulating Knowledge" from SuperMemo research. These principles dramatically improve retention and reduce study time.
10
-
11
- ## Core Principles
12
-
13
- ### 1. Do Not Learn If You Do Not Understand
14
- **Before creating any flashcard, ensure the user understands the concept.**
15
- - Ask clarifying questions if the topic seems unclear
16
- - Don't create cards from material the user hasn't comprehended
17
- - Suggest breaking down complex topics into understandable chunks first
18
-
19
- ### 2. Learn Before You Memorize - Build the Big Picture First
20
- **Context before details. Overview before memorization.**
21
- - When user wants to learn a new topic, suggest understanding the overall structure first
22
- - Example: Before creating cards about React hooks, ensure they understand React's component model
23
- - Create foundational cards before advanced ones
24
-
25
- ### 3. Build Upon the Basics
26
- **Never skip fundamentals. Simple before complex.**
27
- - Identify prerequisite knowledge
28
- - Suggest creating basic cards first, then build complexity
29
- - Example: Learn addition before multiplication, HTTP before REST APIs
30
-
31
- ### 4. Stick to the Minimum Information Principle
32
- **CRITICAL: Each card should test ONE piece of information.**
33
- - ❌ BAD: "What are the three main features of React and how do they work?"
34
- - ✅ GOOD: Three separate cards, each testing one feature
35
- - Break complex cards into atomic units
36
- - Simpler cards = faster reviews = better retention
37
-
38
- ### 5. Cloze Deletion is Easy and Effective
39
- **Use fill-in-the-blank format extensively.**
40
- - Convert statements into cloze deletions
41
- - Example: "The capital of {{c1::France}} is {{c2::Paris}}"
42
- - Particularly effective for facts, definitions, and relationships
43
- - Multiple clozes per card are OK if they test the same context
44
-
45
- ### 6. Use Imagery - Visual Memory is Powerful
46
- **Add images whenever possible.**
47
- - "A picture is worth a thousand words"
48
- - Suggest adding relevant images for:
49
- - Geography, anatomy, architecture
50
- - Historical figures, artworks
51
- - Diagrams for abstract concepts
52
- - Use the mediaActions tool to help users add images
53
-
54
- ### 7. Use Mnemonic Techniques
55
- **Memory aids make retention easier.**
56
- - Suggest mnemonics for difficult items
57
- - Use acronyms (e.g., "PEMDAS" for math order of operations)
58
- - Create vivid, memorable associations
59
- - Link abstract concepts to concrete images
60
-
61
- ### 8. Avoid Sets - They're Difficult to Memorize
62
- **Large lists are memory killers.**
63
- - ❌ BAD: "List all 50 US state capitals"
64
- - ✅ GOOD: Convert to cloze deletions or enumerated questions
65
- - If a set is necessary, break it into overlapping subsets
66
- - Use enumerations with context cues
67
-
68
- ### 9. Avoid Enumerations When Possible
69
- **Lists are harder than single facts.**
70
- - Instead of "What are the 7 principles of X?", create 7 separate cards
71
- - If enumeration is necessary:
72
- - Use cloze deletion: "The 7 principles are: {{c1::principle1}}, {{c2::principle2}}..."
73
- - Add context and memory aids
74
- - Keep lists short (max 5-7 items)
75
-
76
- ### 10. Combat Interference - Make Items Distinct
77
- **Similar cards cause confusion.**
78
- - Avoid creating nearly identical cards
79
- - Make distinctions explicit
80
- - Add context to differentiate similar concepts
81
- - Example for similar countries:
82
- - ❌ "Capital of Guyana?" and "Capital of Suriname?" (too similar)
83
- - ✅ Add distinguishing features: "Capital of Guyana (only English-speaking country in South America)?"
84
-
85
- ### 11. Optimize Wording - Keep It Simple and Clear
86
- **Shorter, simpler wording = faster reviews.**
87
- - Remove unnecessary words
88
- - Use active voice
89
- - Make questions unambiguous
90
- - ❌ "In the context of programming, when considering the various paradigms, what would you say is the main characteristic that defines the functional approach?"
91
- - ✅ "Functional programming's main characteristic?"
92
-
93
- ### 12. Refer to Other Memories - Build Connections
94
- **Connect new knowledge to existing knowledge.**
95
- - Reference previously learned concepts
96
- - Build knowledge networks
97
- - Example: "Like REST but for GraphQL: {{c1::single endpoint}}"
98
- - Use analogies to familiar concepts
99
-
100
- ### 13. Personalize and Provide Examples
101
- **Personal context dramatically improves retention.**
102
- - Link to user's experiences
103
- - Use examples from their projects, life, or interests
104
- - ❌ Generic: "TypeScript interface definition?"
105
- - ✅ Personal: "TypeScript interface (like the User type in your project)?"
106
-
107
- ### 14. Rely on Emotional States
108
- **Emotion enhances memory.**
109
- - Use vivid, emotionally charged examples when appropriate
110
- - Link to memorable events or stories
111
- - Make boring facts interesting with context
112
- - Example: Instead of dry historical dates, add dramatic context
113
-
114
- ### 15. Context Cues Simplify Wording
115
- **Categories and prefixes reduce cognitive load.**
116
- - Add subject prefixes: "bio:", "hist:", "prog:"
117
- - Use tags effectively
118
- - Group related cards in decks
119
- - Example: "js: Array method for filtering?" (context cue: "js:")
120
-
121
- ### 16. Redundancy Can Be Beneficial
122
- **Some repetition from different angles helps.**
123
- - Create multiple cards for critical concepts from different angles
124
- - Test the same fact in different contexts
125
- - Balance with "don't overdo it"
126
-
127
- ### 17. Provide Sources and References
128
- **Context helps understanding and future reference.**
129
- - Add source information in card metadata or extra field
130
- - Link to documentation, books, or articles
131
- - Helps when reviewing old cards
132
-
133
- ### 18. Prioritize - Learn What Matters Most
134
- **Not everything deserves a flashcard.**
135
- - Focus on applicable, useful knowledge
136
- - Ask: "Will I actually need to recall this?"
137
- - Quality over quantity
138
-
139
- ## Workflow for Creating Cards
140
-
141
- 1. **Understand First**: Verify user understands the concept
142
- 2. **Build Context**: Ensure foundational knowledge exists
143
- 3. **Apply Minimum Information**: Break into atomic facts
144
- 4. **Choose Format**: Prefer cloze deletion for facts, Q&A for concepts
145
- 5. **Optimize Wording**: Make it clear, concise, unambiguous
146
- 6. **Add Richness**: Images, mnemonics, personal connections
147
- 7. **Review**: Check for interference with existing cards
148
-
149
- ## When User Asks to Create Cards
150
-
151
- 1. Ask about their understanding of the topic
152
- 2. Suggest the number and type of cards (don't just create them)
153
- 3. Show examples of proposed cards
154
- 4. Wait for approval before creating
155
- 5. Apply these rules to make cards effective
156
- 6. Use addNote tool only after user confirms
157
-
158
- ## Example Transformations
159
-
160
- ### Example 1: Complex → Simple
161
- ❌ **Bad Card**:
162
- Q: "What are the main differences between REST and GraphQL APIs and when would you use each?"
163
- A: [Long paragraph explaining both]
164
-
165
- ✅ **Good Cards** (4 separate cards):
166
- 1. "REST uses {{c1::multiple endpoints}}, GraphQL uses {{c2::single endpoint}}"
167
- 2. "GraphQL advantage over REST: {{c1::client specifies exact data needed}}"
168
- 3. "REST advantage over GraphQL: {{c1::simpler caching}} and {{c2::better tooling support}}"
169
- 4. "Use GraphQL when: {{c1::client needs flexible queries}} and {{c2::reducing over-fetching matters}}"
170
-
171
- ### Example 2: Generic → Personal
172
- ❌ **Bad Card**:
173
- Q: "What is a closure in JavaScript?"
174
- A: "A function that has access to outer function variables"
175
-
176
- ✅ **Good Card**:
177
- Q: "js: Closure definition (like in your React hooks code)?"
178
- A: "Function that remembers variables from its outer scope even after outer function returns"
179
-
180
- ### Example 3: Adding Visual Memory
181
- ❌ **Text Only**:
182
- Q: "Structure of the human heart?"
183
- A: [Text description]
184
-
185
- ✅ **With Image**:
186
- Q: [Image of heart with blank labels]
187
- A: [Same image with labels visible]
188
- (Use mediaActions to help user add the image)
189
-
190
- ## Remember
191
-
192
- **Quality > Quantity**: Five well-formed cards beat twenty poorly made ones.
193
- **Atomic Knowledge**: One fact per card, always.
194
- **User Context**: Personalize everything you can.
195
- **Understanding First**: Never create cards from material the user doesn't understand.
1
+ # Description
2
+
3
+ Twenty rules of formulating knowledge for effective Anki flashcard creation based on Dr. Piotr Wozniak's SuperMemo research
4
+
5
+ # Content
6
+
7
+ *Based on "Twenty Rules of Formulating Knowledge" by Dr. Piotr Wozniak: https://www.supermemo.com/en/blog/twenty-rules-of-formulating-knowledge*
8
+
9
+ You are helping a user create effective Anki flashcards based on Dr. Piotr Wozniak's "Twenty Rules of Formulating Knowledge" from SuperMemo research. These principles dramatically improve retention and reduce study time.
10
+
11
+ ## Core Principles
12
+
13
+ ### 1. Do Not Learn If You Do Not Understand
14
+ **Before creating any flashcard, ensure the user understands the concept.**
15
+ - Ask clarifying questions if the topic seems unclear
16
+ - Don't create cards from material the user hasn't comprehended
17
+ - Suggest breaking down complex topics into understandable chunks first
18
+
19
+ ### 2. Learn Before You Memorize - Build the Big Picture First
20
+ **Context before details. Overview before memorization.**
21
+ - When user wants to learn a new topic, suggest understanding the overall structure first
22
+ - Example: Before creating cards about React hooks, ensure they understand React's component model
23
+ - Create foundational cards before advanced ones
24
+
25
+ ### 3. Build Upon the Basics
26
+ **Never skip fundamentals. Simple before complex.**
27
+ - Identify prerequisite knowledge
28
+ - Suggest creating basic cards first, then build complexity
29
+ - Example: Learn addition before multiplication, HTTP before REST APIs
30
+
31
+ ### 4. Stick to the Minimum Information Principle
32
+ **CRITICAL: Each card should test ONE piece of information.**
33
+ - ❌ BAD: "What are the three main features of React and how do they work?"
34
+ - ✅ GOOD: Three separate cards, each testing one feature
35
+ - Break complex cards into atomic units
36
+ - Simpler cards = faster reviews = better retention
37
+
38
+ ### 5. Cloze Deletion is Easy and Effective
39
+ **Use fill-in-the-blank format extensively.**
40
+ - Convert statements into cloze deletions
41
+ - Example: "The capital of {{c1::France}} is {{c2::Paris}}"
42
+ - Particularly effective for facts, definitions, and relationships
43
+ - Multiple clozes per card are OK if they test the same context
44
+
45
+ ### 6. Use Imagery - Visual Memory is Powerful
46
+ **Add images whenever possible.**
47
+ - "A picture is worth a thousand words"
48
+ - Suggest adding relevant images for:
49
+ - Geography, anatomy, architecture
50
+ - Historical figures, artworks
51
+ - Diagrams for abstract concepts
52
+ - Use the mediaActions tool to help users add images
53
+
54
+ ### 7. Use Mnemonic Techniques
55
+ **Memory aids make retention easier.**
56
+ - Suggest mnemonics for difficult items
57
+ - Use acronyms (e.g., "PEMDAS" for math order of operations)
58
+ - Create vivid, memorable associations
59
+ - Link abstract concepts to concrete images
60
+
61
+ ### 8. Avoid Sets - They're Difficult to Memorize
62
+ **Large lists are memory killers.**
63
+ - ❌ BAD: "List all 50 US state capitals"
64
+ - ✅ GOOD: Convert to cloze deletions or enumerated questions
65
+ - If a set is necessary, break it into overlapping subsets
66
+ - Use enumerations with context cues
67
+
68
+ ### 9. Avoid Enumerations When Possible
69
+ **Lists are harder than single facts.**
70
+ - Instead of "What are the 7 principles of X?", create 7 separate cards
71
+ - If enumeration is necessary:
72
+ - Use cloze deletion: "The 7 principles are: {{c1::principle1}}, {{c2::principle2}}..."
73
+ - Add context and memory aids
74
+ - Keep lists short (max 5-7 items)
75
+
76
+ ### 10. Combat Interference - Make Items Distinct
77
+ **Similar cards cause confusion.**
78
+ - Avoid creating nearly identical cards
79
+ - Make distinctions explicit
80
+ - Add context to differentiate similar concepts
81
+ - Example for similar countries:
82
+ - ❌ "Capital of Guyana?" and "Capital of Suriname?" (too similar)
83
+ - ✅ Add distinguishing features: "Capital of Guyana (only English-speaking country in South America)?"
84
+
85
+ ### 11. Optimize Wording - Keep It Simple and Clear
86
+ **Shorter, simpler wording = faster reviews.**
87
+ - Remove unnecessary words
88
+ - Use active voice
89
+ - Make questions unambiguous
90
+ - ❌ "In the context of programming, when considering the various paradigms, what would you say is the main characteristic that defines the functional approach?"
91
+ - ✅ "Functional programming's main characteristic?"
92
+
93
+ ### 12. Refer to Other Memories - Build Connections
94
+ **Connect new knowledge to existing knowledge.**
95
+ - Reference previously learned concepts
96
+ - Build knowledge networks
97
+ - Example: "Like REST but for GraphQL: {{c1::single endpoint}}"
98
+ - Use analogies to familiar concepts
99
+
100
+ ### 13. Personalize and Provide Examples
101
+ **Personal context dramatically improves retention.**
102
+ - Link to user's experiences
103
+ - Use examples from their projects, life, or interests
104
+ - ❌ Generic: "TypeScript interface definition?"
105
+ - ✅ Personal: "TypeScript interface (like the User type in your project)?"
106
+
107
+ ### 14. Rely on Emotional States
108
+ **Emotion enhances memory.**
109
+ - Use vivid, emotionally charged examples when appropriate
110
+ - Link to memorable events or stories
111
+ - Make boring facts interesting with context
112
+ - Example: Instead of dry historical dates, add dramatic context
113
+
114
+ ### 15. Context Cues Simplify Wording
115
+ **Categories and prefixes reduce cognitive load.**
116
+ - Add subject prefixes: "bio:", "hist:", "prog:"
117
+ - Use tags effectively
118
+ - Group related cards in decks
119
+ - Example: "js: Array method for filtering?" (context cue: "js:")
120
+
121
+ ### 16. Redundancy Can Be Beneficial
122
+ **Some repetition from different angles helps.**
123
+ - Create multiple cards for critical concepts from different angles
124
+ - Test the same fact in different contexts
125
+ - Balance with "don't overdo it"
126
+
127
+ ### 17. Provide Sources and References
128
+ **Context helps understanding and future reference.**
129
+ - Add source information in card metadata or extra field
130
+ - Link to documentation, books, or articles
131
+ - Helps when reviewing old cards
132
+
133
+ ### 18. Prioritize - Learn What Matters Most
134
+ **Not everything deserves a flashcard.**
135
+ - Focus on applicable, useful knowledge
136
+ - Ask: "Will I actually need to recall this?"
137
+ - Quality over quantity
138
+
139
+ ## Workflow for Creating Cards
140
+
141
+ 1. **Understand First**: Verify user understands the concept
142
+ 2. **Build Context**: Ensure foundational knowledge exists
143
+ 3. **Apply Minimum Information**: Break into atomic facts
144
+ 4. **Choose Format**: Prefer cloze deletion for facts, Q&A for concepts
145
+ 5. **Optimize Wording**: Make it clear, concise, unambiguous
146
+ 6. **Add Richness**: Images, mnemonics, personal connections
147
+ 7. **Review**: Check for interference with existing cards
148
+
149
+ ## When User Asks to Create Cards
150
+
151
+ 1. Ask about their understanding of the topic
152
+ 2. Suggest the number and type of cards (don't just create them)
153
+ 3. Show examples of proposed cards
154
+ 4. Wait for approval before creating
155
+ 5. Apply these rules to make cards effective
156
+ 6. Use addNote tool only after user confirms
157
+
158
+ ## Example Transformations
159
+
160
+ ### Example 1: Complex → Simple
161
+ ❌ **Bad Card**:
162
+ Q: "What are the main differences between REST and GraphQL APIs and when would you use each?"
163
+ A: [Long paragraph explaining both]
164
+
165
+ ✅ **Good Cards** (4 separate cards):
166
+ 1. "REST uses {{c1::multiple endpoints}}, GraphQL uses {{c2::single endpoint}}"
167
+ 2. "GraphQL advantage over REST: {{c1::client specifies exact data needed}}"
168
+ 3. "REST advantage over GraphQL: {{c1::simpler caching}} and {{c2::better tooling support}}"
169
+ 4. "Use GraphQL when: {{c1::client needs flexible queries}} and {{c2::reducing over-fetching matters}}"
170
+
171
+ ### Example 2: Generic → Personal
172
+ ❌ **Bad Card**:
173
+ Q: "What is a closure in JavaScript?"
174
+ A: "A function that has access to outer function variables"
175
+
176
+ ✅ **Good Card**:
177
+ Q: "js: Closure definition (like in your React hooks code)?"
178
+ A: "Function that remembers variables from its outer scope even after outer function returns"
179
+
180
+ ### Example 3: Adding Visual Memory
181
+ ❌ **Text Only**:
182
+ Q: "Structure of the human heart?"
183
+ A: [Text description]
184
+
185
+ ✅ **With Image**:
186
+ Q: [Image of heart with blank labels]
187
+ A: [Same image with labels visible]
188
+ (Use mediaActions to help user add the image)
189
+
190
+ ## Remember
191
+
192
+ **Quality > Quantity**: Five well-formed cards beat twenty poorly made ones.
193
+ **Atomic Knowledge**: One fact per card, always.
194
+ **User Context**: Personalize everything you can.
195
+ **Understanding First**: Never create cards from material the user doesn't understand.
@@ -24,12 +24,22 @@ let AddNoteTool = AddNoteTool_1 = class AddNoteTool {
24
24
  }
25
25
  async addNote({ deckName, modelName, fields, tags, allowDuplicate, duplicateScope, duplicateScopeOptions, }, context) {
26
26
  try {
27
- const emptyFields = Object.entries(fields).filter(([_, value]) => !value || value.trim() === "");
28
- if (emptyFields.length > 0) {
29
- return (0, anki_utils_1.createErrorResponse)(new Error(`Fields cannot be empty: ${emptyFields.map(([key]) => key).join(", ")}`), {
27
+ const modelFields = await this.ankiClient.invoke("modelFieldNames", { modelName });
28
+ if (!modelFields || modelFields.length === 0) {
29
+ return (0, anki_utils_1.createErrorResponse)(new Error(`Model "${modelName}" not found or has no fields`), {
30
30
  deckName,
31
31
  modelName,
32
- emptyFields: emptyFields.map(([key]) => key),
32
+ hint: "Use modelNames tool to see available models.",
33
+ });
34
+ }
35
+ const primaryField = modelFields[0];
36
+ const primaryValue = fields[primaryField];
37
+ if (!primaryValue || primaryValue.trim() === "") {
38
+ return (0, anki_utils_1.createErrorResponse)(new Error(`Primary field "${primaryField}" cannot be empty. AnkiConnect requires the first field to have content.`), {
39
+ deckName,
40
+ modelName,
41
+ primaryField,
42
+ hint: `The first field of the "${modelName}" model must have content. Other fields can be empty.`,
33
43
  });
34
44
  }
35
45
  this.logger.log(`Adding note to deck "${deckName}" with model "${modelName}"`);
@@ -1 +1 @@
1
- {"version":3,"file":"add-note.tool.js","sourceRoot":"","sources":["../../../../../src/mcp/primitives/essential/tools/add-note.tool.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAoD;AACpD,8CAAuC;AAEvC,6BAAwB;AACxB,8EAAsE;AAEtE,0DAGgC;AAMzB,IAAM,WAAW,mBAAjB,MAAM,WAAW;IAGO;IAFZ,MAAM,GAAG,IAAI,eAAM,CAAC,aAAW,CAAC,IAAI,CAAC,CAAC;IAEvD,YAA6B,UAA6B;QAA7B,eAAU,GAAV,UAAU,CAAmB;IAAG,CAAC;IAmDxD,AAAN,KAAK,CAAC,OAAO,CACX,EACE,QAAQ,EACR,SAAS,EACT,MAAM,EACN,IAAI,EACJ,cAAc,EACd,cAAc,EACd,qBAAqB,GAatB,EACD,OAAgB;QAEhB,IAAI,CAAC;YAEH,MAAM,WAAW,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,MAAM,CAC/C,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,IAAI,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE,CAC9C,CAAC;YACF,IAAI,WAAW,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBAC3B,OAAO,IAAA,gCAAmB,EACxB,IAAI,KAAK,CACP,2BAA2B,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,CA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AAC;;;;0CAiKD;sBAtNU,WAAW;IADvB,IAAA,mBAAU,GAAE;qCAI8B,uCAAiB;GAH/C,WAAW,CAuNvB"}
1
+ {"version":3,"file":"add-note.tool.js","sourceRoot":"","sources":["../../../../../src/mcp/primitives/essential/tools/add-note.tool.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAoD;AACpD,8CAAuC;AAEvC,6BAAwB;AACxB,8EAAsE;AAEtE,0DAGgC;AAMzB,IAAM,WAAW,mBAAjB,MAAM,WAAW;IAGO;IAFZ,MAAM,GAAG,IAAI,eAAM,CAAC,aAAW,CAAC,IAAI,CAAC,CAAC;IAEvD,YAA6B,UAA6B;QAA7B,eAAU,GAAV,UAAU,CAAmB;IAAG,CAAC;IAmDxD,AAAN,KAAK,CAAC,OAAO,CACX,EACE,QAAQ,EACR,SAAS,EACT,MAAM,EACN,IAAI,EACJ,cAAc,EACd,cAAc,EACd,qBAAqB,GAatB,EACD,OAAgB;QAEhB,IAAI,CAAC;YAEH,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,MAAM,CAC9C,iBAAiB,EACjB,EAAE,SAAS,EAAE,CACd,CAAC;YAEF,IAAI,CAAC,WAAW,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBAC7C,OAAO,IAAA,gCAAmB,EACxB,IAAI,KAAK,CAAC,UAAU,SAAS,8BAA8B,CAAC,EAC5D;oBACE,QAAQ;oBACR,SAAS;oBACT,IAAI,EAAE,8CAA8C;iBACrD,CACF,CAAC;YACJ,CAAC;YAID,MAAM,YAAY,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC;YACpC,MAAM,YAAY,GAAG,MAAM,CAAC,YAAY,CAAC,CAAC;YAE1C,IAAI,CAAC,YAAY,IAAI,YAAY,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;gBAChD,OAAO,IAAA,gCAAmB,EACxB,IAAI,KAAK,CACP,kBAAkB,YAAY,0EAA0E,CACzG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AAW,CA0OvB"}
@@ -68,16 +68,30 @@ let AddNotesTool = AddNotesTool_1 = class AddNotesTool {
68
68
  try {
69
69
  this.logger.log(`Adding ${notes.length} note(s) in batch`);
70
70
  await context.reportProgress({ progress: 10, total: 100 });
71
+ const uniqueModels = [...new Set(notes.map((n) => n.modelName))];
72
+ const modelFieldsMap = new Map();
73
+ for (const modelName of uniqueModels) {
74
+ const fields = await this.ankiClient.invoke("modelFieldNames", { modelName });
75
+ if (!fields || fields.length === 0) {
76
+ return (0, anki_utils_1.createErrorResponse)(new Error(`Model "${modelName}" not found or has no fields`), {
77
+ modelName,
78
+ hint: "Use modelNames tool to see available models.",
79
+ });
80
+ }
81
+ modelFieldsMap.set(modelName, fields);
82
+ }
71
83
  for (let i = 0; i < notes.length; i++) {
72
84
  const note = notes[i];
73
- const emptyFields = Object.entries(note.fields).filter(([_, value]) => !value || (typeof value === "string" && value.trim() === ""));
74
- if (emptyFields.length > 0) {
75
- return (0, anki_utils_1.createErrorResponse)(new Error(`Note at index ${i} has empty fields: ${emptyFields.map(([key]) => key).join(", ")}`), {
85
+ const modelFields = modelFieldsMap.get(note.modelName);
86
+ const primaryField = modelFields[0];
87
+ const primaryValue = note.fields[primaryField];
88
+ if (!primaryValue || primaryValue.trim() === "") {
89
+ return (0, anki_utils_1.createErrorResponse)(new Error(`Note at index ${i}: Primary field "${primaryField}" cannot be empty.`), {
76
90
  noteIndex: i,
77
91
  deckName: note.deckName,
78
92
  modelName: note.modelName,
79
- emptyFields: emptyFields.map(([key]) => key),
80
- hint: "All fields must have non-empty values. Fix the validation errors and retry the entire batch.",
93
+ primaryField,
94
+ hint: `The first field of the "${note.modelName}" model must have content. Other fields can be empty.`,
81
95
  });
82
96
  }
83
97
  }
@@ -1 +1 @@
1
- {"version":3,"file":"add-notes.tool.js","sourceRoot":"","sources":["../../../../../src/mcp/primitives/essential/tools/add-notes.tool.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAoD;AACpD,8CAAuC;A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AsBjB;IAjBL,IAAA,eAAI,EAAC;QACJ,IAAI,EAAE,UAAU;QAChB,WAAW,EACT,4FAA4F;YAC5F,oGAAoG;YACpG,yFAAyF;YACzF,0EAA0E;QAC5E,UAAU,EAAE,OAAC,CAAC,MAAM,CAAC;YACnB,KAAK,EAAE,OAAC;iBACL,KAAK,CAAC,eAAe,CAAC;iBACtB,GAAG,CAAC,CAAC,CAAC;iBACN,GAAG,CAAC,EAAE,CAAC;iBACP,QAAQ,CACP,yFAAyF,CAC1F;SACJ,CAAC;KACH,CAAC;;;;4CA6KD;uBAlMU,YAAY;IADxB,IAAA,mBAAU,GAAE;qCAI8B,uCAAiB;GAH/C,YAAY,CAmMxB"}
1
+ {"version":3,"file":"add-notes.tool.js","sourceRoot":"","sources":["../../../../../src/mcp/primitives/essential/tools/add-notes.tool.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAoD;AACpD,8CAAuC;AAEvC,6BAAwB;AACxB,8EAAsE;AAEtE,0DAGgC;AAKhC,MAAM,eAAe,GAAG,OAAC,CAAC,MAAM,CAAC;IAC/B,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,6BAA6B,CAAC;IACnE,SAAS,EAAE,OAAC;SACT,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,CAAC;SACN,QAAQ,CAAC,qDAAqD,CAAC;IAClE,MAAM,EAAE,OAAC;SACN,MAAM,CAAC,OAAC,CAAC,MAAM,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC;SAC9B,QAAQ,CACP,iFAAiF,CAClF;IACH,IAAI,EAAE,OAAC;SACJ,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC;SACjB,QAAQ,EAAE;SACV,QAAQ,CAAC,kCAAkC,CAAC;IAC/C,cAAc,EAAE,OAAC;SACd,OAAO,EAAE;SACT,QAAQ,EAAE;SACV,OAAO,CAAC,KAAK,CAAC;SACd,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AE,OAAC;iBACL,KAAK,CAAC,eAAe,CAAC;iBACtB,GAAG,CAAC,CAAC,CAAC;iBACN,GAAG,CAAC,EAAE,CAAC;iBACP,QAAQ,CACP,yFAAyF,CAC1F;SACJ,CAAC;KACH,CAAC;;;;4CAmMD;uBAxNU,YAAY;IADxB,IAAA,mBAAU,GAAE;qCAI8B,uCAAiB;GAH/C,YAAY,CAyNxB"}
@@ -87,12 +87,12 @@ exports.MediaActionsTool = MediaActionsTool;
87
87
  __decorate([
88
88
  (0, mcp_nest_1.Tool)({
89
89
  name: "mediaActions",
90
- description: `Manage Anki media files (audio/images). Supports four actions:
91
- - storeMediaFile: Upload media to Anki (supports base64 data, file paths, or URLs)
92
- - retrieveMediaFile: Download media from Anki as base64
93
- - getMediaFilesNames: List media files (optionally filter by pattern)
94
- - deleteMediaFile: Remove media file from Anki
95
-
90
+ description: `Manage Anki media files (audio/images). Supports four actions:
91
+ - storeMediaFile: Upload media to Anki (supports base64 data, file paths, or URLs)
92
+ - retrieveMediaFile: Download media from Anki as base64
93
+ - getMediaFilesNames: List media files (optionally filter by pattern)
94
+ - deleteMediaFile: Remove media file from Anki
95
+
96
96
  Perfect for workflows like ElevenLabs TTS → Anki audio flashcards.`,
97
97
  parameters: zod_1.z.object({
98
98
  action: zod_1.z
@@ -97,13 +97,13 @@ exports.TagActionsTool = TagActionsTool;
97
97
  __decorate([
98
98
  (0, mcp_nest_1.Tool)({
99
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.
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
107
  Tags in addTags/removeTags are space-separated strings (e.g., "tag1 tag2 tag3").`,
108
108
  parameters: zod_1.z.object({
109
109
  action: zod_1.z