caldav-mcp 0.3.0 → 0.4.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/index.js
CHANGED
|
@@ -18,7 +18,8 @@ export function registerCreateEvent(client, server) {
|
|
|
18
18
|
calendarUrl: z.string(),
|
|
19
19
|
recurrenceRule: recurrenceRuleSchema.optional(),
|
|
20
20
|
},
|
|
21
|
-
}, async (
|
|
21
|
+
}, async (args) => {
|
|
22
|
+
const { calendarUrl, summary, start, end, recurrenceRule } = args;
|
|
22
23
|
const event = await client.createEvent(calendarUrl, {
|
|
23
24
|
summary: summary,
|
|
24
25
|
start: new Date(start),
|
|
@@ -3,7 +3,8 @@ export function registerDeleteEvent(client, server) {
|
|
|
3
3
|
server.registerTool("delete-event", {
|
|
4
4
|
description: "Deletes an event in the calendar specified by its URL",
|
|
5
5
|
inputSchema: { uid: z.string(), calendarUrl: z.string() },
|
|
6
|
-
}, async (
|
|
6
|
+
}, async (args) => {
|
|
7
|
+
const { uid, calendarUrl } = args;
|
|
7
8
|
await client.deleteEvent(calendarUrl, uid);
|
|
8
9
|
return {
|
|
9
10
|
content: [{ type: "text", text: "Event deleted" }],
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
const dateString = z.string().refine((val) => !isNaN(Date.parse(val)), {
|
|
2
|
+
const dateString = z.string().refine((val) => !Number.isNaN(Date.parse(val)), {
|
|
3
3
|
message: "Invalid date string",
|
|
4
4
|
});
|
|
5
5
|
export function registerListEvents(client, server) {
|
|
@@ -10,7 +10,8 @@ export function registerListEvents(client, server) {
|
|
|
10
10
|
end: dateString,
|
|
11
11
|
calendarUrl: z.string(),
|
|
12
12
|
},
|
|
13
|
-
}, async (
|
|
13
|
+
}, async (args) => {
|
|
14
|
+
const { calendarUrl, start, end } = args;
|
|
14
15
|
const options = {
|
|
15
16
|
start: new Date(start),
|
|
16
17
|
end: new Date(end),
|
package/package.json
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "caldav-mcp",
|
|
3
3
|
"description": "A CalDAV client using Model Context Protocol (MCP) to expose calendar operations as tools for AI assistants.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.4.0",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"bin": {
|
|
8
8
|
"caldav-mcp": "dist/index.js"
|
|
9
9
|
},
|
|
10
|
-
"files": [
|
|
10
|
+
"files": [
|
|
11
|
+
"dist"
|
|
12
|
+
],
|
|
11
13
|
"scripts": {
|
|
12
14
|
"build": "tsc && shx chmod +x dist/*.js",
|
|
13
15
|
"dev": "tsx --watch --env-file=.env src/index.ts",
|
|
@@ -20,7 +22,8 @@
|
|
|
20
22
|
"check:ci": "biome ci .",
|
|
21
23
|
"validate": "npm run check && npm test && npm run build",
|
|
22
24
|
"watch": "tsc --watch",
|
|
23
|
-
"semantic-release": "semantic-release"
|
|
25
|
+
"semantic-release": "semantic-release",
|
|
26
|
+
"knip": "knip"
|
|
24
27
|
},
|
|
25
28
|
"repository": {
|
|
26
29
|
"type": "git",
|
|
@@ -37,8 +40,9 @@
|
|
|
37
40
|
"npm": ">=9.0.0"
|
|
38
41
|
},
|
|
39
42
|
"dependencies": {
|
|
40
|
-
"@modelcontextprotocol/sdk": "^1.
|
|
41
|
-
"ts-caldav": "^0.2.5"
|
|
43
|
+
"@modelcontextprotocol/sdk": "^1.26.0",
|
|
44
|
+
"ts-caldav": "^0.2.5",
|
|
45
|
+
"zod": "^3.24.1"
|
|
42
46
|
},
|
|
43
47
|
"devDependencies": {
|
|
44
48
|
"@biomejs/biome": "2.3.14",
|
|
@@ -48,9 +52,10 @@
|
|
|
48
52
|
"@semantic-release/git": "^10.0.1",
|
|
49
53
|
"@semantic-release/github": "^12.0.5",
|
|
50
54
|
"@semantic-release/npm": "^13.1.4",
|
|
51
|
-
"@types/node": "^24.
|
|
55
|
+
"@types/node": "^24.10.13",
|
|
52
56
|
"@vitest/coverage-v8": "^3.2.4",
|
|
53
57
|
"husky": "^9.1.7",
|
|
58
|
+
"knip": "^5.83.1",
|
|
54
59
|
"semantic-release": "^25.0.3",
|
|
55
60
|
"shx": "^0.4.0",
|
|
56
61
|
"tsx": "^4.21.0",
|