@massteck/aloc-mcp-server 1.0.3 → 1.0.5
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/README.md +3 -0
- package/dist/client.d.ts +32 -0
- package/dist/client.js +21 -0
- package/dist/index.js +145 -0
- package/package.json +1 -1
- package/src/client.ts +40 -0
- package/src/index.ts +160 -0
package/README.md
CHANGED
|
@@ -13,6 +13,9 @@ Official Model Context Protocol (MCP) server for **ALOC** (`@massteck/aloc-mcp-s
|
|
|
13
13
|
| `aloc_get_subject_years` | Discovery | **0 credits** | Available examination years for a specific subject & body. |
|
|
14
14
|
| `aloc_check_credit_balance` | Account | **0 credits** | Check remaining API credit balance & authentication status. |
|
|
15
15
|
| `aloc_search_questions` | Content | **1–3 credits** | Search curriculum-aligned examination questions with options, topics, and difficulty. |
|
|
16
|
+
| `aloc_generate_assessment` | Assessment | **1 credit** | Assemble psychometrically balanced examination papers based on presets, topics, and seeds. |
|
|
17
|
+
| `aloc_create_assessment_session` | Assessment | **1 credit** | Initialize a timed candidate test session (2-hour lifecycle) for cheat-resistant delivery. |
|
|
18
|
+
| `aloc_get_session_questions` | Assessment | **1 credit** | Retrieve questions allocated to an active candidate assessment session. |
|
|
16
19
|
| `aloc_get_question_explanation` | Learning | **10 credits** | Retrieve step-by-step solutions, misconceptions, and remedial hints. |
|
|
17
20
|
| `aloc_get_curriculum_taxonomy` | Curriculum | **Free/3 credits** | Explore the topic taxonomy and syllabus hierarchy. |
|
|
18
21
|
| `aloc_find_similar_questions` | Intelligence | **10 credits** | Find vector-similar exam questions. |
|
package/dist/client.d.ts
CHANGED
|
@@ -116,4 +116,36 @@ export declare class AlocClient {
|
|
|
116
116
|
* Report an error, typo, or disputed answer on a question.
|
|
117
117
|
*/
|
|
118
118
|
reportQuestionIssue(questionId: string, type: "question" | "option_a" | "option_b" | "option_c" | "option_d" | "correct_answer" | "explanation" | "other", message: string, reporterName?: string): Promise<any>;
|
|
119
|
+
/**
|
|
120
|
+
* Generate a psychometrically balanced examination assessment paper.
|
|
121
|
+
*/
|
|
122
|
+
generateAssessment(params: {
|
|
123
|
+
subject: string;
|
|
124
|
+
examType: string;
|
|
125
|
+
preset?: "jamb_standard_40" | "waec_standard_50" | "micro_test_10" | "custom";
|
|
126
|
+
count?: number;
|
|
127
|
+
seed?: string;
|
|
128
|
+
shuffleOptions?: boolean;
|
|
129
|
+
difficultyDistribution?: {
|
|
130
|
+
easy?: number;
|
|
131
|
+
medium?: number;
|
|
132
|
+
hard?: number;
|
|
133
|
+
};
|
|
134
|
+
topics?: string[];
|
|
135
|
+
}): Promise<any>;
|
|
136
|
+
/**
|
|
137
|
+
* Start a timed candidate assessment sitting (2-hour lifecycle).
|
|
138
|
+
*/
|
|
139
|
+
createAssessmentSession(params: {
|
|
140
|
+
subject: string;
|
|
141
|
+
examType: string;
|
|
142
|
+
preset?: "jamb_standard_40" | "waec_standard_50" | "micro_test_10" | "custom";
|
|
143
|
+
count?: number;
|
|
144
|
+
seed?: string;
|
|
145
|
+
shuffleOptions?: boolean;
|
|
146
|
+
}): Promise<any>;
|
|
147
|
+
/**
|
|
148
|
+
* Retrieve questions allocated to an active candidate assessment session.
|
|
149
|
+
*/
|
|
150
|
+
getSessionQuestions(sessionId: string): Promise<any>;
|
|
119
151
|
}
|
package/dist/client.js
CHANGED
|
@@ -171,5 +171,26 @@ class AlocClient {
|
|
|
171
171
|
});
|
|
172
172
|
return response.data;
|
|
173
173
|
}
|
|
174
|
+
/**
|
|
175
|
+
* Generate a psychometrically balanced examination assessment paper.
|
|
176
|
+
*/
|
|
177
|
+
async generateAssessment(params) {
|
|
178
|
+
const response = await this.http.post("/assessments/generate", params);
|
|
179
|
+
return response.data;
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* Start a timed candidate assessment sitting (2-hour lifecycle).
|
|
183
|
+
*/
|
|
184
|
+
async createAssessmentSession(params) {
|
|
185
|
+
const response = await this.http.post("/assessments/sessions", params);
|
|
186
|
+
return response.data;
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
* Retrieve questions allocated to an active candidate assessment session.
|
|
190
|
+
*/
|
|
191
|
+
async getSessionQuestions(sessionId) {
|
|
192
|
+
const response = await this.http.get(`/assessments/sessions/${encodeURIComponent(sessionId)}/questions`);
|
|
193
|
+
return response.data;
|
|
194
|
+
}
|
|
174
195
|
}
|
|
175
196
|
exports.AlocClient = AlocClient;
|
package/dist/index.js
CHANGED
|
@@ -191,6 +191,99 @@ server.setRequestHandler(types_js_1.ListToolsRequestSchema, async () => {
|
|
|
191
191
|
required: ["questionId", "type", "message"],
|
|
192
192
|
},
|
|
193
193
|
},
|
|
194
|
+
{
|
|
195
|
+
name: "aloc_generate_assessment",
|
|
196
|
+
description: "Assemble a psychometrically balanced examination paper based on syllabus presets (JAMB 40, WAEC 50, Micro 10) or custom Bloom difficulty distributions, topics, and seeds. Consumes 1 ALOC credit.",
|
|
197
|
+
inputSchema: {
|
|
198
|
+
type: "object",
|
|
199
|
+
properties: {
|
|
200
|
+
subject: {
|
|
201
|
+
type: "string",
|
|
202
|
+
description: "Subject name (e.g. 'mathematics', 'physics', 'english')",
|
|
203
|
+
},
|
|
204
|
+
examType: {
|
|
205
|
+
type: "string",
|
|
206
|
+
enum: ["waec", "jamb", "neco", "post_utme", "state"],
|
|
207
|
+
description: "Target African examination body",
|
|
208
|
+
},
|
|
209
|
+
preset: {
|
|
210
|
+
type: "string",
|
|
211
|
+
enum: ["jamb_standard_40", "waec_standard_50", "micro_test_10", "custom"],
|
|
212
|
+
description: "Standard syllabus preset",
|
|
213
|
+
},
|
|
214
|
+
count: {
|
|
215
|
+
type: "number",
|
|
216
|
+
description: "Number of questions (max 60, default 40)",
|
|
217
|
+
},
|
|
218
|
+
seed: {
|
|
219
|
+
type: "string",
|
|
220
|
+
description: "Deterministic seed for reproducible student batches",
|
|
221
|
+
},
|
|
222
|
+
shuffleOptions: {
|
|
223
|
+
type: "boolean",
|
|
224
|
+
description: "Whether to randomize distractor option keys (anti-cheating)",
|
|
225
|
+
default: false,
|
|
226
|
+
},
|
|
227
|
+
topics: {
|
|
228
|
+
type: "array",
|
|
229
|
+
items: { type: "string" },
|
|
230
|
+
description: "Specific topics to cover in the assessment",
|
|
231
|
+
},
|
|
232
|
+
},
|
|
233
|
+
required: ["subject", "examType"],
|
|
234
|
+
},
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
name: "aloc_create_assessment_session",
|
|
238
|
+
description: "Initialize a timed candidate assessment session (2-hour lifecycle) for secure, cheat-resistant live test delivery. Consumes 1 ALOC credit.",
|
|
239
|
+
inputSchema: {
|
|
240
|
+
type: "object",
|
|
241
|
+
properties: {
|
|
242
|
+
subject: {
|
|
243
|
+
type: "string",
|
|
244
|
+
description: "Subject name",
|
|
245
|
+
},
|
|
246
|
+
examType: {
|
|
247
|
+
type: "string",
|
|
248
|
+
enum: ["waec", "jamb", "neco", "post_utme", "state"],
|
|
249
|
+
description: "Examination body",
|
|
250
|
+
},
|
|
251
|
+
preset: {
|
|
252
|
+
type: "string",
|
|
253
|
+
enum: ["jamb_standard_40", "waec_standard_50", "micro_test_10", "custom"],
|
|
254
|
+
description: "Standard syllabus preset",
|
|
255
|
+
},
|
|
256
|
+
count: {
|
|
257
|
+
type: "number",
|
|
258
|
+
description: "Number of questions to assemble",
|
|
259
|
+
},
|
|
260
|
+
seed: {
|
|
261
|
+
type: "string",
|
|
262
|
+
description: "Deterministic student candidate seed",
|
|
263
|
+
},
|
|
264
|
+
shuffleOptions: {
|
|
265
|
+
type: "boolean",
|
|
266
|
+
description: "Whether to shuffle option distractors",
|
|
267
|
+
default: false,
|
|
268
|
+
},
|
|
269
|
+
},
|
|
270
|
+
required: ["subject", "examType"],
|
|
271
|
+
},
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
name: "aloc_get_session_questions",
|
|
275
|
+
description: "Retrieve questions allocated to an active candidate assessment session. Consumes 1 ALOC credit.",
|
|
276
|
+
inputSchema: {
|
|
277
|
+
type: "object",
|
|
278
|
+
properties: {
|
|
279
|
+
sessionId: {
|
|
280
|
+
type: "string",
|
|
281
|
+
description: "UUID of the active assessment session",
|
|
282
|
+
},
|
|
283
|
+
},
|
|
284
|
+
required: ["sessionId"],
|
|
285
|
+
},
|
|
286
|
+
},
|
|
194
287
|
],
|
|
195
288
|
};
|
|
196
289
|
});
|
|
@@ -311,6 +404,58 @@ server.setRequestHandler(types_js_1.CallToolRequestSchema, async (request) => {
|
|
|
311
404
|
],
|
|
312
405
|
};
|
|
313
406
|
}
|
|
407
|
+
case "aloc_generate_assessment": {
|
|
408
|
+
const { subject, examType, preset, count, seed, shuffleOptions, difficultyDistribution, topics, } = (args || {});
|
|
409
|
+
const result = await client.generateAssessment({
|
|
410
|
+
subject,
|
|
411
|
+
examType,
|
|
412
|
+
preset,
|
|
413
|
+
count,
|
|
414
|
+
seed,
|
|
415
|
+
shuffleOptions,
|
|
416
|
+
difficultyDistribution,
|
|
417
|
+
topics,
|
|
418
|
+
});
|
|
419
|
+
return {
|
|
420
|
+
content: [
|
|
421
|
+
{
|
|
422
|
+
type: "text",
|
|
423
|
+
text: JSON.stringify(result, null, 2),
|
|
424
|
+
},
|
|
425
|
+
],
|
|
426
|
+
};
|
|
427
|
+
}
|
|
428
|
+
case "aloc_create_assessment_session": {
|
|
429
|
+
const { subject, examType, preset, count, seed, shuffleOptions } = (args || {});
|
|
430
|
+
const result = await client.createAssessmentSession({
|
|
431
|
+
subject,
|
|
432
|
+
examType,
|
|
433
|
+
preset,
|
|
434
|
+
count,
|
|
435
|
+
seed,
|
|
436
|
+
shuffleOptions,
|
|
437
|
+
});
|
|
438
|
+
return {
|
|
439
|
+
content: [
|
|
440
|
+
{
|
|
441
|
+
type: "text",
|
|
442
|
+
text: JSON.stringify(result, null, 2),
|
|
443
|
+
},
|
|
444
|
+
],
|
|
445
|
+
};
|
|
446
|
+
}
|
|
447
|
+
case "aloc_get_session_questions": {
|
|
448
|
+
const { sessionId } = (args || {});
|
|
449
|
+
const result = await client.getSessionQuestions(sessionId);
|
|
450
|
+
return {
|
|
451
|
+
content: [
|
|
452
|
+
{
|
|
453
|
+
type: "text",
|
|
454
|
+
text: JSON.stringify(result, null, 2),
|
|
455
|
+
},
|
|
456
|
+
],
|
|
457
|
+
};
|
|
458
|
+
}
|
|
314
459
|
default:
|
|
315
460
|
throw new Error(`Unknown ALOC tool: ${name}`);
|
|
316
461
|
}
|
package/package.json
CHANGED
package/src/client.ts
CHANGED
|
@@ -200,4 +200,44 @@ export class AlocClient {
|
|
|
200
200
|
});
|
|
201
201
|
return response.data;
|
|
202
202
|
}
|
|
203
|
+
|
|
204
|
+
/**
|
|
205
|
+
* Generate a psychometrically balanced examination assessment paper.
|
|
206
|
+
*/
|
|
207
|
+
public async generateAssessment(params: {
|
|
208
|
+
subject: string;
|
|
209
|
+
examType: string;
|
|
210
|
+
preset?: "jamb_standard_40" | "waec_standard_50" | "micro_test_10" | "custom";
|
|
211
|
+
count?: number;
|
|
212
|
+
seed?: string;
|
|
213
|
+
shuffleOptions?: boolean;
|
|
214
|
+
difficultyDistribution?: { easy?: number; medium?: number; hard?: number };
|
|
215
|
+
topics?: string[];
|
|
216
|
+
}) {
|
|
217
|
+
const response = await this.http.post("/assessments/generate", params);
|
|
218
|
+
return response.data;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
/**
|
|
222
|
+
* Start a timed candidate assessment sitting (2-hour lifecycle).
|
|
223
|
+
*/
|
|
224
|
+
public async createAssessmentSession(params: {
|
|
225
|
+
subject: string;
|
|
226
|
+
examType: string;
|
|
227
|
+
preset?: "jamb_standard_40" | "waec_standard_50" | "micro_test_10" | "custom";
|
|
228
|
+
count?: number;
|
|
229
|
+
seed?: string;
|
|
230
|
+
shuffleOptions?: boolean;
|
|
231
|
+
}) {
|
|
232
|
+
const response = await this.http.post("/assessments/sessions", params);
|
|
233
|
+
return response.data;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
/**
|
|
237
|
+
* Retrieve questions allocated to an active candidate assessment session.
|
|
238
|
+
*/
|
|
239
|
+
public async getSessionQuestions(sessionId: string) {
|
|
240
|
+
const response = await this.http.get(`/assessments/sessions/${encodeURIComponent(sessionId)}/questions`);
|
|
241
|
+
return response.data;
|
|
242
|
+
}
|
|
203
243
|
}
|
package/src/index.ts
CHANGED
|
@@ -208,6 +208,102 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
|
208
208
|
required: ["questionId", "type", "message"],
|
|
209
209
|
},
|
|
210
210
|
},
|
|
211
|
+
{
|
|
212
|
+
name: "aloc_generate_assessment",
|
|
213
|
+
description:
|
|
214
|
+
"Assemble a psychometrically balanced examination paper based on syllabus presets (JAMB 40, WAEC 50, Micro 10) or custom Bloom difficulty distributions, topics, and seeds. Consumes 1 ALOC credit.",
|
|
215
|
+
inputSchema: {
|
|
216
|
+
type: "object",
|
|
217
|
+
properties: {
|
|
218
|
+
subject: {
|
|
219
|
+
type: "string",
|
|
220
|
+
description: "Subject name (e.g. 'mathematics', 'physics', 'english')",
|
|
221
|
+
},
|
|
222
|
+
examType: {
|
|
223
|
+
type: "string",
|
|
224
|
+
enum: ["waec", "jamb", "neco", "post_utme", "state"],
|
|
225
|
+
description: "Target African examination body",
|
|
226
|
+
},
|
|
227
|
+
preset: {
|
|
228
|
+
type: "string",
|
|
229
|
+
enum: ["jamb_standard_40", "waec_standard_50", "micro_test_10", "custom"],
|
|
230
|
+
description: "Standard syllabus preset",
|
|
231
|
+
},
|
|
232
|
+
count: {
|
|
233
|
+
type: "number",
|
|
234
|
+
description: "Number of questions (max 60, default 40)",
|
|
235
|
+
},
|
|
236
|
+
seed: {
|
|
237
|
+
type: "string",
|
|
238
|
+
description: "Deterministic seed for reproducible student batches",
|
|
239
|
+
},
|
|
240
|
+
shuffleOptions: {
|
|
241
|
+
type: "boolean",
|
|
242
|
+
description: "Whether to randomize distractor option keys (anti-cheating)",
|
|
243
|
+
default: false,
|
|
244
|
+
},
|
|
245
|
+
topics: {
|
|
246
|
+
type: "array",
|
|
247
|
+
items: { type: "string" },
|
|
248
|
+
description: "Specific topics to cover in the assessment",
|
|
249
|
+
},
|
|
250
|
+
},
|
|
251
|
+
required: ["subject", "examType"],
|
|
252
|
+
},
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
name: "aloc_create_assessment_session",
|
|
256
|
+
description:
|
|
257
|
+
"Initialize a timed candidate assessment session (2-hour lifecycle) for secure, cheat-resistant live test delivery. Consumes 1 ALOC credit.",
|
|
258
|
+
inputSchema: {
|
|
259
|
+
type: "object",
|
|
260
|
+
properties: {
|
|
261
|
+
subject: {
|
|
262
|
+
type: "string",
|
|
263
|
+
description: "Subject name",
|
|
264
|
+
},
|
|
265
|
+
examType: {
|
|
266
|
+
type: "string",
|
|
267
|
+
enum: ["waec", "jamb", "neco", "post_utme", "state"],
|
|
268
|
+
description: "Examination body",
|
|
269
|
+
},
|
|
270
|
+
preset: {
|
|
271
|
+
type: "string",
|
|
272
|
+
enum: ["jamb_standard_40", "waec_standard_50", "micro_test_10", "custom"],
|
|
273
|
+
description: "Standard syllabus preset",
|
|
274
|
+
},
|
|
275
|
+
count: {
|
|
276
|
+
type: "number",
|
|
277
|
+
description: "Number of questions to assemble",
|
|
278
|
+
},
|
|
279
|
+
seed: {
|
|
280
|
+
type: "string",
|
|
281
|
+
description: "Deterministic student candidate seed",
|
|
282
|
+
},
|
|
283
|
+
shuffleOptions: {
|
|
284
|
+
type: "boolean",
|
|
285
|
+
description: "Whether to shuffle option distractors",
|
|
286
|
+
default: false,
|
|
287
|
+
},
|
|
288
|
+
},
|
|
289
|
+
required: ["subject", "examType"],
|
|
290
|
+
},
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
name: "aloc_get_session_questions",
|
|
294
|
+
description:
|
|
295
|
+
"Retrieve questions allocated to an active candidate assessment session. Consumes 1 ALOC credit.",
|
|
296
|
+
inputSchema: {
|
|
297
|
+
type: "object",
|
|
298
|
+
properties: {
|
|
299
|
+
sessionId: {
|
|
300
|
+
type: "string",
|
|
301
|
+
description: "UUID of the active assessment session",
|
|
302
|
+
},
|
|
303
|
+
},
|
|
304
|
+
required: ["sessionId"],
|
|
305
|
+
},
|
|
306
|
+
},
|
|
211
307
|
],
|
|
212
308
|
};
|
|
213
309
|
});
|
|
@@ -339,6 +435,70 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
339
435
|
};
|
|
340
436
|
}
|
|
341
437
|
|
|
438
|
+
case "aloc_generate_assessment": {
|
|
439
|
+
const {
|
|
440
|
+
subject,
|
|
441
|
+
examType,
|
|
442
|
+
preset,
|
|
443
|
+
count,
|
|
444
|
+
seed,
|
|
445
|
+
shuffleOptions,
|
|
446
|
+
difficultyDistribution,
|
|
447
|
+
topics,
|
|
448
|
+
} = (args || {}) as any;
|
|
449
|
+
const result = await client.generateAssessment({
|
|
450
|
+
subject,
|
|
451
|
+
examType,
|
|
452
|
+
preset,
|
|
453
|
+
count,
|
|
454
|
+
seed,
|
|
455
|
+
shuffleOptions,
|
|
456
|
+
difficultyDistribution,
|
|
457
|
+
topics,
|
|
458
|
+
});
|
|
459
|
+
return {
|
|
460
|
+
content: [
|
|
461
|
+
{
|
|
462
|
+
type: "text",
|
|
463
|
+
text: JSON.stringify(result, null, 2),
|
|
464
|
+
},
|
|
465
|
+
],
|
|
466
|
+
};
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
case "aloc_create_assessment_session": {
|
|
470
|
+
const { subject, examType, preset, count, seed, shuffleOptions } = (args || {}) as any;
|
|
471
|
+
const result = await client.createAssessmentSession({
|
|
472
|
+
subject,
|
|
473
|
+
examType,
|
|
474
|
+
preset,
|
|
475
|
+
count,
|
|
476
|
+
seed,
|
|
477
|
+
shuffleOptions,
|
|
478
|
+
});
|
|
479
|
+
return {
|
|
480
|
+
content: [
|
|
481
|
+
{
|
|
482
|
+
type: "text",
|
|
483
|
+
text: JSON.stringify(result, null, 2),
|
|
484
|
+
},
|
|
485
|
+
],
|
|
486
|
+
};
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
case "aloc_get_session_questions": {
|
|
490
|
+
const { sessionId } = (args || {}) as any;
|
|
491
|
+
const result = await client.getSessionQuestions(sessionId);
|
|
492
|
+
return {
|
|
493
|
+
content: [
|
|
494
|
+
{
|
|
495
|
+
type: "text",
|
|
496
|
+
text: JSON.stringify(result, null, 2),
|
|
497
|
+
},
|
|
498
|
+
],
|
|
499
|
+
};
|
|
500
|
+
}
|
|
501
|
+
|
|
342
502
|
default:
|
|
343
503
|
throw new Error(`Unknown ALOC tool: ${name}`);
|
|
344
504
|
}
|