bear-notes-mcp 2.2.0 → 2.3.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/config.js +1 -1
- package/dist/main.js +49 -7
- package/package.json +8 -8
package/dist/config.js
CHANGED
package/dist/main.js
CHANGED
|
@@ -47,7 +47,7 @@ Use bear-search-notes to find the correct note identifier.`);
|
|
|
47
47
|
${noteText}`);
|
|
48
48
|
}
|
|
49
49
|
catch (error) {
|
|
50
|
-
logger.error(
|
|
50
|
+
logger.error('bear-open-note failed:', error);
|
|
51
51
|
throw error;
|
|
52
52
|
}
|
|
53
53
|
});
|
|
@@ -90,7 +90,7 @@ server.registerTool('bear-create-note', {
|
|
|
90
90
|
The note has been added to your Bear Notes library.`);
|
|
91
91
|
}
|
|
92
92
|
catch (error) {
|
|
93
|
-
logger.error(
|
|
93
|
+
logger.error('bear-create-note failed:', error);
|
|
94
94
|
throw error;
|
|
95
95
|
}
|
|
96
96
|
});
|
|
@@ -180,7 +180,7 @@ Try different search criteria or check if notes exist in Bear Notes.`);
|
|
|
180
180
|
return createToolResponse(resultLines.join('\n'));
|
|
181
181
|
}
|
|
182
182
|
catch (error) {
|
|
183
|
-
logger.error(
|
|
183
|
+
logger.error('bear-search-notes failed:', error);
|
|
184
184
|
throw error;
|
|
185
185
|
}
|
|
186
186
|
});
|
|
@@ -267,7 +267,7 @@ ${noteIdentifier}
|
|
|
267
267
|
The file has been attached to your Bear note.`);
|
|
268
268
|
}
|
|
269
269
|
catch (error) {
|
|
270
|
-
logger.error(
|
|
270
|
+
logger.error('bear-add-file failed:', error);
|
|
271
271
|
throw error;
|
|
272
272
|
}
|
|
273
273
|
});
|
|
@@ -321,7 +321,7 @@ server.registerTool('bear-list-tags', {
|
|
|
321
321
|
return createToolResponse(header + '\n' + lines.join('\n'));
|
|
322
322
|
}
|
|
323
323
|
catch (error) {
|
|
324
|
-
logger.error(
|
|
324
|
+
logger.error('bear-list-tags failed:', error);
|
|
325
325
|
throw error;
|
|
326
326
|
}
|
|
327
327
|
});
|
|
@@ -363,7 +363,7 @@ server.registerTool('bear-find-untagged-notes', {
|
|
|
363
363
|
return createToolResponse(lines.join('\n'));
|
|
364
364
|
}
|
|
365
365
|
catch (error) {
|
|
366
|
-
logger.error(
|
|
366
|
+
logger.error('bear-find-untagged-notes failed:', error);
|
|
367
367
|
throw error;
|
|
368
368
|
}
|
|
369
369
|
});
|
|
@@ -418,7 +418,49 @@ Tags: ${tagList}
|
|
|
418
418
|
The tags have been added to the beginning of the note.`);
|
|
419
419
|
}
|
|
420
420
|
catch (error) {
|
|
421
|
-
logger.error(
|
|
421
|
+
logger.error('bear-add-tag failed:', error);
|
|
422
|
+
throw error;
|
|
423
|
+
}
|
|
424
|
+
});
|
|
425
|
+
server.registerTool('bear-archive-note', {
|
|
426
|
+
title: 'Archive Bear Note',
|
|
427
|
+
description: "Move a note to Bear's archive. The note will no longer appear in regular searches but can be found in Bear's Archive section. Use bear-search-notes first to get the note ID.",
|
|
428
|
+
inputSchema: {
|
|
429
|
+
id: z
|
|
430
|
+
.string()
|
|
431
|
+
.trim()
|
|
432
|
+
.min(1, 'Note ID is required')
|
|
433
|
+
.describe('Note identifier (ID) from bear-search-notes or bear-open-note'),
|
|
434
|
+
},
|
|
435
|
+
annotations: {
|
|
436
|
+
readOnlyHint: false,
|
|
437
|
+
destructiveHint: true,
|
|
438
|
+
idempotentHint: true,
|
|
439
|
+
openWorldHint: true,
|
|
440
|
+
},
|
|
441
|
+
}, async ({ id }) => {
|
|
442
|
+
logger.info(`bear-archive-note called with id: ${id}`);
|
|
443
|
+
try {
|
|
444
|
+
const existingNote = getNoteContent(id);
|
|
445
|
+
if (!existingNote) {
|
|
446
|
+
return createToolResponse(`Note with ID '${id}' not found. The note may have been deleted, archived, or the ID may be incorrect.
|
|
447
|
+
|
|
448
|
+
Use bear-search-notes to find the correct note identifier.`);
|
|
449
|
+
}
|
|
450
|
+
const url = buildBearUrl('archive', {
|
|
451
|
+
id,
|
|
452
|
+
show_window: 'no',
|
|
453
|
+
});
|
|
454
|
+
await executeBearXCallbackApi(url);
|
|
455
|
+
return createToolResponse(`Note archived successfully!
|
|
456
|
+
|
|
457
|
+
Note: "${existingNote.title}"
|
|
458
|
+
ID: ${id}
|
|
459
|
+
|
|
460
|
+
The note has been moved to Bear's archive.`);
|
|
461
|
+
}
|
|
462
|
+
catch (error) {
|
|
463
|
+
logger.error('bear-archive-note failed:', error);
|
|
422
464
|
throw error;
|
|
423
465
|
}
|
|
424
466
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bear-notes-mcp",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.3.0",
|
|
4
4
|
"description": "Bear Notes MCP server with TypeScript and native SQLite",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/main.js",
|
|
@@ -19,23 +19,23 @@
|
|
|
19
19
|
"prepublishOnly": "npm run build && mv docs/NPM.md README.md"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@modelcontextprotocol/sdk": "^1.
|
|
22
|
+
"@modelcontextprotocol/sdk": "^1.26.0",
|
|
23
23
|
"debug": "^4.4.3",
|
|
24
|
-
"zod": "^4.3.
|
|
24
|
+
"zod": "^4.3.6",
|
|
25
25
|
"zod-to-json-schema": "^3.25.1"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@anthropic-ai/mcpb": "^2.1.2",
|
|
29
29
|
"@types/debug": "^4.1.12",
|
|
30
|
-
"@types/node": "^24.10.
|
|
31
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
32
|
-
"@typescript-eslint/parser": "^8.
|
|
30
|
+
"@types/node": "^24.10.13",
|
|
31
|
+
"@typescript-eslint/eslint-plugin": "^8.55.0",
|
|
32
|
+
"@typescript-eslint/parser": "^8.55.0",
|
|
33
33
|
"eslint": "^9.39.2",
|
|
34
34
|
"eslint-plugin-import": "^2.32.0",
|
|
35
|
-
"prettier": "^3.8.
|
|
35
|
+
"prettier": "^3.8.1",
|
|
36
36
|
"tsx": "^4.21.0",
|
|
37
37
|
"typescript": "^5.9.3",
|
|
38
|
-
"vitest": "^4.0.
|
|
38
|
+
"vitest": "^4.0.18"
|
|
39
39
|
},
|
|
40
40
|
"engines": {
|
|
41
41
|
"node": ">=24.13.0"
|