gogcli-mcp-classroom 2.0.3 → 2.0.6
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/.claude-plugin/marketplace.json +2 -2
- package/.claude-plugin/plugin.json +1 -1
- package/dist/index.js +290 -288
- package/manifest.json +1 -1
- package/package.json +2 -2
- package/server.json +1 -1
- package/src/tools/classroom-extra.ts +300 -2
- package/tests/tools/classroom-extra.test.ts +260 -8
package/dist/index.js
CHANGED
|
@@ -9070,7 +9070,7 @@ var Doc = class {
|
|
|
9070
9070
|
var version = {
|
|
9071
9071
|
major: 4,
|
|
9072
9072
|
minor: 4,
|
|
9073
|
-
patch:
|
|
9073
|
+
patch: 3
|
|
9074
9074
|
};
|
|
9075
9075
|
|
|
9076
9076
|
// ../../node_modules/zod/v4/core/schemas.js
|
|
@@ -10669,6 +10669,7 @@ var $ZodFile = /* @__PURE__ */ $constructor("$ZodFile", (inst, def) => {
|
|
|
10669
10669
|
});
|
|
10670
10670
|
var $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) => {
|
|
10671
10671
|
$ZodType.init(inst, def);
|
|
10672
|
+
inst._zod.optin = "optional";
|
|
10672
10673
|
inst._zod.parse = (payload, ctx) => {
|
|
10673
10674
|
if (ctx.direction === "backward") {
|
|
10674
10675
|
throw new $ZodEncodeError(inst.constructor.name);
|
|
@@ -10678,6 +10679,7 @@ var $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) =>
|
|
|
10678
10679
|
const output = _out instanceof Promise ? _out : Promise.resolve(_out);
|
|
10679
10680
|
return output.then((output2) => {
|
|
10680
10681
|
payload.value = output2;
|
|
10682
|
+
payload.fallback = true;
|
|
10681
10683
|
return payload;
|
|
10682
10684
|
});
|
|
10683
10685
|
}
|
|
@@ -10685,11 +10687,12 @@ var $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) =>
|
|
|
10685
10687
|
throw new $ZodAsyncError();
|
|
10686
10688
|
}
|
|
10687
10689
|
payload.value = _out;
|
|
10690
|
+
payload.fallback = true;
|
|
10688
10691
|
return payload;
|
|
10689
10692
|
};
|
|
10690
10693
|
});
|
|
10691
10694
|
function handleOptionalResult(result, input) {
|
|
10692
|
-
if (result.issues.length
|
|
10695
|
+
if (input === void 0 && (result.issues.length || result.fallback)) {
|
|
10693
10696
|
return { issues: [], value: void 0 };
|
|
10694
10697
|
}
|
|
10695
10698
|
return result;
|
|
@@ -10707,10 +10710,11 @@ var $ZodOptional = /* @__PURE__ */ $constructor("$ZodOptional", (inst, def) => {
|
|
|
10707
10710
|
});
|
|
10708
10711
|
inst._zod.parse = (payload, ctx) => {
|
|
10709
10712
|
if (def.innerType._zod.optin === "optional") {
|
|
10713
|
+
const input = payload.value;
|
|
10710
10714
|
const result = def.innerType._zod.run(payload, ctx);
|
|
10711
10715
|
if (result instanceof Promise)
|
|
10712
|
-
return result.then((r) => handleOptionalResult(r,
|
|
10713
|
-
return handleOptionalResult(result,
|
|
10716
|
+
return result.then((r) => handleOptionalResult(r, input));
|
|
10717
|
+
return handleOptionalResult(result, input);
|
|
10714
10718
|
}
|
|
10715
10719
|
if (payload.value === void 0) {
|
|
10716
10720
|
return payload;
|
|
@@ -10826,7 +10830,7 @@ var $ZodSuccess = /* @__PURE__ */ $constructor("$ZodSuccess", (inst, def) => {
|
|
|
10826
10830
|
});
|
|
10827
10831
|
var $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => {
|
|
10828
10832
|
$ZodType.init(inst, def);
|
|
10829
|
-
|
|
10833
|
+
inst._zod.optin = "optional";
|
|
10830
10834
|
defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
|
|
10831
10835
|
defineLazy(inst._zod, "values", () => def.innerType._zod.values);
|
|
10832
10836
|
inst._zod.parse = (payload, ctx) => {
|
|
@@ -10846,6 +10850,7 @@ var $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => {
|
|
|
10846
10850
|
input: payload.value
|
|
10847
10851
|
});
|
|
10848
10852
|
payload.issues = [];
|
|
10853
|
+
payload.fallback = true;
|
|
10849
10854
|
}
|
|
10850
10855
|
return payload;
|
|
10851
10856
|
});
|
|
@@ -10860,6 +10865,7 @@ var $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => {
|
|
|
10860
10865
|
input: payload.value
|
|
10861
10866
|
});
|
|
10862
10867
|
payload.issues = [];
|
|
10868
|
+
payload.fallback = true;
|
|
10863
10869
|
}
|
|
10864
10870
|
return payload;
|
|
10865
10871
|
};
|
|
@@ -10905,7 +10911,7 @@ function handlePipeResult(left, next, ctx) {
|
|
|
10905
10911
|
left.aborted = true;
|
|
10906
10912
|
return left;
|
|
10907
10913
|
}
|
|
10908
|
-
return next._zod.run({ value: left.value, issues: left.issues }, ctx);
|
|
10914
|
+
return next._zod.run({ value: left.value, issues: left.issues, fallback: left.fallback }, ctx);
|
|
10909
10915
|
}
|
|
10910
10916
|
var $ZodCodec = /* @__PURE__ */ $constructor("$ZodCodec", (inst, def) => {
|
|
10911
10917
|
$ZodType.init(inst, def);
|
|
@@ -10959,8 +10965,6 @@ function handleCodecTxResult(left, value, nextSchema, ctx) {
|
|
|
10959
10965
|
}
|
|
10960
10966
|
var $ZodPreprocess = /* @__PURE__ */ $constructor("$ZodPreprocess", (inst, def) => {
|
|
10961
10967
|
$ZodPipe.init(inst, def);
|
|
10962
|
-
defineLazy(inst._zod, "optin", () => def.out._zod.optin);
|
|
10963
|
-
defineLazy(inst._zod, "optout", () => def.out._zod.optout);
|
|
10964
10968
|
});
|
|
10965
10969
|
var $ZodReadonly = /* @__PURE__ */ $constructor("$ZodReadonly", (inst, def) => {
|
|
10966
10970
|
$ZodType.init(inst, def);
|
|
@@ -20478,10 +20482,12 @@ var ZodTransform = /* @__PURE__ */ $constructor("ZodTransform", (inst, def) => {
|
|
|
20478
20482
|
if (output instanceof Promise) {
|
|
20479
20483
|
return output.then((output2) => {
|
|
20480
20484
|
payload.value = output2;
|
|
20485
|
+
payload.fallback = true;
|
|
20481
20486
|
return payload;
|
|
20482
20487
|
});
|
|
20483
20488
|
}
|
|
20484
20489
|
payload.value = output;
|
|
20490
|
+
payload.fallback = true;
|
|
20485
20491
|
return payload;
|
|
20486
20492
|
};
|
|
20487
20493
|
});
|
|
@@ -31055,83 +31061,6 @@ function registerClassroomTools(server2) {
|
|
|
31055
31061
|
}, async ({ courseId, account }) => {
|
|
31056
31062
|
return runOrDiagnose(["classroom", "courses", "get", courseId], { account });
|
|
31057
31063
|
});
|
|
31058
|
-
server2.registerTool("gog_classroom_courses_create", {
|
|
31059
|
-
description: "Create a new Google Classroom course.",
|
|
31060
|
-
inputSchema: {
|
|
31061
|
-
name: external_exports.string().describe("Course name"),
|
|
31062
|
-
owner: external_exports.string().optional().describe('Owner user ID (default: "me")'),
|
|
31063
|
-
section: external_exports.string().optional().describe("Section"),
|
|
31064
|
-
descriptionHeading: external_exports.string().optional().describe("Description heading"),
|
|
31065
|
-
description: external_exports.string().optional().describe("Description"),
|
|
31066
|
-
room: external_exports.string().optional().describe("Room"),
|
|
31067
|
-
state: external_exports.string().optional().describe("Course state: ACTIVE, ARCHIVED, PROVISIONED, DECLINED, SUSPENDED"),
|
|
31068
|
-
account: accountParam
|
|
31069
|
-
}
|
|
31070
|
-
}, async ({ name, owner, section, descriptionHeading, description, room, state, account }) => {
|
|
31071
|
-
const args = ["classroom", "courses", "create", `--name=${name}`];
|
|
31072
|
-
if (owner) args.push(`--owner=${owner}`);
|
|
31073
|
-
if (section) args.push(`--section=${section}`);
|
|
31074
|
-
if (descriptionHeading) args.push(`--description-heading=${descriptionHeading}`);
|
|
31075
|
-
if (description) args.push(`--description=${description}`);
|
|
31076
|
-
if (room) args.push(`--room=${room}`);
|
|
31077
|
-
if (state) args.push(`--state=${state}`);
|
|
31078
|
-
return runOrDiagnose(args, { account });
|
|
31079
|
-
});
|
|
31080
|
-
server2.registerTool("gog_classroom_courses_update", {
|
|
31081
|
-
description: "Update an existing Google Classroom course.",
|
|
31082
|
-
annotations: { destructiveHint: true },
|
|
31083
|
-
inputSchema: {
|
|
31084
|
-
courseId: external_exports.string().describe("Course ID"),
|
|
31085
|
-
name: external_exports.string().optional().describe("Course name"),
|
|
31086
|
-
owner: external_exports.string().optional().describe("Owner user ID"),
|
|
31087
|
-
section: external_exports.string().optional().describe("Section"),
|
|
31088
|
-
descriptionHeading: external_exports.string().optional().describe("Description heading"),
|
|
31089
|
-
description: external_exports.string().optional().describe("Description"),
|
|
31090
|
-
room: external_exports.string().optional().describe("Room"),
|
|
31091
|
-
state: external_exports.string().optional().describe("Course state: ACTIVE, ARCHIVED, PROVISIONED, DECLINED, SUSPENDED"),
|
|
31092
|
-
account: accountParam
|
|
31093
|
-
}
|
|
31094
|
-
}, async ({ courseId, name, owner, section, descriptionHeading, description, room, state, account }) => {
|
|
31095
|
-
const args = ["classroom", "courses", "update", courseId];
|
|
31096
|
-
if (name) args.push(`--name=${name}`);
|
|
31097
|
-
if (owner) args.push(`--owner=${owner}`);
|
|
31098
|
-
if (section) args.push(`--section=${section}`);
|
|
31099
|
-
if (descriptionHeading) args.push(`--description-heading=${descriptionHeading}`);
|
|
31100
|
-
if (description) args.push(`--description=${description}`);
|
|
31101
|
-
if (room) args.push(`--room=${room}`);
|
|
31102
|
-
if (state) args.push(`--state=${state}`);
|
|
31103
|
-
return runOrDiagnose(args, { account });
|
|
31104
|
-
});
|
|
31105
|
-
server2.registerTool("gog_classroom_courses_delete", {
|
|
31106
|
-
description: "Delete a Google Classroom course.",
|
|
31107
|
-
annotations: { destructiveHint: true },
|
|
31108
|
-
inputSchema: {
|
|
31109
|
-
courseId: external_exports.string().describe("Course ID"),
|
|
31110
|
-
account: accountParam
|
|
31111
|
-
}
|
|
31112
|
-
}, async ({ courseId, account }) => {
|
|
31113
|
-
return runOrDiagnose(["classroom", "courses", "delete", courseId], { account });
|
|
31114
|
-
});
|
|
31115
|
-
server2.registerTool("gog_classroom_courses_archive", {
|
|
31116
|
-
description: "Archive a Google Classroom course.",
|
|
31117
|
-
annotations: { destructiveHint: true },
|
|
31118
|
-
inputSchema: {
|
|
31119
|
-
courseId: external_exports.string().describe("Course ID"),
|
|
31120
|
-
account: accountParam
|
|
31121
|
-
}
|
|
31122
|
-
}, async ({ courseId, account }) => {
|
|
31123
|
-
return runOrDiagnose(["classroom", "courses", "archive", courseId], { account });
|
|
31124
|
-
});
|
|
31125
|
-
server2.registerTool("gog_classroom_courses_unarchive", {
|
|
31126
|
-
description: "Unarchive a Google Classroom course (restore to ACTIVE).",
|
|
31127
|
-
annotations: { destructiveHint: true },
|
|
31128
|
-
inputSchema: {
|
|
31129
|
-
courseId: external_exports.string().describe("Course ID"),
|
|
31130
|
-
account: accountParam
|
|
31131
|
-
}
|
|
31132
|
-
}, async ({ courseId, account }) => {
|
|
31133
|
-
return runOrDiagnose(["classroom", "courses", "unarchive", courseId], { account });
|
|
31134
|
-
});
|
|
31135
31064
|
server2.registerTool("gog_classroom_students_list", {
|
|
31136
31065
|
description: "List students enrolled in a Google Classroom course.",
|
|
31137
31066
|
annotations: { readOnlyHint: true },
|
|
@@ -31160,30 +31089,6 @@ function registerClassroomTools(server2) {
|
|
|
31160
31089
|
}, async ({ courseId, userId, account }) => {
|
|
31161
31090
|
return runOrDiagnose(["classroom", "students", "get", courseId, userId], { account });
|
|
31162
31091
|
});
|
|
31163
|
-
server2.registerTool("gog_classroom_students_add", {
|
|
31164
|
-
description: "Add a student to a Google Classroom course.",
|
|
31165
|
-
inputSchema: {
|
|
31166
|
-
courseId: external_exports.string().describe("Course ID"),
|
|
31167
|
-
userId: external_exports.string().describe('Student user ID (or "me")'),
|
|
31168
|
-
enrollmentCode: external_exports.string().optional().describe("Enrollment code (required if adding self via code)"),
|
|
31169
|
-
account: accountParam
|
|
31170
|
-
}
|
|
31171
|
-
}, async ({ courseId, userId, enrollmentCode, account }) => {
|
|
31172
|
-
const args = ["classroom", "students", "add", courseId, userId];
|
|
31173
|
-
if (enrollmentCode) args.push(`--enrollment-code=${enrollmentCode}`);
|
|
31174
|
-
return runOrDiagnose(args, { account });
|
|
31175
|
-
});
|
|
31176
|
-
server2.registerTool("gog_classroom_students_remove", {
|
|
31177
|
-
description: "Remove a student from a Google Classroom course.",
|
|
31178
|
-
annotations: { destructiveHint: true },
|
|
31179
|
-
inputSchema: {
|
|
31180
|
-
courseId: external_exports.string().describe("Course ID"),
|
|
31181
|
-
userId: external_exports.string().describe("Student user ID"),
|
|
31182
|
-
account: accountParam
|
|
31183
|
-
}
|
|
31184
|
-
}, async ({ courseId, userId, account }) => {
|
|
31185
|
-
return runOrDiagnose(["classroom", "students", "remove", courseId, userId], { account });
|
|
31186
|
-
});
|
|
31187
31092
|
server2.registerTool("gog_classroom_teachers_list", {
|
|
31188
31093
|
description: "List teachers in a Google Classroom course.",
|
|
31189
31094
|
annotations: { readOnlyHint: true },
|
|
@@ -31212,27 +31117,6 @@ function registerClassroomTools(server2) {
|
|
|
31212
31117
|
}, async ({ courseId, userId, account }) => {
|
|
31213
31118
|
return runOrDiagnose(["classroom", "teachers", "get", courseId, userId], { account });
|
|
31214
31119
|
});
|
|
31215
|
-
server2.registerTool("gog_classroom_teachers_add", {
|
|
31216
|
-
description: "Add a teacher to a Google Classroom course.",
|
|
31217
|
-
inputSchema: {
|
|
31218
|
-
courseId: external_exports.string().describe("Course ID"),
|
|
31219
|
-
userId: external_exports.string().describe("Teacher user ID"),
|
|
31220
|
-
account: accountParam
|
|
31221
|
-
}
|
|
31222
|
-
}, async ({ courseId, userId, account }) => {
|
|
31223
|
-
return runOrDiagnose(["classroom", "teachers", "add", courseId, userId], { account });
|
|
31224
|
-
});
|
|
31225
|
-
server2.registerTool("gog_classroom_teachers_remove", {
|
|
31226
|
-
description: "Remove a teacher from a Google Classroom course.",
|
|
31227
|
-
annotations: { destructiveHint: true },
|
|
31228
|
-
inputSchema: {
|
|
31229
|
-
courseId: external_exports.string().describe("Course ID"),
|
|
31230
|
-
userId: external_exports.string().describe("Teacher user ID"),
|
|
31231
|
-
account: accountParam
|
|
31232
|
-
}
|
|
31233
|
-
}, async ({ courseId, userId, account }) => {
|
|
31234
|
-
return runOrDiagnose(["classroom", "teachers", "remove", courseId, userId], { account });
|
|
31235
|
-
});
|
|
31236
31120
|
server2.registerTool("gog_classroom_roster", {
|
|
31237
31121
|
description: "List the full roster (students and/or teachers) of a Google Classroom course. Omit both flags to return both groups.",
|
|
31238
31122
|
annotations: { readOnlyHint: true },
|
|
@@ -31290,78 +31174,6 @@ function registerClassroomTools(server2) {
|
|
|
31290
31174
|
}, async ({ courseId, courseworkId, account }) => {
|
|
31291
31175
|
return runOrDiagnose(["classroom", "coursework", "get", courseId, courseworkId], { account });
|
|
31292
31176
|
});
|
|
31293
|
-
server2.registerTool("gog_classroom_coursework_create", {
|
|
31294
|
-
description: "Create a new coursework item (assignment, question, etc.) in a course.",
|
|
31295
|
-
inputSchema: {
|
|
31296
|
-
courseId: external_exports.string().describe("Course ID"),
|
|
31297
|
-
title: external_exports.string().describe("Coursework title"),
|
|
31298
|
-
description: external_exports.string().optional().describe("Description"),
|
|
31299
|
-
type: external_exports.string().optional().describe("Work type (ASSIGNMENT, SHORT_ANSWER_QUESTION, MULTIPLE_CHOICE_QUESTION). Default: ASSIGNMENT"),
|
|
31300
|
-
state: external_exports.string().optional().describe("State: PUBLISHED or DRAFT"),
|
|
31301
|
-
maxPoints: external_exports.number().optional().describe("Max points"),
|
|
31302
|
-
due: external_exports.string().optional().describe("Due datetime (combined date+time)"),
|
|
31303
|
-
dueDate: external_exports.string().optional().describe("Due date (YYYY-MM-DD)"),
|
|
31304
|
-
dueTime: external_exports.string().optional().describe("Due time (HH:MM)"),
|
|
31305
|
-
scheduled: external_exports.string().optional().describe("Scheduled publish time"),
|
|
31306
|
-
topic: external_exports.string().optional().describe("Topic ID"),
|
|
31307
|
-
account: accountParam
|
|
31308
|
-
}
|
|
31309
|
-
}, async ({ courseId, title, description, type, state, maxPoints, due, dueDate, dueTime, scheduled, topic, account }) => {
|
|
31310
|
-
const args = ["classroom", "coursework", "create", courseId, `--title=${title}`];
|
|
31311
|
-
if (description) args.push(`--description=${description}`);
|
|
31312
|
-
if (type) args.push(`--type=${type}`);
|
|
31313
|
-
if (state) args.push(`--state=${state}`);
|
|
31314
|
-
if (maxPoints !== void 0) args.push(`--max-points=${maxPoints}`);
|
|
31315
|
-
if (due) args.push(`--due=${due}`);
|
|
31316
|
-
if (dueDate) args.push(`--due-date=${dueDate}`);
|
|
31317
|
-
if (dueTime) args.push(`--due-time=${dueTime}`);
|
|
31318
|
-
if (scheduled) args.push(`--scheduled=${scheduled}`);
|
|
31319
|
-
if (topic) args.push(`--topic=${topic}`);
|
|
31320
|
-
return runOrDiagnose(args, { account });
|
|
31321
|
-
});
|
|
31322
|
-
server2.registerTool("gog_classroom_coursework_update", {
|
|
31323
|
-
description: "Update an existing coursework item.",
|
|
31324
|
-
annotations: { destructiveHint: true },
|
|
31325
|
-
inputSchema: {
|
|
31326
|
-
courseId: external_exports.string().describe("Course ID"),
|
|
31327
|
-
courseworkId: external_exports.string().describe("Coursework ID"),
|
|
31328
|
-
title: external_exports.string().optional().describe("New title"),
|
|
31329
|
-
description: external_exports.string().optional().describe("New description"),
|
|
31330
|
-
type: external_exports.string().optional().describe("Work type"),
|
|
31331
|
-
state: external_exports.string().optional().describe("State: PUBLISHED or DRAFT"),
|
|
31332
|
-
maxPoints: external_exports.number().optional().describe("Max points"),
|
|
31333
|
-
due: external_exports.string().optional().describe("Due datetime"),
|
|
31334
|
-
dueDate: external_exports.string().optional().describe("Due date (YYYY-MM-DD)"),
|
|
31335
|
-
dueTime: external_exports.string().optional().describe("Due time (HH:MM)"),
|
|
31336
|
-
scheduled: external_exports.string().optional().describe("Scheduled publish time"),
|
|
31337
|
-
topic: external_exports.string().optional().describe("Topic ID"),
|
|
31338
|
-
account: accountParam
|
|
31339
|
-
}
|
|
31340
|
-
}, async ({ courseId, courseworkId, title, description, type, state, maxPoints, due, dueDate, dueTime, scheduled, topic, account }) => {
|
|
31341
|
-
const args = ["classroom", "coursework", "update", courseId, courseworkId];
|
|
31342
|
-
if (title) args.push(`--title=${title}`);
|
|
31343
|
-
if (description) args.push(`--description=${description}`);
|
|
31344
|
-
if (type) args.push(`--type=${type}`);
|
|
31345
|
-
if (state) args.push(`--state=${state}`);
|
|
31346
|
-
if (maxPoints !== void 0) args.push(`--max-points=${maxPoints}`);
|
|
31347
|
-
if (due) args.push(`--due=${due}`);
|
|
31348
|
-
if (dueDate) args.push(`--due-date=${dueDate}`);
|
|
31349
|
-
if (dueTime) args.push(`--due-time=${dueTime}`);
|
|
31350
|
-
if (scheduled) args.push(`--scheduled=${scheduled}`);
|
|
31351
|
-
if (topic) args.push(`--topic=${topic}`);
|
|
31352
|
-
return runOrDiagnose(args, { account });
|
|
31353
|
-
});
|
|
31354
|
-
server2.registerTool("gog_classroom_coursework_delete", {
|
|
31355
|
-
description: "Delete a coursework item.",
|
|
31356
|
-
annotations: { destructiveHint: true },
|
|
31357
|
-
inputSchema: {
|
|
31358
|
-
courseId: external_exports.string().describe("Course ID"),
|
|
31359
|
-
courseworkId: external_exports.string().describe("Coursework ID"),
|
|
31360
|
-
account: accountParam
|
|
31361
|
-
}
|
|
31362
|
-
}, async ({ courseId, courseworkId, account }) => {
|
|
31363
|
-
return runOrDiagnose(["classroom", "coursework", "delete", courseId, courseworkId], { account });
|
|
31364
|
-
});
|
|
31365
31177
|
server2.registerTool("gog_classroom_submissions_list", {
|
|
31366
31178
|
description: "List student submissions for a coursework item.",
|
|
31367
31179
|
annotations: { readOnlyHint: true },
|
|
@@ -31488,7 +31300,7 @@ function registerClassroomTools(server2) {
|
|
|
31488
31300
|
inputSchema: {
|
|
31489
31301
|
courseId: external_exports.string().describe("Course ID"),
|
|
31490
31302
|
text: external_exports.string().describe("Announcement text"),
|
|
31491
|
-
state: external_exports.
|
|
31303
|
+
state: external_exports.enum(["PUBLISHED", "DRAFT"]).optional().describe("State"),
|
|
31492
31304
|
scheduled: external_exports.string().optional().describe("Scheduled publish time"),
|
|
31493
31305
|
account: accountParam
|
|
31494
31306
|
}
|
|
@@ -31498,35 +31310,6 @@ function registerClassroomTools(server2) {
|
|
|
31498
31310
|
if (scheduled) args.push(`--scheduled=${scheduled}`);
|
|
31499
31311
|
return runOrDiagnose(args, { account });
|
|
31500
31312
|
});
|
|
31501
|
-
server2.registerTool("gog_classroom_announcements_update", {
|
|
31502
|
-
description: "Update an existing announcement.",
|
|
31503
|
-
annotations: { destructiveHint: true },
|
|
31504
|
-
inputSchema: {
|
|
31505
|
-
courseId: external_exports.string().describe("Course ID"),
|
|
31506
|
-
announcementId: external_exports.string().describe("Announcement ID"),
|
|
31507
|
-
text: external_exports.string().optional().describe("New text"),
|
|
31508
|
-
state: external_exports.string().optional().describe("State: PUBLISHED or DRAFT"),
|
|
31509
|
-
scheduled: external_exports.string().optional().describe("Scheduled publish time"),
|
|
31510
|
-
account: accountParam
|
|
31511
|
-
}
|
|
31512
|
-
}, async ({ courseId, announcementId, text, state, scheduled, account }) => {
|
|
31513
|
-
const args = ["classroom", "announcements", "update", courseId, announcementId];
|
|
31514
|
-
if (text) args.push(`--text=${text}`);
|
|
31515
|
-
if (state) args.push(`--state=${state}`);
|
|
31516
|
-
if (scheduled) args.push(`--scheduled=${scheduled}`);
|
|
31517
|
-
return runOrDiagnose(args, { account });
|
|
31518
|
-
});
|
|
31519
|
-
server2.registerTool("gog_classroom_announcements_delete", {
|
|
31520
|
-
description: "Delete an announcement.",
|
|
31521
|
-
annotations: { destructiveHint: true },
|
|
31522
|
-
inputSchema: {
|
|
31523
|
-
courseId: external_exports.string().describe("Course ID"),
|
|
31524
|
-
announcementId: external_exports.string().describe("Announcement ID"),
|
|
31525
|
-
account: accountParam
|
|
31526
|
-
}
|
|
31527
|
-
}, async ({ courseId, announcementId, account }) => {
|
|
31528
|
-
return runOrDiagnose(["classroom", "announcements", "delete", courseId, announcementId], { account });
|
|
31529
|
-
});
|
|
31530
31313
|
server2.registerTool("gog_classroom_topics_list", {
|
|
31531
31314
|
description: "List topics in a Google Classroom course.",
|
|
31532
31315
|
annotations: { readOnlyHint: true },
|
|
@@ -31555,39 +31338,6 @@ function registerClassroomTools(server2) {
|
|
|
31555
31338
|
}, async ({ courseId, topicId, account }) => {
|
|
31556
31339
|
return runOrDiagnose(["classroom", "topics", "get", courseId, topicId], { account });
|
|
31557
31340
|
});
|
|
31558
|
-
server2.registerTool("gog_classroom_topics_create", {
|
|
31559
|
-
description: "Create a topic in a Google Classroom course.",
|
|
31560
|
-
inputSchema: {
|
|
31561
|
-
courseId: external_exports.string().describe("Course ID"),
|
|
31562
|
-
name: external_exports.string().describe("Topic name"),
|
|
31563
|
-
account: accountParam
|
|
31564
|
-
}
|
|
31565
|
-
}, async ({ courseId, name, account }) => {
|
|
31566
|
-
return runOrDiagnose(["classroom", "topics", "create", courseId, `--name=${name}`], { account });
|
|
31567
|
-
});
|
|
31568
|
-
server2.registerTool("gog_classroom_topics_update", {
|
|
31569
|
-
description: "Rename an existing topic.",
|
|
31570
|
-
annotations: { destructiveHint: true },
|
|
31571
|
-
inputSchema: {
|
|
31572
|
-
courseId: external_exports.string().describe("Course ID"),
|
|
31573
|
-
topicId: external_exports.string().describe("Topic ID"),
|
|
31574
|
-
name: external_exports.string().describe("New topic name"),
|
|
31575
|
-
account: accountParam
|
|
31576
|
-
}
|
|
31577
|
-
}, async ({ courseId, topicId, name, account }) => {
|
|
31578
|
-
return runOrDiagnose(["classroom", "topics", "update", courseId, topicId, `--name=${name}`], { account });
|
|
31579
|
-
});
|
|
31580
|
-
server2.registerTool("gog_classroom_topics_delete", {
|
|
31581
|
-
description: "Delete a topic.",
|
|
31582
|
-
annotations: { destructiveHint: true },
|
|
31583
|
-
inputSchema: {
|
|
31584
|
-
courseId: external_exports.string().describe("Course ID"),
|
|
31585
|
-
topicId: external_exports.string().describe("Topic ID"),
|
|
31586
|
-
account: accountParam
|
|
31587
|
-
}
|
|
31588
|
-
}, async ({ courseId, topicId, account }) => {
|
|
31589
|
-
return runOrDiagnose(["classroom", "topics", "delete", courseId, topicId], { account });
|
|
31590
|
-
});
|
|
31591
31341
|
server2.registerTool("gog_classroom_invitations_list", {
|
|
31592
31342
|
description: "List Google Classroom invitations.",
|
|
31593
31343
|
annotations: { readOnlyHint: true },
|
|
@@ -31618,17 +31368,6 @@ function registerClassroomTools(server2) {
|
|
|
31618
31368
|
}, async ({ invitationId, account }) => {
|
|
31619
31369
|
return runOrDiagnose(["classroom", "invitations", "get", invitationId], { account });
|
|
31620
31370
|
});
|
|
31621
|
-
server2.registerTool("gog_classroom_invitations_create", {
|
|
31622
|
-
description: "Create an invitation to a Google Classroom course.",
|
|
31623
|
-
inputSchema: {
|
|
31624
|
-
courseId: external_exports.string().describe("Course ID"),
|
|
31625
|
-
userId: external_exports.string().describe("User ID to invite"),
|
|
31626
|
-
role: external_exports.enum(["STUDENT", "TEACHER", "OWNER"]).describe("Role for the invited user"),
|
|
31627
|
-
account: accountParam
|
|
31628
|
-
}
|
|
31629
|
-
}, async ({ courseId, userId, role, account }) => {
|
|
31630
|
-
return runOrDiagnose(["classroom", "invitations", "create", courseId, userId, `--role=${role}`], { account });
|
|
31631
|
-
});
|
|
31632
31371
|
server2.registerTool("gog_classroom_invitations_accept", {
|
|
31633
31372
|
description: "Accept a Google Classroom invitation.",
|
|
31634
31373
|
inputSchema: {
|
|
@@ -31638,16 +31377,6 @@ function registerClassroomTools(server2) {
|
|
|
31638
31377
|
}, async ({ invitationId, account }) => {
|
|
31639
31378
|
return runOrDiagnose(["classroom", "invitations", "accept", invitationId], { account });
|
|
31640
31379
|
});
|
|
31641
|
-
server2.registerTool("gog_classroom_invitations_delete", {
|
|
31642
|
-
description: "Delete (revoke) a Google Classroom invitation.",
|
|
31643
|
-
annotations: { destructiveHint: true },
|
|
31644
|
-
inputSchema: {
|
|
31645
|
-
invitationId: external_exports.string().describe("Invitation ID"),
|
|
31646
|
-
account: accountParam
|
|
31647
|
-
}
|
|
31648
|
-
}, async ({ invitationId, account }) => {
|
|
31649
|
-
return runOrDiagnose(["classroom", "invitations", "delete", invitationId], { account });
|
|
31650
|
-
});
|
|
31651
31380
|
server2.registerTool("gog_classroom_profile_get", {
|
|
31652
31381
|
description: "Get a Google Classroom user profile. Omit userId to fetch the authenticated user.",
|
|
31653
31382
|
annotations: { readOnlyHint: true },
|
|
@@ -31662,6 +31391,7 @@ function registerClassroomTools(server2) {
|
|
|
31662
31391
|
});
|
|
31663
31392
|
server2.registerTool("gog_classroom_run", {
|
|
31664
31393
|
description: "Run any gog classroom subcommand not covered by the other tools (guardians, guardian-invitations, materials, coursework assignees, announcement assignees, etc.). Run `gog classroom --help` for the full list, or `gog classroom <subcommand> --help` for flags.",
|
|
31394
|
+
annotations: { destructiveHint: true },
|
|
31665
31395
|
inputSchema: {
|
|
31666
31396
|
subcommand: external_exports.string().describe('The gog classroom subcommand to run, e.g. "guardians", "materials", "guardian-invitations"'),
|
|
31667
31397
|
args: external_exports.array(external_exports.string()).describe("Additional positional args and flags"),
|
|
@@ -31673,7 +31403,7 @@ function registerClassroomTools(server2) {
|
|
|
31673
31403
|
}
|
|
31674
31404
|
|
|
31675
31405
|
// ../gogcli-mcp/src/server.ts
|
|
31676
|
-
var VERSION = true ? "2.0.
|
|
31406
|
+
var VERSION = true ? "2.0.5" : "0.0.0";
|
|
31677
31407
|
function createServer(options) {
|
|
31678
31408
|
return new McpServer({
|
|
31679
31409
|
name: options?.name ?? "gogcli",
|
|
@@ -31682,7 +31412,279 @@ function createServer(options) {
|
|
|
31682
31412
|
}
|
|
31683
31413
|
|
|
31684
31414
|
// src/tools/classroom-extra.ts
|
|
31685
|
-
|
|
31415
|
+
var courseState = external_exports.enum(["ACTIVE", "ARCHIVED", "PROVISIONED", "DECLINED", "SUSPENDED"]);
|
|
31416
|
+
var workState = external_exports.enum(["PUBLISHED", "DRAFT"]);
|
|
31417
|
+
var workType = external_exports.enum(["ASSIGNMENT", "SHORT_ANSWER_QUESTION", "MULTIPLE_CHOICE_QUESTION"]);
|
|
31418
|
+
var courseSharedFields = {
|
|
31419
|
+
owner: external_exports.string().optional().describe('Owner user ID (default "me" on create)'),
|
|
31420
|
+
section: external_exports.string().optional().describe("Section"),
|
|
31421
|
+
descriptionHeading: external_exports.string().optional().describe("Description heading"),
|
|
31422
|
+
description: external_exports.string().optional().describe("Description"),
|
|
31423
|
+
room: external_exports.string().optional().describe("Room"),
|
|
31424
|
+
state: courseState.optional().describe("Course state")
|
|
31425
|
+
};
|
|
31426
|
+
var courseworkSharedFields = {
|
|
31427
|
+
description: external_exports.string().optional().describe("Description"),
|
|
31428
|
+
type: workType.optional().describe("Work type (default: ASSIGNMENT)"),
|
|
31429
|
+
state: workState.optional().describe("State"),
|
|
31430
|
+
maxPoints: external_exports.number().optional().describe("Max points"),
|
|
31431
|
+
due: external_exports.string().optional().describe("Due datetime (combined date+time)"),
|
|
31432
|
+
dueDate: external_exports.string().optional().describe("Due date (YYYY-MM-DD)"),
|
|
31433
|
+
dueTime: external_exports.string().optional().describe("Due time (HH:MM)"),
|
|
31434
|
+
scheduled: external_exports.string().optional().describe("Scheduled publish time"),
|
|
31435
|
+
topic: external_exports.string().optional().describe("Topic ID")
|
|
31436
|
+
};
|
|
31437
|
+
function registerExtraClassroomTools(server2) {
|
|
31438
|
+
server2.registerTool("gog_classroom_courses_create", {
|
|
31439
|
+
description: "Create a new Google Classroom course.",
|
|
31440
|
+
inputSchema: {
|
|
31441
|
+
name: external_exports.string().describe("Course name"),
|
|
31442
|
+
...courseSharedFields,
|
|
31443
|
+
account: accountParam
|
|
31444
|
+
}
|
|
31445
|
+
}, async ({ name, owner, section, descriptionHeading, description, room, state, account }) => {
|
|
31446
|
+
const args = ["classroom", "courses", "create", `--name=${name}`];
|
|
31447
|
+
if (owner) args.push(`--owner=${owner}`);
|
|
31448
|
+
if (section) args.push(`--section=${section}`);
|
|
31449
|
+
if (descriptionHeading) args.push(`--description-heading=${descriptionHeading}`);
|
|
31450
|
+
if (description) args.push(`--description=${description}`);
|
|
31451
|
+
if (room) args.push(`--room=${room}`);
|
|
31452
|
+
if (state) args.push(`--state=${state}`);
|
|
31453
|
+
return runOrDiagnose(args, { account });
|
|
31454
|
+
});
|
|
31455
|
+
server2.registerTool("gog_classroom_courses_update", {
|
|
31456
|
+
description: "Update an existing Google Classroom course.",
|
|
31457
|
+
annotations: { destructiveHint: true },
|
|
31458
|
+
inputSchema: {
|
|
31459
|
+
courseId: external_exports.string().describe("Course ID"),
|
|
31460
|
+
name: external_exports.string().optional().describe("Course name"),
|
|
31461
|
+
...courseSharedFields,
|
|
31462
|
+
account: accountParam
|
|
31463
|
+
}
|
|
31464
|
+
}, async ({ courseId, name, owner, section, descriptionHeading, description, room, state, account }) => {
|
|
31465
|
+
const args = ["classroom", "courses", "update", courseId];
|
|
31466
|
+
if (name) args.push(`--name=${name}`);
|
|
31467
|
+
if (owner) args.push(`--owner=${owner}`);
|
|
31468
|
+
if (section) args.push(`--section=${section}`);
|
|
31469
|
+
if (descriptionHeading) args.push(`--description-heading=${descriptionHeading}`);
|
|
31470
|
+
if (description) args.push(`--description=${description}`);
|
|
31471
|
+
if (room) args.push(`--room=${room}`);
|
|
31472
|
+
if (state) args.push(`--state=${state}`);
|
|
31473
|
+
return runOrDiagnose(args, { account });
|
|
31474
|
+
});
|
|
31475
|
+
server2.registerTool("gog_classroom_courses_delete", {
|
|
31476
|
+
description: "Delete a Google Classroom course.",
|
|
31477
|
+
annotations: { destructiveHint: true },
|
|
31478
|
+
inputSchema: {
|
|
31479
|
+
courseId: external_exports.string().describe("Course ID"),
|
|
31480
|
+
account: accountParam
|
|
31481
|
+
}
|
|
31482
|
+
}, async ({ courseId, account }) => {
|
|
31483
|
+
return runOrDiagnose(["classroom", "courses", "delete", courseId], { account });
|
|
31484
|
+
});
|
|
31485
|
+
server2.registerTool("gog_classroom_courses_archive", {
|
|
31486
|
+
description: "Archive a Google Classroom course.",
|
|
31487
|
+
annotations: { destructiveHint: true },
|
|
31488
|
+
inputSchema: {
|
|
31489
|
+
courseId: external_exports.string().describe("Course ID"),
|
|
31490
|
+
account: accountParam
|
|
31491
|
+
}
|
|
31492
|
+
}, async ({ courseId, account }) => {
|
|
31493
|
+
return runOrDiagnose(["classroom", "courses", "archive", courseId], { account });
|
|
31494
|
+
});
|
|
31495
|
+
server2.registerTool("gog_classroom_courses_unarchive", {
|
|
31496
|
+
description: "Unarchive a Google Classroom course (restore to ACTIVE).",
|
|
31497
|
+
inputSchema: {
|
|
31498
|
+
courseId: external_exports.string().describe("Course ID"),
|
|
31499
|
+
account: accountParam
|
|
31500
|
+
}
|
|
31501
|
+
}, async ({ courseId, account }) => {
|
|
31502
|
+
return runOrDiagnose(["classroom", "courses", "unarchive", courseId], { account });
|
|
31503
|
+
});
|
|
31504
|
+
server2.registerTool("gog_classroom_students_add", {
|
|
31505
|
+
description: "Add a student to a Google Classroom course.",
|
|
31506
|
+
inputSchema: {
|
|
31507
|
+
courseId: external_exports.string().describe("Course ID"),
|
|
31508
|
+
userId: external_exports.string().describe('Student user ID (or "me")'),
|
|
31509
|
+
enrollmentCode: external_exports.string().optional().describe("Enrollment code (required if adding self via code)"),
|
|
31510
|
+
account: accountParam
|
|
31511
|
+
}
|
|
31512
|
+
}, async ({ courseId, userId, enrollmentCode, account }) => {
|
|
31513
|
+
const args = ["classroom", "students", "add", courseId, userId];
|
|
31514
|
+
if (enrollmentCode) args.push(`--enrollment-code=${enrollmentCode}`);
|
|
31515
|
+
return runOrDiagnose(args, { account });
|
|
31516
|
+
});
|
|
31517
|
+
server2.registerTool("gog_classroom_students_remove", {
|
|
31518
|
+
description: "Remove a student from a Google Classroom course.",
|
|
31519
|
+
annotations: { destructiveHint: true },
|
|
31520
|
+
inputSchema: {
|
|
31521
|
+
courseId: external_exports.string().describe("Course ID"),
|
|
31522
|
+
userId: external_exports.string().describe("Student user ID"),
|
|
31523
|
+
account: accountParam
|
|
31524
|
+
}
|
|
31525
|
+
}, async ({ courseId, userId, account }) => {
|
|
31526
|
+
return runOrDiagnose(["classroom", "students", "remove", courseId, userId], { account });
|
|
31527
|
+
});
|
|
31528
|
+
server2.registerTool("gog_classroom_teachers_add", {
|
|
31529
|
+
description: "Add a teacher to a Google Classroom course.",
|
|
31530
|
+
inputSchema: {
|
|
31531
|
+
courseId: external_exports.string().describe("Course ID"),
|
|
31532
|
+
userId: external_exports.string().describe("Teacher user ID"),
|
|
31533
|
+
account: accountParam
|
|
31534
|
+
}
|
|
31535
|
+
}, async ({ courseId, userId, account }) => {
|
|
31536
|
+
return runOrDiagnose(["classroom", "teachers", "add", courseId, userId], { account });
|
|
31537
|
+
});
|
|
31538
|
+
server2.registerTool("gog_classroom_teachers_remove", {
|
|
31539
|
+
description: "Remove a teacher from a Google Classroom course.",
|
|
31540
|
+
annotations: { destructiveHint: true },
|
|
31541
|
+
inputSchema: {
|
|
31542
|
+
courseId: external_exports.string().describe("Course ID"),
|
|
31543
|
+
userId: external_exports.string().describe("Teacher user ID"),
|
|
31544
|
+
account: accountParam
|
|
31545
|
+
}
|
|
31546
|
+
}, async ({ courseId, userId, account }) => {
|
|
31547
|
+
return runOrDiagnose(["classroom", "teachers", "remove", courseId, userId], { account });
|
|
31548
|
+
});
|
|
31549
|
+
server2.registerTool("gog_classroom_coursework_create", {
|
|
31550
|
+
description: "Create a new coursework item (assignment, question, etc.) in a course.",
|
|
31551
|
+
inputSchema: {
|
|
31552
|
+
courseId: external_exports.string().describe("Course ID"),
|
|
31553
|
+
title: external_exports.string().describe("Coursework title"),
|
|
31554
|
+
...courseworkSharedFields,
|
|
31555
|
+
account: accountParam
|
|
31556
|
+
}
|
|
31557
|
+
}, async ({ courseId, title, description, type, state, maxPoints, due, dueDate, dueTime, scheduled, topic, account }) => {
|
|
31558
|
+
const args = ["classroom", "coursework", "create", courseId, `--title=${title}`];
|
|
31559
|
+
if (description) args.push(`--description=${description}`);
|
|
31560
|
+
if (type) args.push(`--type=${type}`);
|
|
31561
|
+
if (state) args.push(`--state=${state}`);
|
|
31562
|
+
if (maxPoints !== void 0) args.push(`--max-points=${maxPoints}`);
|
|
31563
|
+
if (due) args.push(`--due=${due}`);
|
|
31564
|
+
if (dueDate) args.push(`--due-date=${dueDate}`);
|
|
31565
|
+
if (dueTime) args.push(`--due-time=${dueTime}`);
|
|
31566
|
+
if (scheduled) args.push(`--scheduled=${scheduled}`);
|
|
31567
|
+
if (topic) args.push(`--topic=${topic}`);
|
|
31568
|
+
return runOrDiagnose(args, { account });
|
|
31569
|
+
});
|
|
31570
|
+
server2.registerTool("gog_classroom_coursework_update", {
|
|
31571
|
+
description: "Update an existing coursework item.",
|
|
31572
|
+
annotations: { destructiveHint: true },
|
|
31573
|
+
inputSchema: {
|
|
31574
|
+
courseId: external_exports.string().describe("Course ID"),
|
|
31575
|
+
courseworkId: external_exports.string().describe("Coursework ID"),
|
|
31576
|
+
title: external_exports.string().optional().describe("New title"),
|
|
31577
|
+
...courseworkSharedFields,
|
|
31578
|
+
account: accountParam
|
|
31579
|
+
}
|
|
31580
|
+
}, async ({ courseId, courseworkId, title, description, type, state, maxPoints, due, dueDate, dueTime, scheduled, topic, account }) => {
|
|
31581
|
+
const args = ["classroom", "coursework", "update", courseId, courseworkId];
|
|
31582
|
+
if (title) args.push(`--title=${title}`);
|
|
31583
|
+
if (description) args.push(`--description=${description}`);
|
|
31584
|
+
if (type) args.push(`--type=${type}`);
|
|
31585
|
+
if (state) args.push(`--state=${state}`);
|
|
31586
|
+
if (maxPoints !== void 0) args.push(`--max-points=${maxPoints}`);
|
|
31587
|
+
if (due) args.push(`--due=${due}`);
|
|
31588
|
+
if (dueDate) args.push(`--due-date=${dueDate}`);
|
|
31589
|
+
if (dueTime) args.push(`--due-time=${dueTime}`);
|
|
31590
|
+
if (scheduled) args.push(`--scheduled=${scheduled}`);
|
|
31591
|
+
if (topic) args.push(`--topic=${topic}`);
|
|
31592
|
+
return runOrDiagnose(args, { account });
|
|
31593
|
+
});
|
|
31594
|
+
server2.registerTool("gog_classroom_coursework_delete", {
|
|
31595
|
+
description: "Delete a coursework item.",
|
|
31596
|
+
annotations: { destructiveHint: true },
|
|
31597
|
+
inputSchema: {
|
|
31598
|
+
courseId: external_exports.string().describe("Course ID"),
|
|
31599
|
+
courseworkId: external_exports.string().describe("Coursework ID"),
|
|
31600
|
+
account: accountParam
|
|
31601
|
+
}
|
|
31602
|
+
}, async ({ courseId, courseworkId, account }) => {
|
|
31603
|
+
return runOrDiagnose(["classroom", "coursework", "delete", courseId, courseworkId], { account });
|
|
31604
|
+
});
|
|
31605
|
+
server2.registerTool("gog_classroom_announcements_update", {
|
|
31606
|
+
description: "Update an existing announcement.",
|
|
31607
|
+
annotations: { destructiveHint: true },
|
|
31608
|
+
inputSchema: {
|
|
31609
|
+
courseId: external_exports.string().describe("Course ID"),
|
|
31610
|
+
announcementId: external_exports.string().describe("Announcement ID"),
|
|
31611
|
+
text: external_exports.string().optional().describe("New text"),
|
|
31612
|
+
state: workState.optional().describe("State"),
|
|
31613
|
+
scheduled: external_exports.string().optional().describe("Scheduled publish time"),
|
|
31614
|
+
account: accountParam
|
|
31615
|
+
}
|
|
31616
|
+
}, async ({ courseId, announcementId, text, state, scheduled, account }) => {
|
|
31617
|
+
const args = ["classroom", "announcements", "update", courseId, announcementId];
|
|
31618
|
+
if (text) args.push(`--text=${text}`);
|
|
31619
|
+
if (state) args.push(`--state=${state}`);
|
|
31620
|
+
if (scheduled) args.push(`--scheduled=${scheduled}`);
|
|
31621
|
+
return runOrDiagnose(args, { account });
|
|
31622
|
+
});
|
|
31623
|
+
server2.registerTool("gog_classroom_announcements_delete", {
|
|
31624
|
+
description: "Delete an announcement.",
|
|
31625
|
+
annotations: { destructiveHint: true },
|
|
31626
|
+
inputSchema: {
|
|
31627
|
+
courseId: external_exports.string().describe("Course ID"),
|
|
31628
|
+
announcementId: external_exports.string().describe("Announcement ID"),
|
|
31629
|
+
account: accountParam
|
|
31630
|
+
}
|
|
31631
|
+
}, async ({ courseId, announcementId, account }) => {
|
|
31632
|
+
return runOrDiagnose(["classroom", "announcements", "delete", courseId, announcementId], { account });
|
|
31633
|
+
});
|
|
31634
|
+
server2.registerTool("gog_classroom_topics_create", {
|
|
31635
|
+
description: "Create a topic in a Google Classroom course.",
|
|
31636
|
+
inputSchema: {
|
|
31637
|
+
courseId: external_exports.string().describe("Course ID"),
|
|
31638
|
+
name: external_exports.string().describe("Topic name"),
|
|
31639
|
+
account: accountParam
|
|
31640
|
+
}
|
|
31641
|
+
}, async ({ courseId, name, account }) => {
|
|
31642
|
+
return runOrDiagnose(["classroom", "topics", "create", courseId, `--name=${name}`], { account });
|
|
31643
|
+
});
|
|
31644
|
+
server2.registerTool("gog_classroom_topics_update", {
|
|
31645
|
+
description: "Rename an existing topic.",
|
|
31646
|
+
annotations: { destructiveHint: true },
|
|
31647
|
+
inputSchema: {
|
|
31648
|
+
courseId: external_exports.string().describe("Course ID"),
|
|
31649
|
+
topicId: external_exports.string().describe("Topic ID"),
|
|
31650
|
+
name: external_exports.string().describe("New topic name"),
|
|
31651
|
+
account: accountParam
|
|
31652
|
+
}
|
|
31653
|
+
}, async ({ courseId, topicId, name, account }) => {
|
|
31654
|
+
return runOrDiagnose(["classroom", "topics", "update", courseId, topicId, `--name=${name}`], { account });
|
|
31655
|
+
});
|
|
31656
|
+
server2.registerTool("gog_classroom_topics_delete", {
|
|
31657
|
+
description: "Delete a topic.",
|
|
31658
|
+
annotations: { destructiveHint: true },
|
|
31659
|
+
inputSchema: {
|
|
31660
|
+
courseId: external_exports.string().describe("Course ID"),
|
|
31661
|
+
topicId: external_exports.string().describe("Topic ID"),
|
|
31662
|
+
account: accountParam
|
|
31663
|
+
}
|
|
31664
|
+
}, async ({ courseId, topicId, account }) => {
|
|
31665
|
+
return runOrDiagnose(["classroom", "topics", "delete", courseId, topicId], { account });
|
|
31666
|
+
});
|
|
31667
|
+
server2.registerTool("gog_classroom_invitations_create", {
|
|
31668
|
+
description: "Create an invitation to a Google Classroom course.",
|
|
31669
|
+
inputSchema: {
|
|
31670
|
+
courseId: external_exports.string().describe("Course ID"),
|
|
31671
|
+
userId: external_exports.string().describe("User ID to invite"),
|
|
31672
|
+
role: external_exports.enum(["STUDENT", "TEACHER", "OWNER"]).describe("Role for the invited user"),
|
|
31673
|
+
account: accountParam
|
|
31674
|
+
}
|
|
31675
|
+
}, async ({ courseId, userId, role, account }) => {
|
|
31676
|
+
return runOrDiagnose(["classroom", "invitations", "create", courseId, userId, `--role=${role}`], { account });
|
|
31677
|
+
});
|
|
31678
|
+
server2.registerTool("gog_classroom_invitations_delete", {
|
|
31679
|
+
description: "Delete (revoke) a Google Classroom invitation.",
|
|
31680
|
+
annotations: { destructiveHint: true },
|
|
31681
|
+
inputSchema: {
|
|
31682
|
+
invitationId: external_exports.string().describe("Invitation ID"),
|
|
31683
|
+
account: accountParam
|
|
31684
|
+
}
|
|
31685
|
+
}, async ({ invitationId, account }) => {
|
|
31686
|
+
return runOrDiagnose(["classroom", "invitations", "delete", invitationId], { account });
|
|
31687
|
+
});
|
|
31686
31688
|
}
|
|
31687
31689
|
|
|
31688
31690
|
// src/index.ts
|