note-mcp-server 2.3.1 → 2.3.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.
Files changed (2) hide show
  1. package/index.js +25 -5
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -172,14 +172,18 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
172
172
  {
173
173
  name: "create_note",
174
174
  description: withSecurityNotice(
175
- `在 ${APP_NAME} 中新增筆記。內容請優先使用簡潔的 AdminLTE 4 card 結構。`
175
+ `在 ${APP_NAME} 中新增筆記。內容請優先使用簡潔的 AdminLTE 4 card 結構。\nAI 行為:除非用戶明確要求,否則不要傳 tags(勿自行推測、分類或補加標籤)。`
176
176
  ),
177
177
  inputSchema: {
178
178
  type: "object",
179
179
  properties: {
180
180
  content: { type: "string", description: "HTML 或純文字內容" },
181
181
  title: { type: "string", description: "標題(可選)" },
182
- tags: { type: "string", description: "標籤,多個標籤以逗號分隔(可選)" },
182
+ tags: {
183
+ type: "string",
184
+ description:
185
+ "標籤,多個以逗號分隔(可選;僅當用戶明確要求設定標籤時才傳,勿主動填寫)",
186
+ },
183
187
  },
184
188
  required: ["content"],
185
189
  },
@@ -187,15 +191,28 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
187
191
  {
188
192
  name: "update_note",
189
193
  description: withSecurityNotice(
190
- `在 ${APP_NAME} 中修改筆記。內容請優先使用簡潔的 AdminLTE 4 card 結構,避免嵌套破版,支援以 append/prepend 追加內容。`
194
+ `在 ${APP_NAME} 中修改筆記。內容請優先使用簡潔的 AdminLTE 4 card 結構,避免嵌套破版,支援以 append/prepend 追加內容。\nAI 行為:除非用戶明確要求,否則不要傳 tags、add_tags(勿自行推測或補加標籤);亦不要傳 title,除非用戶明確要求變更標題。\n標籤語意:tags=整包覆寫既有標籤;add_tags=在既有標籤上追加(逗號分隔),勿刪除未提及的標籤。用戶只要「多加幾個標籤」時請用 add_tags,勿用 tags。`
191
195
  ),
192
196
  inputSchema: {
193
197
  type: "object",
194
198
  properties: {
195
199
  c_id: { type: "number", description: "筆記 ID" },
196
200
  content: { type: "string", description: "新內容(可選,若未傳則使用現有內容作為基底)" },
197
- title: { type: "string", description: "新標題(可選)" },
198
- tags: { type: "string", description: "新標籤,多個標籤以逗號分隔(可選)" },
201
+ title: {
202
+ type: "string",
203
+ description:
204
+ "新標題(可選;僅當用戶明確要求變更標題時才傳,勿為「優化」或推測而擅自改標題)",
205
+ },
206
+ tags: {
207
+ type: "string",
208
+ description:
209
+ "新標籤,多個以逗號分隔(可選;僅當用戶明確要求「整包重設」標籤時才傳,會覆寫既有全部標籤;勿主動填寫)",
210
+ },
211
+ add_tags: {
212
+ type: "string",
213
+ description:
214
+ "僅追加標籤,多個以逗號分隔(可選;與既有標籤合併、不覆寫未列出的標籤。僅當用戶明確要求「在現有標籤上多加」時才傳;勿主動填寫)",
215
+ },
199
216
  append: { type: "string", description: "追加在結尾的內容(可選)" },
200
217
  prepend: { type: "string", description: "追加在開頭的內容(可選)" },
201
218
  },
@@ -350,6 +367,9 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
350
367
  if (args.tags !== undefined) {
351
368
  payload.tags = args.tags;
352
369
  }
370
+ if (args.add_tags !== undefined && args.add_tags !== "") {
371
+ payload.add_tags = args.add_tags;
372
+ }
353
373
  if (args.append !== undefined) {
354
374
  payload.append = args.append;
355
375
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "note-mcp-server",
3
- "version": "2.3.1",
3
+ "version": "2.3.2",
4
4
  "description": "MCP (stdio) server for Notes API v2 — list/read/write notes, upload images, Web Push from Cursor and compatible clients.",
5
5
  "main": "index.js",
6
6
  "bin": {