note-mcp-server 2.2.3 → 2.2.4

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 +14 -17
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -76,7 +76,7 @@ const APP_NAME = firstEnv("app_name", "APP_NAME", "notes_app_name", "NOTES_APP_N
76
76
  const server = new Server(
77
77
  {
78
78
  name: `note-mcp-server (${APP_NAME})`,
79
- version: "2.2.3",
79
+ version: "2.2.4",
80
80
  },
81
81
  {
82
82
  capabilities: {
@@ -114,19 +114,14 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
114
114
  tools: [
115
115
  {
116
116
  name: "list_notes",
117
- description: `列出 ${APP_NAME} 的筆記(GET 列表),支援 search 搜尋與 limit 截斷。`,
117
+ description: `列出或搜尋 ${APP_NAME} 中的筆記。支援關鍵字、標籤搜尋及分頁(預設每頁 10 筆)。`,
118
118
  inputSchema: {
119
119
  type: "object",
120
120
  properties: {
121
- search: {
122
- type: "string",
123
- description: "搜尋關鍵字(可選)",
124
- },
125
- limit: {
126
- type: "number",
127
- description: "最多回傳幾筆(預設 3)",
128
- default: 3,
129
- },
121
+ search: { type: "string", description: "搜尋關鍵字(可選)" },
122
+ tag: { type: "string", description: "搜尋標籤(可選,例如:打卡機)" },
123
+ page: { type: "number", description: "頁碼(可選,預設 1)" },
124
+ limit: { type: "number", description: "每頁幾筆(可選,預設 10)" },
130
125
  },
131
126
  },
132
127
  },
@@ -227,15 +222,17 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
227
222
  try {
228
223
  switch (name) {
229
224
  case "list_notes": {
230
- const limit = Number(args.limit) > 0 ? Number(args.limit) : 3;
231
225
  const params = {};
232
- if (args.search) {
233
- params.search = args.search;
234
- }
226
+ if (args.search) params.search = args.search;
227
+ if (args.tag) params.tag = args.tag;
228
+ if (args.page) params.page = args.page;
229
+ params.limit = args.limit || 10;
230
+
235
231
  const response = await axios.get(BASE_URL, { params });
236
- const list = normalizeListPayload(response.data).slice(0, limit);
237
232
  return {
238
- content: [{ type: "text", text: JSON.stringify(list, null, 2) }],
233
+ content: [
234
+ { type: "text", text: JSON.stringify(response.data, null, 2) },
235
+ ],
239
236
  };
240
237
  }
241
238
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "note-mcp-server",
3
- "version": "2.2.3",
3
+ "version": "2.2.4",
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": {