@carven-time/mcp 0.1.1
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/__tests__/tools.test.d.ts +1 -0
- package/dist/__tests__/tools.test.js +157 -0
- package/dist/__tests__/tools.test.js.map +1 -0
- package/dist/auth.d.ts +12 -0
- package/dist/auth.js +299 -0
- package/dist/auth.js.map +1 -0
- package/dist/client.d.ts +12 -0
- package/dist/client.js +39 -0
- package/dist/client.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +36 -0
- package/dist/index.js.map +1 -0
- package/dist/tools.d.ts +352 -0
- package/dist/tools.js +366 -0
- package/dist/tools.js.map +1 -0
- package/package.json +39 -0
package/dist/tools.js
ADDED
|
@@ -0,0 +1,366 @@
|
|
|
1
|
+
import { api } from './client.js';
|
|
2
|
+
// ── Tool Definitions ─────────────────────────────────────────────
|
|
3
|
+
export const toolDefs = [
|
|
4
|
+
{
|
|
5
|
+
name: 'list_templates',
|
|
6
|
+
description: 'List all event templates for the authenticated user. Templates define event types with a title and duration, and are required when creating booking links.',
|
|
7
|
+
inputSchema: {
|
|
8
|
+
type: 'object',
|
|
9
|
+
properties: {},
|
|
10
|
+
required: [],
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
name: 'create_template',
|
|
15
|
+
description: 'Create a new event template. Templates define a type of meeting/event with a title and duration in minutes. You need a template ID to create booking links.',
|
|
16
|
+
inputSchema: {
|
|
17
|
+
type: 'object',
|
|
18
|
+
properties: {
|
|
19
|
+
title: { type: 'string', description: 'Template title (e.g., "Date Night", "1:1 Meeting")' },
|
|
20
|
+
duration_mins: { type: 'number', description: 'Duration in minutes (1-480)' },
|
|
21
|
+
},
|
|
22
|
+
required: ['title', 'duration_mins'],
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
name: 'update_template',
|
|
27
|
+
description: 'Update an existing event template\'s title or duration.',
|
|
28
|
+
inputSchema: {
|
|
29
|
+
type: 'object',
|
|
30
|
+
properties: {
|
|
31
|
+
template_id: { type: 'string', description: 'Template ID (UUID)' },
|
|
32
|
+
title: { type: 'string', description: 'New title' },
|
|
33
|
+
duration_mins: { type: 'number', description: 'New duration in minutes (1-480)' },
|
|
34
|
+
},
|
|
35
|
+
required: ['template_id'],
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
name: 'delete_template',
|
|
40
|
+
description: 'Delete an event template by ID.',
|
|
41
|
+
inputSchema: {
|
|
42
|
+
type: 'object',
|
|
43
|
+
properties: {
|
|
44
|
+
template_id: { type: 'string', description: 'Template ID (UUID)' },
|
|
45
|
+
},
|
|
46
|
+
required: ['template_id'],
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
name: 'check_availability',
|
|
51
|
+
description: 'Check available time slots for scheduling. Returns open slots respecting working hours, calendar busy times, buffer periods, and minimum notice. Use this before creating booking links.',
|
|
52
|
+
inputSchema: {
|
|
53
|
+
type: 'object',
|
|
54
|
+
properties: {
|
|
55
|
+
start_date: { type: 'string', description: 'Start date (YYYY-MM-DD)' },
|
|
56
|
+
end_date: { type: 'string', description: 'End date (YYYY-MM-DD). Defaults to start_date. Max 14-day range.' },
|
|
57
|
+
template_id: { type: 'string', description: 'Event template ID — uses its duration if provided.' },
|
|
58
|
+
duration_mins: { type: 'number', description: 'Slot duration in minutes (default 30). Ignored if template_id is set.' },
|
|
59
|
+
},
|
|
60
|
+
required: ['start_date'],
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
name: 'create_booking_link',
|
|
65
|
+
description: 'Create one or more magic links for specific time slots. Each link is a unique URL that a person can visit to confirm the booking. The booking creates a Google Calendar event for both parties.',
|
|
66
|
+
inputSchema: {
|
|
67
|
+
type: 'object',
|
|
68
|
+
properties: {
|
|
69
|
+
template_id: { type: 'string', description: 'Event template ID (UUID)' },
|
|
70
|
+
timeslots: {
|
|
71
|
+
type: 'array',
|
|
72
|
+
items: {
|
|
73
|
+
type: 'object',
|
|
74
|
+
properties: {
|
|
75
|
+
start_time: { type: 'string', description: 'ISO 8601 datetime' },
|
|
76
|
+
end_time: { type: 'string', description: 'ISO 8601 datetime' },
|
|
77
|
+
},
|
|
78
|
+
required: ['start_time', 'end_time'],
|
|
79
|
+
},
|
|
80
|
+
description: 'Time slots to create links for (1-50)',
|
|
81
|
+
},
|
|
82
|
+
recipient_name: { type: 'string', description: 'Name of the person being invited' },
|
|
83
|
+
recipient_email: { type: 'string', description: 'Email of the person being invited' },
|
|
84
|
+
message: { type: 'string', description: 'Optional message to include' },
|
|
85
|
+
},
|
|
86
|
+
required: ['template_id', 'timeslots'],
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
name: 'get_booking_status',
|
|
91
|
+
description: 'Check the status of a booking by ID. Returns CONFIRMED or CANCELLED with details including guest email, time, and Google Calendar event ID.',
|
|
92
|
+
inputSchema: {
|
|
93
|
+
type: 'object',
|
|
94
|
+
properties: {
|
|
95
|
+
booking_id: { type: 'string', description: 'Booking ID (UUID)' },
|
|
96
|
+
},
|
|
97
|
+
required: ['booking_id'],
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
name: 'get_signup_sheet',
|
|
102
|
+
description: 'Get a published sign-up sheet with all slots and remaining capacity. Use this to see what slots are available before claiming one.',
|
|
103
|
+
inputSchema: {
|
|
104
|
+
type: 'object',
|
|
105
|
+
properties: {
|
|
106
|
+
sheet_id: { type: 'string', description: 'Sign-up sheet ID (UUID)' },
|
|
107
|
+
},
|
|
108
|
+
required: ['sheet_id'],
|
|
109
|
+
},
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
name: 'claim_signup_slot',
|
|
113
|
+
description: 'Claim a slot on a published sign-up sheet on behalf of a person. Enforces capacity limits and prevents duplicate claims by email.',
|
|
114
|
+
inputSchema: {
|
|
115
|
+
type: 'object',
|
|
116
|
+
properties: {
|
|
117
|
+
sheet_id: { type: 'string', description: 'Sign-up sheet ID (UUID)' },
|
|
118
|
+
slot_id: { type: 'string', description: 'Slot ID (UUID)' },
|
|
119
|
+
claimant_name: { type: 'string', description: 'Full name of the person claiming the slot' },
|
|
120
|
+
claimant_email: { type: 'string', description: 'Email of the person claiming the slot' },
|
|
121
|
+
claimant_phone: { type: 'string', description: 'Phone number (optional)' },
|
|
122
|
+
custom_field_responses: {
|
|
123
|
+
type: 'object',
|
|
124
|
+
additionalProperties: { type: 'string' },
|
|
125
|
+
description: 'Responses to custom fields, keyed by field ID',
|
|
126
|
+
},
|
|
127
|
+
},
|
|
128
|
+
required: ['sheet_id', 'slot_id', 'claimant_name', 'claimant_email'],
|
|
129
|
+
},
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
name: 'get_round',
|
|
133
|
+
description: 'Get details of a group coordination round, including the availability heat map showing how many people are available in each time block. Use this to find the best meeting time for a group.',
|
|
134
|
+
inputSchema: {
|
|
135
|
+
type: 'object',
|
|
136
|
+
properties: {
|
|
137
|
+
round_id: { type: 'string', description: 'Round ID (UUID)' },
|
|
138
|
+
},
|
|
139
|
+
required: ['round_id'],
|
|
140
|
+
},
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
name: 'submit_availability',
|
|
144
|
+
description: 'Submit availability for a group coordination round. Each time block can be marked as PREFERRED, AVAILABLE, or UNAVAILABLE. Merges with any existing response.',
|
|
145
|
+
inputSchema: {
|
|
146
|
+
type: 'object',
|
|
147
|
+
properties: {
|
|
148
|
+
round_id: { type: 'string', description: 'Round ID (UUID)' },
|
|
149
|
+
availability: {
|
|
150
|
+
type: 'object',
|
|
151
|
+
additionalProperties: { type: 'string', enum: ['PREFERRED', 'AVAILABLE', 'UNAVAILABLE'] },
|
|
152
|
+
description: 'Map of ISO datetime keys to availability state for each 30-min block',
|
|
153
|
+
},
|
|
154
|
+
guest_name: { type: 'string', description: 'For guest submissions — name of the participant' },
|
|
155
|
+
guest_email: { type: 'string', description: 'For guest submissions — email of the participant' },
|
|
156
|
+
is_flexible: { type: 'boolean', description: 'If true, indicates the person is flexible on all times' },
|
|
157
|
+
},
|
|
158
|
+
required: ['round_id', 'availability'],
|
|
159
|
+
},
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
name: 'get_working_hours',
|
|
163
|
+
description: 'Get the user\'s configured working hours. Returns the recurring weekly schedule that defines when the user is available for bookings (e.g., Monday 09:00–17:00).',
|
|
164
|
+
inputSchema: {
|
|
165
|
+
type: 'object',
|
|
166
|
+
properties: {},
|
|
167
|
+
required: [],
|
|
168
|
+
},
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
name: 'set_working_hours',
|
|
172
|
+
description: 'Set the user\'s weekly working hours. Each entry specifies a day of week (0=Sunday, 6=Saturday) and a start/end time in HH:MM format. Upserts entries — existing days are updated, new days are created.',
|
|
173
|
+
inputSchema: {
|
|
174
|
+
type: 'object',
|
|
175
|
+
properties: {
|
|
176
|
+
hours: {
|
|
177
|
+
type: 'array',
|
|
178
|
+
items: {
|
|
179
|
+
type: 'object',
|
|
180
|
+
properties: {
|
|
181
|
+
day_of_week: { type: 'number', description: '0=Sunday, 1=Monday, ..., 6=Saturday' },
|
|
182
|
+
start_time: { type: 'string', description: 'HH:MM format (e.g., "09:00")' },
|
|
183
|
+
end_time: { type: 'string', description: 'HH:MM format (e.g., "17:00")' },
|
|
184
|
+
},
|
|
185
|
+
required: ['day_of_week', 'start_time', 'end_time'],
|
|
186
|
+
},
|
|
187
|
+
description: 'Array of working hour entries (max 7, one per day)',
|
|
188
|
+
},
|
|
189
|
+
},
|
|
190
|
+
required: ['hours'],
|
|
191
|
+
},
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
name: 'delete_working_hours_day',
|
|
195
|
+
description: 'Remove working hours for a specific day of the week. This makes the user unavailable on that day.',
|
|
196
|
+
inputSchema: {
|
|
197
|
+
type: 'object',
|
|
198
|
+
properties: {
|
|
199
|
+
day_of_week: { type: 'number', description: '0=Sunday, 1=Monday, ..., 6=Saturday' },
|
|
200
|
+
},
|
|
201
|
+
required: ['day_of_week'],
|
|
202
|
+
},
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
name: 'get_date_overrides',
|
|
206
|
+
description: 'Get all date-specific overrides. Overrides take precedence over weekly working hours — they can block a date entirely or set custom hours for a specific date.',
|
|
207
|
+
inputSchema: {
|
|
208
|
+
type: 'object',
|
|
209
|
+
properties: {},
|
|
210
|
+
required: [],
|
|
211
|
+
},
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
name: 'set_date_overrides',
|
|
215
|
+
description: 'Create or update date-specific availability overrides. Use is_blocked=true to mark a date as unavailable, or is_blocked=false with start_time/end_time for custom hours on that date.',
|
|
216
|
+
inputSchema: {
|
|
217
|
+
type: 'object',
|
|
218
|
+
properties: {
|
|
219
|
+
overrides: {
|
|
220
|
+
type: 'array',
|
|
221
|
+
items: {
|
|
222
|
+
type: 'object',
|
|
223
|
+
properties: {
|
|
224
|
+
date: { type: 'string', description: 'Date in YYYY-MM-DD format' },
|
|
225
|
+
is_blocked: { type: 'boolean', description: 'true = entire day blocked, false = custom hours' },
|
|
226
|
+
start_time: { type: 'string', description: 'HH:MM (required when is_blocked=false)' },
|
|
227
|
+
end_time: { type: 'string', description: 'HH:MM (required when is_blocked=false)' },
|
|
228
|
+
},
|
|
229
|
+
required: ['date', 'is_blocked'],
|
|
230
|
+
},
|
|
231
|
+
description: 'Array of date overrides (max 90)',
|
|
232
|
+
},
|
|
233
|
+
},
|
|
234
|
+
required: ['overrides'],
|
|
235
|
+
},
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
name: 'delete_date_override',
|
|
239
|
+
description: 'Remove a date-specific override, reverting that date back to the regular weekly working hours.',
|
|
240
|
+
inputSchema: {
|
|
241
|
+
type: 'object',
|
|
242
|
+
properties: {
|
|
243
|
+
date: { type: 'string', description: 'Date in YYYY-MM-DD format' },
|
|
244
|
+
},
|
|
245
|
+
required: ['date'],
|
|
246
|
+
},
|
|
247
|
+
},
|
|
248
|
+
];
|
|
249
|
+
function textResult(data) {
|
|
250
|
+
return { content: [{ type: 'text', text: JSON.stringify(data, null, 2) }] };
|
|
251
|
+
}
|
|
252
|
+
function errorResult(message) {
|
|
253
|
+
return { content: [{ type: 'text', text: JSON.stringify({ error: message }) }] };
|
|
254
|
+
}
|
|
255
|
+
export async function handleTool(name, args) {
|
|
256
|
+
try {
|
|
257
|
+
switch (name) {
|
|
258
|
+
case 'list_templates': {
|
|
259
|
+
const data = await api.get('/v1/templates');
|
|
260
|
+
return textResult(data);
|
|
261
|
+
}
|
|
262
|
+
case 'create_template': {
|
|
263
|
+
const data = await api.post('/v1/templates', {
|
|
264
|
+
title: args.title,
|
|
265
|
+
duration_mins: args.duration_mins,
|
|
266
|
+
});
|
|
267
|
+
return textResult(data);
|
|
268
|
+
}
|
|
269
|
+
case 'update_template': {
|
|
270
|
+
const body = {};
|
|
271
|
+
if (args.title)
|
|
272
|
+
body.title = args.title;
|
|
273
|
+
if (args.duration_mins)
|
|
274
|
+
body.duration_mins = args.duration_mins;
|
|
275
|
+
const data = await api.patch(`/v1/templates/${args.template_id}`, body);
|
|
276
|
+
return textResult(data);
|
|
277
|
+
}
|
|
278
|
+
case 'delete_template': {
|
|
279
|
+
await api.delete(`/v1/templates/${args.template_id}`);
|
|
280
|
+
return textResult({ ok: true, deleted_template: args.template_id });
|
|
281
|
+
}
|
|
282
|
+
case 'check_availability': {
|
|
283
|
+
const params = new URLSearchParams({ start_date: args.start_date });
|
|
284
|
+
if (args.end_date)
|
|
285
|
+
params.set('end_date', args.end_date);
|
|
286
|
+
if (args.template_id)
|
|
287
|
+
params.set('template_id', args.template_id);
|
|
288
|
+
if (args.duration_mins)
|
|
289
|
+
params.set('duration_mins', String(args.duration_mins));
|
|
290
|
+
const data = await api.get(`/v1/availability?${params}`);
|
|
291
|
+
return textResult(data);
|
|
292
|
+
}
|
|
293
|
+
case 'create_booking_link': {
|
|
294
|
+
const data = await api.post('/v1/links', {
|
|
295
|
+
template_id: args.template_id,
|
|
296
|
+
timeslots: args.timeslots,
|
|
297
|
+
recipient_name: args.recipient_name,
|
|
298
|
+
recipient_email: args.recipient_email,
|
|
299
|
+
message: args.message,
|
|
300
|
+
});
|
|
301
|
+
return textResult(data);
|
|
302
|
+
}
|
|
303
|
+
case 'get_booking_status': {
|
|
304
|
+
const data = await api.get(`/v1/bookings/${args.booking_id}`);
|
|
305
|
+
return textResult(data);
|
|
306
|
+
}
|
|
307
|
+
case 'get_signup_sheet': {
|
|
308
|
+
const data = await api.get(`/v1/sheets/${args.sheet_id}`);
|
|
309
|
+
return textResult(data);
|
|
310
|
+
}
|
|
311
|
+
case 'claim_signup_slot': {
|
|
312
|
+
const data = await api.post(`/v1/sheets/${args.sheet_id}/claims`, {
|
|
313
|
+
slot_id: args.slot_id,
|
|
314
|
+
claimant_name: args.claimant_name,
|
|
315
|
+
claimant_email: args.claimant_email,
|
|
316
|
+
claimant_phone: args.claimant_phone,
|
|
317
|
+
custom_field_responses: args.custom_field_responses,
|
|
318
|
+
});
|
|
319
|
+
return textResult(data);
|
|
320
|
+
}
|
|
321
|
+
case 'get_round': {
|
|
322
|
+
const data = await api.get(`/v1/rounds/${args.round_id}`);
|
|
323
|
+
return textResult(data);
|
|
324
|
+
}
|
|
325
|
+
case 'submit_availability': {
|
|
326
|
+
const data = await api.post(`/v1/rounds/${args.round_id}/availability`, {
|
|
327
|
+
availability: args.availability,
|
|
328
|
+
guest_name: args.guest_name,
|
|
329
|
+
guest_email: args.guest_email,
|
|
330
|
+
is_flexible: args.is_flexible,
|
|
331
|
+
});
|
|
332
|
+
return textResult(data);
|
|
333
|
+
}
|
|
334
|
+
case 'get_working_hours': {
|
|
335
|
+
const data = await api.get('/v1/working-hours');
|
|
336
|
+
return textResult(data);
|
|
337
|
+
}
|
|
338
|
+
case 'set_working_hours': {
|
|
339
|
+
const data = await api.put('/v1/working-hours', { hours: args.hours });
|
|
340
|
+
return textResult(data);
|
|
341
|
+
}
|
|
342
|
+
case 'delete_working_hours_day': {
|
|
343
|
+
await api.delete(`/v1/working-hours/${args.day_of_week}`);
|
|
344
|
+
return textResult({ ok: true, deleted_day: args.day_of_week });
|
|
345
|
+
}
|
|
346
|
+
case 'get_date_overrides': {
|
|
347
|
+
const data = await api.get('/v1/date-overrides');
|
|
348
|
+
return textResult(data);
|
|
349
|
+
}
|
|
350
|
+
case 'set_date_overrides': {
|
|
351
|
+
const data = await api.put('/v1/date-overrides', { overrides: args.overrides });
|
|
352
|
+
return textResult(data);
|
|
353
|
+
}
|
|
354
|
+
case 'delete_date_override': {
|
|
355
|
+
await api.delete(`/v1/date-overrides/${args.date}`);
|
|
356
|
+
return textResult({ ok: true, deleted_date: args.date });
|
|
357
|
+
}
|
|
358
|
+
default:
|
|
359
|
+
return errorResult(`Unknown tool: ${name}`);
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
catch (err) {
|
|
363
|
+
return errorResult(err.message ?? String(err));
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
//# sourceMappingURL=tools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tools.js","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAA;AAEjC,oEAAoE;AAEpE,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB;QACE,IAAI,EAAE,gBAAgB;QACtB,WAAW,EACT,4JAA4J;QAC9J,WAAW,EAAE;YACX,IAAI,EAAE,QAAiB;YACvB,UAAU,EAAE,EAAE;YACd,QAAQ,EAAE,EAAc;SACzB;KACF;IACD;QACE,IAAI,EAAE,iBAAiB;QACvB,WAAW,EACT,6JAA6J;QAC/J,WAAW,EAAE;YACX,IAAI,EAAE,QAAiB;YACvB,UAAU,EAAE;gBACV,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,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AAA;YACzB,CAAC;YAED,KAAK,oBAAoB,CAAC,CAAC,CAAC;gBAC1B,MAAM,IAAI,GAAG,MAAM,GAAG,CAAC,GAAG,CAAC,oBAAoB,EAAE,EAAE,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,CAAC,CAAA;gBAC/E,OAAO,UAAU,CAAC,IAAI,CAAC,CAAA;YACzB,CAAC;YAED,KAAK,sBAAsB,CAAC,CAAC,CAAC;gBAC5B,MAAM,GAAG,CAAC,MAAM,CAAC,sBAAsB,IAAI,CAAC,IAAI,EAAE,CAAC,CAAA;gBACnD,OAAO,UAAU,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,CAAA;YAC1D,CAAC;YAED;gBACE,OAAO,WAAW,CAAC,iBAAiB,IAAI,EAAE,CAAC,CAAA;QAC/C,CAAC;IACH,CAAC;IAAC,OAAO,GAAQ,EAAE,CAAC;QAClB,OAAO,WAAW,CAAC,GAAG,CAAC,OAAO,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAA;IAChD,CAAC;AACH,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@carven-time/mcp",
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "Carven MCP server — scheduling tools for AI assistants",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"carven-mcp": "./dist/index.js"
|
|
8
|
+
},
|
|
9
|
+
"main": "./dist/index.js",
|
|
10
|
+
"files": [
|
|
11
|
+
"dist"
|
|
12
|
+
],
|
|
13
|
+
"scripts": {
|
|
14
|
+
"build": "tsc",
|
|
15
|
+
"dev": "tsc --watch",
|
|
16
|
+
"start": "node dist/index.js",
|
|
17
|
+
"test": "vitest run",
|
|
18
|
+
"test:watch": "vitest"
|
|
19
|
+
},
|
|
20
|
+
"keywords": [
|
|
21
|
+
"mcp",
|
|
22
|
+
"model-context-protocol",
|
|
23
|
+
"carven",
|
|
24
|
+
"scheduling",
|
|
25
|
+
"ai-agent",
|
|
26
|
+
"calendar"
|
|
27
|
+
],
|
|
28
|
+
"license": "MIT",
|
|
29
|
+
"dependencies": {
|
|
30
|
+
"@modelcontextprotocol/sdk": "^1.12.1",
|
|
31
|
+
"open": "^10.1.0",
|
|
32
|
+
"zod": "^3.23.8"
|
|
33
|
+
},
|
|
34
|
+
"devDependencies": {
|
|
35
|
+
"@types/node": "^22.15.3",
|
|
36
|
+
"typescript": "^5.4.5",
|
|
37
|
+
"vitest": "^4.1.2"
|
|
38
|
+
}
|
|
39
|
+
}
|