@miguelarios/cal-mcp 0.2.1 → 0.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.
@@ -1,162 +1,322 @@
1
- {
2
- "tools": [
3
- {
4
- "name": "list_calendars",
5
- "description": "List all calendars across all configured CalDAV providers. Returns provider-prefixed IDs (e.g., mailbox/work).",
6
- "inputSchema": { "type": "object", "properties": {} }
7
- },
8
- {
9
- "name": "list_events",
10
- "description": "Query events in a calendar by date range. Expands recurring events.",
11
- "inputSchema": {
12
- "type": "object",
13
- "properties": {
14
- "calendar": { "type": "string", "description": "Provider-prefixed calendar ID (e.g., mailbox/Work)" },
15
- "start": { "type": "string", "description": "Start of date range (ISO 8601)" },
16
- "end": { "type": "string", "description": "End of date range (ISO 8601)" }
17
- },
18
- "required": ["calendar", "start", "end"]
19
- }
20
- },
21
- {
22
- "name": "get_event",
23
- "description": "Get full details of a single event by calendar and UID.",
24
- "inputSchema": {
25
- "type": "object",
26
- "properties": {
27
- "calendar": { "type": "string", "description": "Provider-prefixed calendar ID" },
28
- "uid": { "type": "string", "description": "Event UID" }
29
- },
30
- "required": ["calendar", "uid"]
31
- }
32
- },
33
- {
34
- "name": "create_event",
35
- "description": "Create a new calendar event.",
36
- "inputSchema": {
37
- "type": "object",
38
- "properties": {
39
- "calendar": { "type": "string", "description": "Provider-prefixed calendar ID" },
40
- "summary": { "type": "string", "description": "Event title" },
41
- "start": { "type": "string", "description": "Start time (ISO 8601)" },
42
- "end": { "type": "string", "description": "End time (ISO 8601)" },
43
- "location": { "type": "string", "description": "Event location" },
44
- "description": { "type": "string", "description": "Event description" },
45
- "attendees": {
46
- "type": "array",
47
- "items": {
48
- "type": "object",
49
- "properties": {
50
- "email": { "type": "string" },
51
- "name": { "type": "string" }
52
- },
53
- "required": ["email"]
54
- },
55
- "description": "List of attendees"
56
- }
1
+ [
2
+ {
3
+ "name": "list_calendars",
4
+ "description": "List all calendars across all configured CalDAV providers. Returns provider-prefixed IDs (e.g., mailbox/work).",
5
+ "inputSchema": { "type": "object", "properties": {} }
6
+ },
7
+ {
8
+ "name": "list_events",
9
+ "description": "Query events in a date range. Recurring events are expanded into individual instances.",
10
+ "inputSchema": {
11
+ "type": "object",
12
+ "properties": {
13
+ "calendar": {
14
+ "type": "string",
15
+ "description": "Provider-prefixed calendar ID (e.g., mailbox/Work). If omitted, queries all calendars."
16
+ },
17
+ "start": {
18
+ "type": "string",
19
+ "description": "Start of date range (ISO 8601)"
20
+ },
21
+ "end": {
22
+ "type": "string",
23
+ "description": "End of date range (ISO 8601)"
24
+ },
25
+ "detail_level": {
26
+ "type": "string",
27
+ "enum": ["summary", "full"],
28
+ "description": "Response verbosity (default: summary)"
29
+ }
30
+ },
31
+ "required": ["start", "end"]
32
+ }
33
+ },
34
+ {
35
+ "name": "get_today_events",
36
+ "description": "Get all events for today. Convenience wrapper over list_events.",
37
+ "inputSchema": {
38
+ "type": "object",
39
+ "properties": {
40
+ "calendar": {
41
+ "type": "string",
42
+ "description": "Provider-prefixed calendar ID. If omitted, queries all calendars."
57
43
  },
58
- "required": ["calendar", "summary", "start", "end"]
44
+ "detail_level": {
45
+ "type": "string",
46
+ "enum": ["summary", "full"],
47
+ "description": "Response verbosity (default: summary)"
48
+ }
59
49
  }
60
- },
61
- {
62
- "name": "update_event",
63
- "description": "Update an existing event. Only provided fields are changed.",
64
- "inputSchema": {
65
- "type": "object",
66
- "properties": {
67
- "calendar": { "type": "string", "description": "Provider-prefixed calendar ID" },
68
- "uid": { "type": "string", "description": "Event UID to update" },
69
- "summary": { "type": "string", "description": "New event title" },
70
- "start": { "type": "string", "description": "New start time (ISO 8601)" },
71
- "end": { "type": "string", "description": "New end time (ISO 8601)" },
72
- "location": { "type": "string", "description": "New location" },
73
- "description": { "type": "string", "description": "New description" },
74
- "attendees": {
75
- "type": "array",
76
- "items": {
77
- "type": "object",
78
- "properties": {
79
- "email": { "type": "string" },
80
- "name": { "type": "string" }
81
- },
82
- "required": ["email"]
50
+ }
51
+ },
52
+ {
53
+ "name": "search_events",
54
+ "description": "Keyword search across event title, description, and location.",
55
+ "inputSchema": {
56
+ "type": "object",
57
+ "properties": {
58
+ "query": {
59
+ "type": "string",
60
+ "description": "Search term"
61
+ },
62
+ "calendar": {
63
+ "type": "string",
64
+ "description": "Provider-prefixed calendar ID. If omitted, searches all calendars."
65
+ },
66
+ "start": {
67
+ "type": "string",
68
+ "description": "Range start (ISO 8601). Defaults to 90 days ago."
69
+ },
70
+ "end": {
71
+ "type": "string",
72
+ "description": "Range end (ISO 8601). Defaults to 90 days ahead."
73
+ },
74
+ "detail_level": {
75
+ "type": "string",
76
+ "enum": ["summary", "full"],
77
+ "description": "Response verbosity (default: summary)"
78
+ }
79
+ },
80
+ "required": ["query"]
81
+ }
82
+ },
83
+ {
84
+ "name": "get_event",
85
+ "description": "Get full details of a single event by calendar and UID.",
86
+ "inputSchema": {
87
+ "type": "object",
88
+ "properties": {
89
+ "calendar": {
90
+ "type": "string",
91
+ "description": "Provider-prefixed calendar ID"
92
+ },
93
+ "uid": { "type": "string", "description": "Event UID" }
94
+ },
95
+ "required": ["calendar", "uid"]
96
+ }
97
+ },
98
+ {
99
+ "name": "create_event",
100
+ "description": "Create a new calendar event.",
101
+ "inputSchema": {
102
+ "type": "object",
103
+ "properties": {
104
+ "calendar": {
105
+ "type": "string",
106
+ "description": "Provider-prefixed calendar ID"
107
+ },
108
+ "title": { "type": "string", "description": "Event title" },
109
+ "start": {
110
+ "type": "string",
111
+ "description": "Start time (ISO 8601)"
112
+ },
113
+ "end": { "type": "string", "description": "End time (ISO 8601)" },
114
+ "all_day": {
115
+ "type": "boolean",
116
+ "description": "All-day event flag (default: false)"
117
+ },
118
+ "location": { "type": "string", "description": "Event location" },
119
+ "description": {
120
+ "type": "string",
121
+ "description": "Event description"
122
+ },
123
+ "attendees": {
124
+ "type": "array",
125
+ "items": {
126
+ "type": "object",
127
+ "properties": {
128
+ "email": { "type": "string" },
129
+ "name": { "type": "string" }
83
130
  },
84
- "description": "New attendee list (replaces existing)"
85
- }
131
+ "required": ["email"]
132
+ },
133
+ "description": "List of attendees"
134
+ }
135
+ },
136
+ "required": ["calendar", "title", "start", "end"]
137
+ }
138
+ },
139
+ {
140
+ "name": "update_event",
141
+ "description": "Update an existing event. Only provided fields are changed.",
142
+ "inputSchema": {
143
+ "type": "object",
144
+ "properties": {
145
+ "calendar": {
146
+ "type": "string",
147
+ "description": "Provider-prefixed calendar ID"
86
148
  },
87
- "required": ["calendar", "uid"]
88
- }
89
- },
90
- {
91
- "name": "delete_event",
92
- "description": "Delete a calendar event by UID.",
93
- "inputSchema": {
94
- "type": "object",
95
- "properties": {
96
- "calendar": { "type": "string", "description": "Provider-prefixed calendar ID" },
97
- "uid": { "type": "string", "description": "Event UID to delete" }
98
- },
99
- "required": ["calendar", "uid"]
100
- }
101
- },
102
- {
103
- "name": "create_events_batch",
104
- "description": "Create multiple events at once. Returns created event count.",
105
- "inputSchema": {
106
- "type": "object",
107
- "properties": {
108
- "calendar": { "type": "string", "description": "Provider-prefixed calendar ID" },
109
- "events": {
110
- "type": "array",
111
- "items": {
112
- "type": "object",
113
- "properties": {
114
- "summary": { "type": "string" },
115
- "start": { "type": "string" },
116
- "end": { "type": "string" },
117
- "location": { "type": "string" },
118
- "description": { "type": "string" }
119
- },
120
- "required": ["summary", "start", "end"]
149
+ "uid": {
150
+ "type": "string",
151
+ "description": "Event UID to update"
152
+ },
153
+ "title": { "type": "string", "description": "New event title" },
154
+ "start": {
155
+ "type": "string",
156
+ "description": "New start time (ISO 8601)"
157
+ },
158
+ "end": {
159
+ "type": "string",
160
+ "description": "New end time (ISO 8601)"
161
+ },
162
+ "all_day": {
163
+ "type": "boolean",
164
+ "description": "All-day event flag"
165
+ },
166
+ "location": { "type": "string", "description": "New location" },
167
+ "description": {
168
+ "type": "string",
169
+ "description": "New description"
170
+ },
171
+ "attendees": {
172
+ "type": "array",
173
+ "items": {
174
+ "type": "object",
175
+ "properties": {
176
+ "email": { "type": "string" },
177
+ "name": { "type": "string" }
121
178
  },
122
- "description": "Array of events to create"
123
- }
179
+ "required": ["email"]
180
+ },
181
+ "description": "New attendee list (replaces existing)"
124
182
  },
125
- "required": ["calendar", "events"]
126
- }
127
- },
128
- {
129
- "name": "import_ics",
130
- "description": "Import events from iCalendar (.ics) content into a calendar.",
131
- "inputSchema": {
132
- "type": "object",
133
- "properties": {
134
- "calendar": { "type": "string", "description": "Provider-prefixed calendar ID" },
135
- "icsContent": { "type": "string", "description": "Raw iCalendar content string" }
136
- },
137
- "required": ["calendar", "icsContent"]
138
- }
139
- },
140
- {
141
- "name": "find_free_slots",
142
- "description": "Find available time slots across specified calendars. Returns free windows matching the requested duration.",
143
- "inputSchema": {
144
- "type": "object",
145
- "properties": {
146
- "calendars": {
147
- "type": "array",
148
- "items": { "type": "string" },
149
- "description": "Provider-prefixed calendar IDs to check availability against"
183
+ "span": {
184
+ "type": "string",
185
+ "enum": ["this", "future", "all"],
186
+ "description": "Recurring event scope (default: this)"
187
+ }
188
+ },
189
+ "required": ["calendar", "uid"]
190
+ }
191
+ },
192
+ {
193
+ "name": "delete_event",
194
+ "description": "Delete a calendar event by UID.",
195
+ "inputSchema": {
196
+ "type": "object",
197
+ "properties": {
198
+ "calendar": {
199
+ "type": "string",
200
+ "description": "Provider-prefixed calendar ID"
201
+ },
202
+ "uid": {
203
+ "type": "string",
204
+ "description": "Event UID to delete"
205
+ },
206
+ "span": {
207
+ "type": "string",
208
+ "enum": ["this", "future", "all"],
209
+ "description": "Recurring event scope (default: all)"
210
+ }
211
+ },
212
+ "required": ["calendar", "uid"]
213
+ }
214
+ },
215
+ {
216
+ "name": "create_events_batch",
217
+ "description": "Create multiple events at once. Returns created event count.",
218
+ "inputSchema": {
219
+ "type": "object",
220
+ "properties": {
221
+ "calendar": {
222
+ "type": "string",
223
+ "description": "Provider-prefixed calendar ID"
224
+ },
225
+ "events": {
226
+ "type": "array",
227
+ "items": {
228
+ "type": "object",
229
+ "properties": {
230
+ "title": { "type": "string" },
231
+ "start": { "type": "string" },
232
+ "end": { "type": "string" },
233
+ "all_day": { "type": "boolean" },
234
+ "location": { "type": "string" },
235
+ "description": { "type": "string" },
236
+ "attendees": {
237
+ "type": "array",
238
+ "items": {
239
+ "type": "object",
240
+ "properties": {
241
+ "email": { "type": "string" },
242
+ "name": { "type": "string" }
243
+ },
244
+ "required": ["email"]
245
+ }
246
+ }
247
+ },
248
+ "required": ["title", "start", "end"]
150
249
  },
151
- "start": { "type": "string", "description": "Start of search range (ISO 8601)" },
152
- "end": { "type": "string", "description": "End of search range (ISO 8601)" },
153
- "duration": { "type": "number", "description": "Minimum slot duration in minutes" },
154
- "preferredStart": { "type": "string", "description": "Preferred earliest time (HH:MM, e.g., 08:00)" },
155
- "preferredEnd": { "type": "string", "description": "Preferred latest time (HH:MM, e.g., 17:00)" },
156
- "ignore_tentative": { "type": "boolean", "description": "If true, tentative events don't block slots (default: false)" }
157
- },
158
- "required": ["calendars", "start", "end", "duration"]
159
- }
250
+ "description": "Array of events to create"
251
+ }
252
+ },
253
+ "required": ["calendar", "events"]
254
+ }
255
+ },
256
+ {
257
+ "name": "import_ics",
258
+ "description": "Import events from iCalendar (.ics) content into a calendar.",
259
+ "inputSchema": {
260
+ "type": "object",
261
+ "properties": {
262
+ "calendar": {
263
+ "type": "string",
264
+ "description": "Provider-prefixed calendar ID"
265
+ },
266
+ "ics_content": {
267
+ "type": "string",
268
+ "description": "Raw iCalendar content string"
269
+ }
270
+ },
271
+ "required": ["calendar", "ics_content"]
272
+ }
273
+ },
274
+ {
275
+ "name": "find_free_slots",
276
+ "description": "Find available time slots across specified calendars. Returns free windows matching the requested duration.",
277
+ "inputSchema": {
278
+ "type": "object",
279
+ "properties": {
280
+ "calendars": {
281
+ "type": "array",
282
+ "items": { "type": "string" },
283
+ "description": "Provider-prefixed calendar IDs to check availability against. If omitted, uses all calendars."
284
+ },
285
+ "start": {
286
+ "type": "string",
287
+ "description": "Start of search range (ISO 8601)"
288
+ },
289
+ "end": {
290
+ "type": "string",
291
+ "description": "End of search range (ISO 8601)"
292
+ },
293
+ "duration": {
294
+ "type": "number",
295
+ "description": "Minimum slot duration in minutes"
296
+ },
297
+ "preferred_start": {
298
+ "type": "string",
299
+ "description": "Preferred earliest time (HH:MM, e.g., 08:00)"
300
+ },
301
+ "preferred_end": {
302
+ "type": "string",
303
+ "description": "Preferred latest time (HH:MM, e.g., 17:00)"
304
+ },
305
+ "exclude_calendars": {
306
+ "type": "array",
307
+ "items": { "type": "string" },
308
+ "description": "Calendar IDs to exclude from busy time calculation"
309
+ },
310
+ "include_all_day_as_busy": {
311
+ "type": "boolean",
312
+ "description": "Treat all-day events as busy (default: false)"
313
+ },
314
+ "ignore_tentative": {
315
+ "type": "boolean",
316
+ "description": "If true, tentative events don't block slots (default: false)"
317
+ }
318
+ },
319
+ "required": ["start", "end", "duration"]
160
320
  }
161
- ]
162
- }
321
+ }
322
+ ]
package/dist/ical.d.ts CHANGED
@@ -1,29 +1,34 @@
1
1
  export interface ParsedEvent {
2
2
  uid: string;
3
- summary: string;
3
+ title: string;
4
4
  start: string;
5
5
  end: string;
6
- location?: string;
7
- description?: string;
8
- status?: string;
9
- transparency?: string;
10
- attendees?: Array<{
11
- name?: string;
6
+ all_day: boolean;
7
+ location: string | null;
8
+ description: string | null;
9
+ status: string | null;
10
+ availability: string | null;
11
+ url: string | null;
12
+ attendees: Array<{
13
+ name: string | null;
12
14
  email: string;
13
- status?: string;
15
+ status: string | null;
16
+ role: string | null;
14
17
  }>;
15
- organizer?: {
16
- name?: string;
18
+ organizer: {
19
+ name: string | null;
17
20
  email: string;
18
- };
19
- recurrenceRule?: string;
20
- created?: string;
21
- lastModified?: string;
21
+ } | null;
22
+ recurrence_rule: string | null;
23
+ created: string | null;
24
+ last_modified: string | null;
25
+ is_recurring: boolean;
22
26
  }
23
27
  export interface EventCreateProps {
24
- summary: string;
28
+ title: string;
25
29
  start: string;
26
30
  end: string;
31
+ all_day?: boolean;
27
32
  location?: string;
28
33
  description?: string;
29
34
  attendees?: Array<{
@@ -1 +1 @@
1
- {"version":3,"file":"ical.d.ts","sourceRoot":"","sources":["../src/ical.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,WAAW;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,KAAK,CAAC;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACrE,SAAS,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;IAC7C,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACrD;AAED,wBAAgB,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,WAAW,EAAE,CAsDhE;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,gBAAgB,GAAG,M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MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACrD;AAED,wBAAgB,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,WAAW,EAAE,CAmEhE;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,gBAAgB,GAAG,MAAM,CAqBhE"}
package/dist/ical.js CHANGED
@@ -16,32 +16,44 @@ export function parseIcsEvents(icsContent) {
16
16
  const email = typeof att === "string"
17
17
  ? att.replace("mailto:", "")
18
18
  : (att.val || "").replace("mailto:", "");
19
- const name = typeof att === "string" ? undefined : att.params?.CN;
20
- attendees.push({ email, name });
19
+ const name = typeof att === "string" ? null : (att.params?.CN ?? null);
20
+ attendees.push({ email, name, status: null, role: null });
21
21
  }
22
22
  }
23
- let organizer;
23
+ let organizer = null;
24
24
  if (vevent.organizer) {
25
25
  const org = vevent.organizer;
26
26
  organizer = {
27
27
  email: (typeof org === "string" ? org : org.val || "").replace("mailto:", ""),
28
- name: typeof org === "string" ? undefined : org.params?.CN,
28
+ name: typeof org === "string" ? null : (org.params?.CN ?? null),
29
29
  };
30
30
  }
31
+ // Map transparency to availability
32
+ const rawTransparency = vevent.transparency?.toUpperCase();
33
+ let availability = null;
34
+ if (rawTransparency === "OPAQUE")
35
+ availability = "busy";
36
+ else if (rawTransparency === "TRANSPARENT")
37
+ availability = "free";
38
+ // Detect all-day: node-ical sets datetype to "date" for VALUE=DATE
39
+ const allDay = vevent.datetype === "date";
31
40
  events.push({
32
41
  uid: vevent.uid || "",
33
- summary: vevent.summary || "",
42
+ title: vevent.summary || "",
34
43
  start: vevent.start ? new Date(vevent.start).toISOString() : "",
35
44
  end: vevent.end ? new Date(vevent.end).toISOString() : "",
36
- location: vevent.location,
37
- description: vevent.description,
38
- status: vevent.status?.toUpperCase(),
39
- transparency: vevent.transparency?.toUpperCase(),
40
- attendees: attendees.length > 0 ? attendees : undefined,
41
- organizer,
42
- recurrenceRule: vevent.rrule?.toString(),
43
- created: vevent.created ? new Date(vevent.created).toISOString() : undefined,
44
- lastModified: vevent.lastmodified ? new Date(vevent.lastmodified).toISOString() : undefined,
45
+ all_day: allDay,
46
+ location: vevent.location ?? null,
47
+ description: vevent.description ?? null,
48
+ status: vevent.status ? vevent.status.toLowerCase() : null,
49
+ availability,
50
+ url: vevent.url ?? null,
51
+ attendees: attendees.length > 0 ? attendees : [],
52
+ organizer: organizer ?? null,
53
+ recurrence_rule: vevent.rrule?.toString() ?? null,
54
+ created: vevent.created ? new Date(vevent.created).toISOString() : null,
55
+ last_modified: vevent.lastmodified ? new Date(vevent.lastmodified).toISOString() : null,
56
+ is_recurring: !!vevent.rrule,
45
57
  });
46
58
  }
47
59
  return events;
@@ -51,8 +63,10 @@ export function generateEventIcs(props) {
51
63
  const eventOptions = {
52
64
  start: new Date(props.start),
53
65
  end: new Date(props.end),
54
- summary: props.summary,
66
+ summary: props.title,
55
67
  };
68
+ if (props.all_day)
69
+ eventOptions.allDay = true;
56
70
  if (props.location)
57
71
  eventOptions.location = props.location;
58
72
  if (props.description)
package/dist/ical.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"ical.js","sourceRoot":"","sources":["../src/ical.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,gBAAgB,CAAC;AAClC,OAAO,KAAK,QAAQ,MAAM,WAAW,CAAC;AA2BtC,MAAM,UAAU,cAAc,CAAC,UAAkB;IAC/C,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE;QAAE,OAAO,EAAE,CAAC;IAElC,MAAM,MAAM,GAAG,QAAQ,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;IAC7C,MAAM,MAAM,GAAkB,EAAE,CAAC;IAEjC,KAAK,MAAM,SAAS,IAAI,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;QAC9C,IAAI,SAAS,CAAC,IAAI,KAAK,QAAQ;YAAE,SAAS;QAC1C,MAAM,MAAM,GAAG,SAA4B,CAAC;QAE5C,MAAM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IAAI,EAAE,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC;QAC7D,CAAC;IACH,CAAC;IAED,OAAO,QAAQ,CAAC,QAAQ,EAAE,CAAC;AAC7B,CAAC"}
package/dist/main.js CHANGED
@@ -7,7 +7,7 @@ import { CALENDAR_TOOLS, handleCalendarTool } from "./tools/calendarTools.js";
7
7
  export async function createServer() {
8
8
  const config = loadCalDavConfig();
9
9
  const service = new CalDavService(config);
10
- const server = new Server({ name: "@miguelarios/cal-mcp", version: "0.1.0" }, { capabilities: { tools: {} } });
10
+ const server = new Server({ name: "@miguelarios/cal-mcp", version: "0.3.0" }, { capabilities: { tools: {} } });
11
11
  server.setRequestHandler(ListToolsRequestSchema, () => ({
12
12
  tools: CALENDAR_TOOLS,
13
13
  }));