@edubase/mcp 1.0.23 → 1.1.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,611 +1,227 @@
1
- /* Tool definitions */
1
+ import * as z from 'zod/v4';
2
2
  export const EDUBASE_API_TOOLS_USERS = [
3
3
  // GET /users - List managed, non-generated users
4
4
  {
5
5
  name: 'edubase_get_users',
6
- description: "List managed, non-generated users.",
7
- inputSchema: {
8
- type: 'object',
9
- properties: {
10
- search: {
11
- type: 'string',
12
- description: 'search string to filter results',
13
- },
14
- limit: {
15
- type: 'number',
16
- description: 'limit number of results (default: 16)',
17
- },
18
- page: {
19
- type: 'number',
20
- description: 'page number (default: 1), not used in search mode!',
21
- },
22
- },
23
- required: [],
24
- },
6
+ description: 'List managed, non-generated users.',
7
+ inputSchema: z.object({
8
+ search: z.string().describe('search string to filter results').optional(),
9
+ limit: z.number().describe('limit number of results (default: 16)').optional(),
10
+ page: z.number().describe('page number (default: 1), not used in search mode!').optional(),
11
+ }),
12
+ outputSchema: z.array(z.object({
13
+ user: z.string().describe('user identification string'),
14
+ name: z.string().describe('full name of the user'),
15
+ })),
25
16
  },
26
17
  // GET /user:me - Get/check current user
27
18
  {
28
19
  name: 'edubase_get_user_me',
29
- description: "Get/check current user.",
30
- inputSchema: {
31
- type: 'object',
32
- properties: {
33
- user: {
34
- type: 'string',
35
- description: "User identification string.\n" +
36
- "- Use 'me' to get the current user."
37
- },
38
- },
39
- required: ['user'],
40
- },
20
+ description: 'Get/check current user.',
21
+ inputSchema: z.object({}).optional(),
22
+ outputSchema: z.object({
23
+ user: z.string().describe('user identification string'),
24
+ name: z.string().describe('full name'),
25
+ status: z.boolean().describe('user is enabled'),
26
+ exam: z.boolean().describe('exam (generated) account'),
27
+ }),
41
28
  },
42
29
  // GET /user - Get/check user
43
30
  {
44
31
  name: 'edubase_get_user',
45
- description: "Get/check user.",
46
- inputSchema: {
47
- type: 'object',
48
- properties: {
49
- user: {
50
- type: 'string',
51
- description: "User identification string.\n" +
52
- "- Use 'me' to get the current user, but prefer /user:me endpoint instead."
53
- },
54
- },
55
- required: ['user'],
56
- },
32
+ description: 'Get/check user.',
33
+ inputSchema: z.object({
34
+ user: z.string().describe("User identification string. Use 'me' to get the current user, but prefer /user:me endpoint instead."),
35
+ }),
36
+ outputSchema: z.object({
37
+ user: z.string().describe('user identification string'),
38
+ name: z.string().describe('full name'),
39
+ status: z.boolean().describe('user is enabled'),
40
+ exam: z.boolean().describe('exam (generated) account'),
41
+ }),
57
42
  },
58
43
  // POST /user - Create new user account
59
44
  {
60
45
  name: 'edubase_post_user',
61
- description: "Create new EduBase user account.",
62
- inputSchema: {
63
- type: 'object',
64
- properties: {
65
- username: {
66
- type: 'string',
67
- description: 'username (4-64 characters)',
68
- },
69
- password: {
70
- type: 'string',
71
- description: 'password (4-64 characters) (default: initial random password is automatically generated)',
72
- },
73
- first_name: {
74
- type: 'string',
75
- description: 'first name (1-64 characters)',
76
- },
77
- last_name: {
78
- type: 'string',
79
- description: 'last name (1-64 characters)',
80
- },
81
- full_name: {
82
- type: 'string',
83
- description: 'override automatic full name (1-255 characters)',
84
- },
85
- display_name: {
86
- type: 'string',
87
- description: 'override automatic display name (1-255 characters)',
88
- },
89
- email: {
90
- type: 'string',
91
- description: 'valid email address',
92
- },
93
- phone: {
94
- type: 'string',
95
- description: 'valid phone number in format "+prefix number" without special characters',
96
- },
97
- gender: {
98
- type: 'string',
99
- description: 'gender ("male", "female", or "other")',
100
- },
101
- birthdate: {
102
- type: 'string',
103
- description: 'date of birth',
104
- },
105
- exam: {
106
- type: 'boolean',
107
- description: 'user is only allowed to login when accessing exams (default: false)',
108
- },
109
- group: {
110
- type: 'string',
111
- description: 'name of the user group',
112
- },
113
- template: {
114
- type: 'string',
115
- description: 'a template ID for the new account (default: none)',
116
- },
117
- language: {
118
- type: 'string',
119
- description: 'desired account language (default: API application owner\'s language)',
120
- },
121
- timezone: {
122
- type: 'string',
123
- description: 'desired timezone (default: API application owner\'s timezone)',
124
- },
125
- color: {
126
- type: 'string',
127
- description: 'desired favorite color (default/branding/red/blue/yellow/green/purple) (default: default)',
128
- },
129
- must_change_password: {
130
- type: 'boolean',
131
- description: 'user is forced to change password on first login (default: false)',
132
- },
133
- notify: {
134
- type: 'boolean',
135
- description: 'notify user via email (or SMS) (default: false)',
136
- },
137
- },
138
- required: ['username', 'first_name', 'last_name', 'email'],
139
- },
46
+ description: 'Create new EduBase user account.',
47
+ inputSchema: z.object({
48
+ username: z.string().describe('username (4-64 characters)'),
49
+ password: z.string().describe('password (4-64 characters) (default: initial random password is automatically generated)').optional(),
50
+ first_name: z.string().describe('first name (1-64 characters)'),
51
+ last_name: z.string().describe('last name (1-64 characters)'),
52
+ full_name: z.string().describe('override automatic full name (1-255 characters)').optional(),
53
+ display_name: z.string().describe('override automatic display name (1-255 characters)').optional(),
54
+ email: z.email().describe('valid email address'),
55
+ phone: z.string().describe('valid phone number in format "+prefix number" without special characters').optional(),
56
+ gender: z.string().describe('gender ("male", "female", or "other")').optional(),
57
+ birthdate: z.string().describe('date of birth').optional(),
58
+ exam: z.boolean().describe('user is only allowed to login when accessing exams (default: false)').optional(),
59
+ group: z.string().describe('name of the user group').optional(),
60
+ template: z.string().describe('a template ID for the new account (default: none)').optional(),
61
+ language: z.string().describe("desired account language (default: API application owner's language)").optional(),
62
+ timezone: z.string().describe("desired timezone (default: API application owner's timezone)").optional(),
63
+ color: z.string().describe('desired favorite color (default/branding/red/blue/yellow/green/purple) (default: default)').optional(),
64
+ must_change_password: z.boolean().describe('user is forced to change password on first login (default: false)').optional(),
65
+ notify: z.boolean().describe('notify user via email (or SMS) (default: false)').optional(),
66
+ }),
67
+ outputSchema: z.object({
68
+ user: z.string().describe('user identification string'),
69
+ username: z.string().describe('username, only if exam=false').optional(),
70
+ password: z.string().describe('password, only if exam=false').optional(),
71
+ }),
140
72
  },
141
73
  // PATCH /user - Update user
142
74
  {
143
75
  name: 'edubase_patch_user',
144
- description: "Update user.",
145
- inputSchema: {
146
- type: 'object',
147
- properties: {
148
- user: {
149
- type: 'string',
150
- description: 'user identification string',
151
- },
152
- active: {
153
- type: 'boolean',
154
- description: 'enable or disable user',
155
- },
156
- },
157
- required: ['user'],
158
- },
76
+ description: 'Update user.',
77
+ inputSchema: z.object({
78
+ user: z.string().describe('user identification string'),
79
+ active: z.boolean().describe('enable or disable user').optional(),
80
+ }),
81
+ outputSchema: z.object({}).optional(),
159
82
  },
160
83
  // DELETE /user - Delete user
161
84
  {
162
85
  name: 'edubase_delete_user',
163
- description: "Delete user.",
164
- inputSchema: {
165
- type: 'object',
166
- properties: {
167
- user: {
168
- type: 'string',
169
- description: 'user identification string',
170
- },
171
- },
172
- required: ['user'],
173
- },
86
+ description: 'Delete user.',
87
+ inputSchema: z.object({
88
+ user: z.string().describe('user identification string'),
89
+ }),
90
+ outputSchema: z.object({}).optional(),
174
91
  },
175
92
  // GET /user:name - Get user's name
176
93
  {
177
94
  name: 'edubase_get_user_name',
178
95
  description: "Get user's name.",
179
- inputSchema: {
180
- type: 'object',
181
- properties: {
182
- user: {
183
- type: 'string',
184
- description: 'user identification string',
185
- },
186
- },
187
- required: ['user'],
188
- },
96
+ inputSchema: z.object({
97
+ user: z.string().describe('user identification string'),
98
+ }),
99
+ outputSchema: z.object({
100
+ user: z.string().describe('the user identification string'),
101
+ first_name: z.string().describe('first name'),
102
+ last_name: z.string().describe('last name'),
103
+ full_name: z.string().describe('full name'),
104
+ display_name: z.string().describe('display name'),
105
+ }),
189
106
  },
190
107
  // POST /user:name - Update a user's name
191
108
  {
192
109
  name: 'edubase_post_user_name',
193
110
  description: "Update a user's name.",
194
- inputSchema: {
195
- type: 'object',
196
- properties: {
197
- user: {
198
- type: 'string',
199
- description: 'user identification string',
200
- },
201
- first_name: {
202
- type: 'string',
203
- description: 'first name (1-64 characters)',
204
- },
205
- last_name: {
206
- type: 'string',
207
- description: 'last name (1-64 characters)',
208
- },
209
- full_name: {
210
- type: 'string',
211
- description: 'full name (1-255 characters)',
212
- },
213
- display_name: {
214
- type: 'string',
215
- description: 'display name (1-255 characters)',
216
- },
217
- },
218
- required: ['user', 'first_name', 'last_name'],
219
- },
111
+ inputSchema: z.object({
112
+ user: z.string().describe('user identification string'),
113
+ first_name: z.string().describe('first name (1-64 characters)'),
114
+ last_name: z.string().describe('last name (1-64 characters)'),
115
+ full_name: z.string().describe('full name (1-255 characters)').optional(),
116
+ display_name: z.string().describe('display name (1-255 characters)').optional(),
117
+ }),
118
+ outputSchema: z.object({
119
+ user: z.string().describe('the user identification string'),
120
+ success: z.boolean().describe('operation is successful'),
121
+ changed: z.boolean().describe('name has been changed'),
122
+ }),
220
123
  },
221
124
  // GET /user:group - Get user's group
222
125
  {
223
126
  name: 'edubase_get_user_group',
224
127
  description: "Get user's group.",
225
- inputSchema: {
226
- type: 'object',
227
- properties: {
228
- user: {
229
- type: 'string',
230
- description: 'user identification string',
231
- },
232
- },
233
- required: ['user'],
234
- },
128
+ inputSchema: z.object({
129
+ user: z.string().describe('user identification string'),
130
+ }),
131
+ outputSchema: z.object({
132
+ user: z.string().describe('the user identification string'),
133
+ group: z.string().describe('user group code'),
134
+ }),
235
135
  },
236
136
  // POST /user:group - Update a user's group
237
137
  {
238
138
  name: 'edubase_post_user_group',
239
139
  description: "Update a user's group.",
240
- inputSchema: {
241
- type: 'object',
242
- properties: {
243
- user: {
244
- type: 'string',
245
- description: 'user identification string',
246
- },
247
- group: {
248
- type: 'string',
249
- description: 'user group code',
250
- },
251
- },
252
- required: ['user', 'group'],
253
- },
140
+ inputSchema: z.object({
141
+ user: z.string().describe('user identification string'),
142
+ group: z.string().describe('user group code'),
143
+ }),
144
+ outputSchema: z.object({
145
+ user: z.string().describe('the user identification string'),
146
+ success: z.boolean().describe('operation is successful'),
147
+ changed: z.boolean().describe('group has been changed'),
148
+ }),
254
149
  },
255
150
  // GET /user:login - Get latest valid login link for user
256
151
  {
257
152
  name: 'edubase_get_user_login',
258
- description: "Get latest valid login link for user.",
259
- inputSchema: {
260
- type: 'object',
261
- properties: {
262
- user: {
263
- type: 'string',
264
- description: 'user identification string',
265
- },
266
- },
267
- required: ['user'],
268
- },
153
+ description: 'Get latest valid login link for user.',
154
+ inputSchema: z.object({
155
+ user: z.string().describe('user identification string'),
156
+ }),
157
+ outputSchema: z.object({
158
+ user: z.string().describe('the user identification string'),
159
+ url: z.url().describe('the login link'),
160
+ valid: z.string().describe('validity (end of day) of the generated link'),
161
+ }),
269
162
  },
270
163
  // POST /user:login - Generate login link
271
164
  {
272
165
  name: 'edubase_post_user_login',
273
- description: "Generate login link. If a valid link with the same settings exists, it will be returned instead of creating a new one.",
274
- inputSchema: {
275
- type: 'object',
276
- properties: {
277
- user: {
278
- type: 'string',
279
- description: 'user identification string',
280
- },
281
- redirect: {
282
- type: 'string',
283
- description: 'redirect after a successful login (URI path or [{content_type}:{tag}])',
284
- },
285
- expires: {
286
- type: 'string',
287
- description: 'expiry in days (1-30) or YYYY-MM-DD (default: 1 day)',
288
- },
289
- logins: {
290
- type: 'number',
291
- description: 'total count the link can be used to login users (default: 1)',
292
- },
293
- template: {
294
- type: 'string',
295
- description: 'a template ID for the login link',
296
- },
297
- short: {
298
- type: 'boolean',
299
- description: 'generate shortened (eduba.se) link (only if feature is enabled on EduBase) (default: false)',
300
- },
301
- },
302
- required: ['user'],
303
- },
166
+ description: 'Generate login link. If a valid link with the same settings exists, it will be returned instead of creating a new one.',
167
+ inputSchema: z.object({
168
+ user: z.string().describe('user identification string'),
169
+ redirect: z.string().describe('redirect after a successful login (URI path or [{content_type}:{tag}])').optional(),
170
+ expires: z.string().describe('expiry in days (1-30) or YYYY-MM-DD (default: 1 day)').optional(),
171
+ logins: z.number().describe('total count the link can be used to login users (default: 1)').optional(),
172
+ template: z.string().describe('a template ID for the login link').optional(),
173
+ short: z.boolean().describe('generate shortened (eduba.se) link (only if feature is enabled on EduBase) (default: false)').optional(),
174
+ }),
175
+ outputSchema: z.object({
176
+ user: z.string().describe('the user identification string'),
177
+ url: z.url().describe('the login link'),
178
+ valid: z.string().describe('validity of the generated link'),
179
+ count: z.number().describe('maximum number the link can be used to login'),
180
+ }),
304
181
  },
305
182
  // DELETE /user:login - Delete a previously generated login link
306
183
  {
307
184
  name: 'edubase_delete_user_login',
308
- description: "Delete a previously generated login link.",
309
- inputSchema: {
310
- type: 'object',
311
- properties: {
312
- user: {
313
- type: 'string',
314
- description: 'user identification string',
315
- },
316
- url: {
317
- type: 'string',
318
- description: 'generated login link to be invalidated',
319
- },
320
- },
321
- required: ['user', 'url'],
322
- },
185
+ description: 'Delete a previously generated login link.',
186
+ inputSchema: z.object({
187
+ user: z.string().describe('user identification string'),
188
+ url: z.url().describe('generated login link to be invalidated'),
189
+ }),
190
+ outputSchema: z.object({}).optional(),
323
191
  },
324
192
  // GET /user:search - Lookup user by email, username or code
325
193
  {
326
194
  name: 'edubase_get_user_search',
327
- description: "Lookup user by email, username or code.",
328
- inputSchema: {
329
- type: 'object',
330
- properties: {
331
- query: {
332
- type: 'string',
333
- description: 'query string',
334
- },
335
- },
336
- required: ['query'],
337
- },
195
+ description: 'Lookup user by email, username or code.',
196
+ inputSchema: z.object({
197
+ query: z.string().describe('query string'),
198
+ }),
199
+ outputSchema: z.object({
200
+ user: z.string().describe('user identification string'),
201
+ exam: z.boolean().describe('exam (generated) account'),
202
+ }),
338
203
  },
339
204
  // POST /user:assume - Assume user for next requests with assume token
340
205
  {
341
206
  name: 'edubase_post_user_assume',
342
- description: "Assume user for next requests with assume token.",
343
- inputSchema: {
344
- type: 'object',
345
- properties: {
346
- user: {
347
- type: 'string',
348
- description: 'user identification string, username or email address',
349
- },
350
- password: {
351
- type: 'string',
352
- description: 'password or user secret',
353
- },
354
- },
355
- required: ['user'],
356
- },
207
+ description: 'Assume user for next requests with assume token.',
208
+ inputSchema: z.object({
209
+ user: z.string().describe('user identification string, username or email address'),
210
+ password: z.string().describe('password or user secret').optional(),
211
+ }),
212
+ outputSchema: z.object({
213
+ user: z.string().describe('user identification string'),
214
+ token: z.string().describe('assume token'),
215
+ valid: z.string().describe('validity of the generated token'),
216
+ }),
357
217
  },
358
218
  // DELETE /user:assume - Revoke assume token
359
219
  {
360
220
  name: 'edubase_delete_user_assume',
361
- description: "Revoke assume token.",
362
- inputSchema: {
363
- type: 'object',
364
- properties: {
365
- token: {
366
- type: 'string',
367
- description: 'assume token',
368
- },
369
- },
370
- required: ['token'],
371
- },
221
+ description: 'Revoke assume token.',
222
+ inputSchema: z.object({
223
+ token: z.string().describe('assume token'),
224
+ }),
225
+ outputSchema: z.object({}).optional(),
372
226
  },
373
227
  ];
374
- /* Output schema definitions */
375
- export const EDUBASE_API_TOOLS_USERS_OUTPUT_SCHEMA = {
376
- // GET /users - List managed, non-generated users
377
- edubase_get_users: {
378
- type: 'array',
379
- items: {
380
- type: 'object',
381
- properties: {
382
- user: {
383
- type: 'string',
384
- description: 'user identification string',
385
- },
386
- name: {
387
- type: 'string',
388
- description: 'full name of the user',
389
- },
390
- },
391
- },
392
- },
393
- // GET /user:me - Get/check current user
394
- edubase_get_user_me: {
395
- type: 'object',
396
- properties: {
397
- user: {
398
- type: 'string',
399
- description: 'user identification string',
400
- },
401
- name: {
402
- type: 'string',
403
- description: 'full name',
404
- },
405
- status: {
406
- type: 'boolean',
407
- description: 'user is enabled',
408
- },
409
- exam: {
410
- type: 'boolean',
411
- description: 'exam (generated) account',
412
- },
413
- },
414
- },
415
- // GET /user - Get/check user
416
- edubase_get_user: {
417
- type: 'object',
418
- properties: {
419
- user: {
420
- type: 'string',
421
- description: 'user identification string',
422
- },
423
- name: {
424
- type: 'string',
425
- description: 'full name',
426
- },
427
- status: {
428
- type: 'boolean',
429
- description: 'user is enabled',
430
- },
431
- exam: {
432
- type: 'boolean',
433
- description: 'exam (generated) account',
434
- },
435
- },
436
- },
437
- // POST /user - Create new user account
438
- edubase_post_user: {
439
- type: 'object',
440
- properties: {
441
- user: {
442
- type: 'string',
443
- description: 'user identification string',
444
- },
445
- username: {
446
- type: 'string',
447
- description: 'username, only if exam=false',
448
- },
449
- password: {
450
- type: 'string',
451
- description: 'password, only if exam=false',
452
- },
453
- },
454
- },
455
- // PATCH /user - Update user
456
- edubase_patch_user: {},
457
- // DELETE /user - Delete user
458
- edubase_delete_user: {},
459
- // GET /user:name - Get user's name
460
- edubase_get_user_name: {
461
- type: 'object',
462
- properties: {
463
- user: {
464
- type: 'string',
465
- description: 'the user identification string',
466
- },
467
- first_name: {
468
- type: 'string',
469
- description: 'first name',
470
- },
471
- last_name: {
472
- type: 'string',
473
- description: 'last name',
474
- },
475
- full_name: {
476
- type: 'string',
477
- description: 'full name',
478
- },
479
- display_name: {
480
- type: 'string',
481
- description: 'display name',
482
- },
483
- },
484
- },
485
- // POST /user:name - Update a user's name
486
- edubase_post_user_name: {
487
- type: 'object',
488
- properties: {
489
- user: {
490
- type: 'string',
491
- description: 'the user identification string',
492
- },
493
- success: {
494
- type: 'boolean',
495
- description: 'operation is successful',
496
- },
497
- changed: {
498
- type: 'boolean',
499
- description: 'name has been changed',
500
- },
501
- },
502
- },
503
- // GET /user:group - Get user's group
504
- edubase_get_user_group: {
505
- type: 'object',
506
- properties: {
507
- user: {
508
- type: 'string',
509
- description: 'the user identification string',
510
- },
511
- group: {
512
- type: 'string',
513
- description: 'user group code',
514
- },
515
- },
516
- },
517
- // POST /user:group - Update a user's group
518
- edubase_post_user_group: {
519
- type: 'object',
520
- properties: {
521
- user: {
522
- type: 'string',
523
- description: 'the user identification string',
524
- },
525
- success: {
526
- type: 'boolean',
527
- description: 'operation is successful',
528
- },
529
- changed: {
530
- type: 'boolean',
531
- description: 'name has been changed',
532
- },
533
- },
534
- },
535
- // GET /user:login - Get latest valid login link for user
536
- edubase_get_user_login: {
537
- type: 'object',
538
- properties: {
539
- user: {
540
- type: 'string',
541
- description: 'the user identification string',
542
- },
543
- url: {
544
- type: 'string',
545
- description: 'the login link',
546
- },
547
- valid: {
548
- type: 'string',
549
- description: 'validity (end of day) of the generated link',
550
- },
551
- },
552
- },
553
- // POST /user:login - Generate login link
554
- edubase_post_user_login: {
555
- type: 'object',
556
- properties: {
557
- user: {
558
- type: 'string',
559
- description: 'the user identification string',
560
- },
561
- url: {
562
- type: 'string',
563
- description: 'the login link',
564
- },
565
- valid: {
566
- type: 'string',
567
- description: 'validity of the generated link',
568
- },
569
- count: {
570
- type: 'number',
571
- description: 'maximum number the link can be used to login',
572
- },
573
- },
574
- },
575
- // DELETE /user:login - Delete a previously generated login link
576
- edubase_delete_user_login: {},
577
- // GET /user:search - Lookup user by email, username or code
578
- edubase_get_user_search: {
579
- type: 'object',
580
- properties: {
581
- user: {
582
- type: 'string',
583
- description: 'user identification string',
584
- },
585
- exam: {
586
- type: 'boolean',
587
- description: 'exam (generated) account',
588
- },
589
- },
590
- },
591
- // POST /user:assume - Assume user for next requests with assume token
592
- edubase_post_user_assume: {
593
- type: 'object',
594
- properties: {
595
- user: {
596
- type: 'string',
597
- description: 'user identification string',
598
- },
599
- token: {
600
- type: 'string',
601
- description: 'assume token',
602
- },
603
- valid: {
604
- type: 'string',
605
- description: 'validity of the generated token',
606
- },
607
- },
608
- },
609
- // DELETE /user:assume - Revoke assume token
610
- edubase_delete_user_assume: {},
611
- };