@edubase/mcp 1.0.23

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.
@@ -0,0 +1,406 @@
1
+ /* Tool definitions */
2
+ export const EDUBASE_API_TOOLS_PLAYS = [
3
+ // GET /quiz:results:play - Get detailed results for a specific Quiz play
4
+ {
5
+ name: 'edubase_get_quiz_play_results',
6
+ description: "Get detailed results for a specific Quiz play.",
7
+ inputSchema: {
8
+ type: 'object',
9
+ properties: {
10
+ play: {
11
+ type: 'string',
12
+ description: 'Quiz play identification string',
13
+ },
14
+ },
15
+ required: ['play'],
16
+ },
17
+ },
18
+ // GET /quiz:results:user - Get user results for a specific Quiz set
19
+ {
20
+ name: 'edubase_get_quiz_results_user',
21
+ description: "Get user results for a specific Quiz set.",
22
+ inputSchema: {
23
+ type: 'object',
24
+ properties: {
25
+ quiz: {
26
+ type: 'string',
27
+ description: 'Quiz set identification string',
28
+ },
29
+ user: {
30
+ type: 'string',
31
+ description: 'user identification string',
32
+ },
33
+ },
34
+ required: ['quiz', 'user'],
35
+ },
36
+ },
37
+ // GET /exam:results:user - Get user results for a specific exam
38
+ {
39
+ name: 'edubase_get_exam_results_user',
40
+ description: "Get user results for a specific exam.",
41
+ inputSchema: {
42
+ type: 'object',
43
+ properties: {
44
+ exam: {
45
+ type: 'string',
46
+ description: 'exam identification string',
47
+ },
48
+ user: {
49
+ type: 'string',
50
+ description: 'user identification string',
51
+ },
52
+ },
53
+ required: ['exam', 'user'],
54
+ },
55
+ },
56
+ // GET /exam:results:raw - Get raw results for a specific exam
57
+ {
58
+ name: 'edubase_get_exam_results_raw',
59
+ description: "Get raw results for a specific exam.\n" +
60
+ "- This endpoint returns raw results, including all answers given by the user. It is not meant to be displayed to the user.\n" +
61
+ "- This might require additional permissions.",
62
+ inputSchema: {
63
+ type: 'object',
64
+ properties: {
65
+ exam: {
66
+ type: 'string',
67
+ description: 'exam identification string',
68
+ },
69
+ },
70
+ required: ['exam'],
71
+ },
72
+ },
73
+ // GET /exam:certificates:user - Get (the latest) certificate details for a specific exam and user
74
+ {
75
+ name: 'edubase_get_exam_certificates_user',
76
+ description: "Get (the latest) certificate details for a specific exam and user.",
77
+ inputSchema: {
78
+ type: 'object',
79
+ properties: {
80
+ exam: {
81
+ type: 'string',
82
+ description: 'exam identification string',
83
+ },
84
+ user: {
85
+ type: 'string',
86
+ description: 'user identification string',
87
+ },
88
+ },
89
+ required: ['exam', 'user'],
90
+ },
91
+ },
92
+ // POST /exam:certificates:user:download - Generate download link for the latest user exam certificate
93
+ {
94
+ name: 'edubase_post_exam_certificates_user_download',
95
+ description: "Generate download link for the latest user exam certificate. If a previous valid link exists, it will be returned instead.",
96
+ inputSchema: {
97
+ type: 'object',
98
+ properties: {
99
+ exam: {
100
+ type: 'string',
101
+ description: 'exam identification string',
102
+ },
103
+ user: {
104
+ type: 'string',
105
+ description: 'user identification string',
106
+ },
107
+ },
108
+ required: ['exam', 'user'],
109
+ },
110
+ },
111
+ ];
112
+ /* Output schema definitions */
113
+ export const EDUBASE_API_TOOLS_PLAYS_OUTPUT_SCHEMA = {
114
+ // GET /quiz:results:play - Get detailed results for a specific Quiz play
115
+ edubase_get_quiz_play_results: {
116
+ type: 'object',
117
+ properties: {
118
+ play: {
119
+ type: 'string',
120
+ description: 'Quiz play identification string',
121
+ },
122
+ user: {
123
+ type: 'string',
124
+ description: 'user identification string',
125
+ },
126
+ time_start: {
127
+ type: 'string',
128
+ description: 'start time',
129
+ },
130
+ time_end: {
131
+ type: 'string',
132
+ description: 'end time',
133
+ },
134
+ questions_total: {
135
+ type: 'number',
136
+ description: 'total number of questions asked',
137
+ },
138
+ questions_correct: {
139
+ type: 'number',
140
+ description: 'number of correctly answered questions',
141
+ },
142
+ points_total: {
143
+ type: 'number',
144
+ description: 'total points',
145
+ },
146
+ points_correct: {
147
+ type: 'number',
148
+ description: 'total points scored',
149
+ },
150
+ valid: {
151
+ type: 'boolean',
152
+ description: 'result is valid',
153
+ },
154
+ successful: {
155
+ type: 'boolean',
156
+ description: 'attempt passed grading threshold (if applicable)',
157
+ },
158
+ questions: {
159
+ type: 'array',
160
+ items: {
161
+ type: 'object',
162
+ properties: {
163
+ index: {
164
+ type: 'string',
165
+ description: 'question index',
166
+ },
167
+ id: {
168
+ type: 'string',
169
+ description: 'external unique question identifier (if present)',
170
+ },
171
+ question: {
172
+ type: 'string',
173
+ description: 'question identification string',
174
+ },
175
+ time_answer: {
176
+ type: 'number',
177
+ description: 'number of seconds spent on question (if available)',
178
+ },
179
+ points_maximum: {
180
+ type: 'number',
181
+ description: 'maximum points',
182
+ },
183
+ points: {
184
+ type: 'number',
185
+ description: 'points scored',
186
+ },
187
+ },
188
+ },
189
+ },
190
+ },
191
+ },
192
+ // GET /quiz:results:user - Get user results for a specific Quiz set
193
+ edubase_get_quiz_results_user: {
194
+ type: 'array',
195
+ items: {
196
+ type: 'object',
197
+ properties: {
198
+ play: {
199
+ type: 'string',
200
+ description: 'Quiz play identification string',
201
+ },
202
+ user: {
203
+ type: 'string',
204
+ description: 'user identification string',
205
+ },
206
+ time_start: {
207
+ type: 'string',
208
+ description: 'start time',
209
+ },
210
+ time_end: {
211
+ type: 'string',
212
+ description: 'end time',
213
+ },
214
+ questions_total: {
215
+ type: 'number',
216
+ description: 'total number of questions asked',
217
+ },
218
+ questions_correct: {
219
+ type: 'number',
220
+ description: 'number of correctly answered questions',
221
+ },
222
+ points_total: {
223
+ type: 'number',
224
+ description: 'total points',
225
+ },
226
+ points_correct: {
227
+ type: 'number',
228
+ description: 'total points scored',
229
+ },
230
+ valid: {
231
+ type: 'boolean',
232
+ description: 'result is valid',
233
+ },
234
+ successful: {
235
+ type: 'boolean',
236
+ description: 'attempt passed grading threshold (if applicable)',
237
+ },
238
+ },
239
+ },
240
+ },
241
+ // GET /exam:results:user - Get user results for a specific exam
242
+ edubase_get_exam_results_user: {
243
+ type: 'array',
244
+ items: {
245
+ type: 'object',
246
+ properties: {
247
+ play: {
248
+ type: 'string',
249
+ description: 'Quiz play identification string',
250
+ },
251
+ user: {
252
+ type: 'string',
253
+ description: 'user identification string',
254
+ },
255
+ time_start: {
256
+ type: 'string',
257
+ description: 'start time',
258
+ },
259
+ time_end: {
260
+ type: 'string',
261
+ description: 'end time',
262
+ },
263
+ questions_total: {
264
+ type: 'number',
265
+ description: 'total number of questions asked',
266
+ },
267
+ questions_correct: {
268
+ type: 'number',
269
+ description: 'number of correctly answered questions',
270
+ },
271
+ points_total: {
272
+ type: 'number',
273
+ description: 'total points',
274
+ },
275
+ points_correct: {
276
+ type: 'number',
277
+ description: 'total points scored',
278
+ },
279
+ attempt: {
280
+ type: 'number',
281
+ description: 'index of attempt',
282
+ },
283
+ valid: {
284
+ type: 'boolean',
285
+ description: 'result is valid',
286
+ },
287
+ successful: {
288
+ type: 'boolean',
289
+ description: 'attempt passed grading threshold (if applicable)',
290
+ },
291
+ },
292
+ },
293
+ },
294
+ // GET /exam:results:raw - Get raw results for a specific exam
295
+ edubase_get_exam_results_raw: {
296
+ type: 'object',
297
+ properties: {
298
+ exam: {
299
+ type: 'string',
300
+ description: 'exam identification string',
301
+ },
302
+ users: {
303
+ type: 'array',
304
+ items: {
305
+ type: 'object',
306
+ description: 'details of the user and their results',
307
+ properties: {
308
+ results: {
309
+ type: 'number',
310
+ description: 'achieved score in percentage',
311
+ },
312
+ play: {
313
+ type: 'object',
314
+ description: 'Quiz play details',
315
+ },
316
+ ready: {
317
+ type: 'boolean',
318
+ description: 'all questions are evaluated, not requiring further review',
319
+ },
320
+ points: {
321
+ type: 'object',
322
+ properties: {
323
+ correct: {
324
+ type: 'object',
325
+ description: 'total points scored',
326
+ },
327
+ total: {
328
+ type: 'object',
329
+ description: 'maximum points',
330
+ },
331
+ },
332
+ },
333
+ flow: {
334
+ type: 'object',
335
+ description: 'Quiz Flow data, describing detailed user interaction and logs about the test attempt',
336
+ },
337
+ stats: {
338
+ type: 'object',
339
+ description: 'detailed evaluation data',
340
+ },
341
+ time: {
342
+ type: 'object',
343
+ description: 'time needed for the test and each question',
344
+ },
345
+ },
346
+ },
347
+ },
348
+ questions: {
349
+ type: 'object',
350
+ description: 'most important details about the questions asked',
351
+ },
352
+ },
353
+ },
354
+ // GET /exam:certificates:user - Get (the latest) certificate details for a specific exam and user
355
+ edubase_get_exam_certificates_user: {
356
+ type: 'object',
357
+ properties: {
358
+ play: {
359
+ type: 'string',
360
+ description: 'Quiz play identification string',
361
+ },
362
+ user: {
363
+ type: 'string',
364
+ description: 'user identification string',
365
+ },
366
+ eligible: {
367
+ type: 'boolean',
368
+ description: 'result is eligible for a certificate',
369
+ },
370
+ certified: {
371
+ type: 'boolean',
372
+ description: 'result is eligible and also certified',
373
+ },
374
+ serial: {
375
+ type: 'string',
376
+ description: 'serial number of the certificate, only present if the result is certified and serial numbering is enabled',
377
+ },
378
+ expires: {
379
+ type: 'string',
380
+ description: 'date of expiration, only present if the result is certified and expiration is configured',
381
+ },
382
+ },
383
+ },
384
+ // POST /exam:certificates:user:download - Generate download link for the latest user exam certificate
385
+ edubase_get_exam_certificates_user_download: {
386
+ type: 'object',
387
+ properties: {
388
+ play: {
389
+ type: 'string',
390
+ description: 'Quiz play identification string',
391
+ },
392
+ user: {
393
+ type: 'string',
394
+ description: 'user identification string',
395
+ },
396
+ url: {
397
+ type: 'string',
398
+ description: 'download link for the certificate',
399
+ },
400
+ valid: {
401
+ type: 'string',
402
+ description: 'date of link expiration',
403
+ },
404
+ },
405
+ },
406
+ };