gogcli-mcp 1.0.10 → 2.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -30189,7 +30189,9 @@ function toError(err) {
30189
30189
  return toText(err instanceof Error ? `Error: ${err.message}` : String(err));
30190
30190
  }
30191
30191
  var AUTH_ERROR_PATTERN = /\b(401|unauthorized|token.*(expired|revoked)|invalid_grant)\b/i;
30192
+ var TRANSIENT_ERROR_PATTERN = /\b429\b|\b5\d\d\b|\bquota\b|rateLimit|\bDEADLINE_EXCEEDED\b/i;
30192
30193
  var AUTH_HINT = "\n\nAuthentication may have expired. Use gog_auth_add to re-authorize the account. Ask the user if they would like to re-authenticate.";
30194
+ var TRANSIENT_HINT = "\n\nThis error is often transient. Retry the same call before trying a different approach (do not fall back to smaller writes or row-by-row operations).";
30193
30195
  async function runOrDiagnose(args, options) {
30194
30196
  try {
30195
30197
  return toText(await run(args, options));
@@ -30197,7 +30199,8 @@ async function runOrDiagnose(args, options) {
30197
30199
  const base = toError(err);
30198
30200
  const errText = base.content[0].text;
30199
30201
  const isAuthError = AUTH_ERROR_PATTERN.test(errText);
30200
- const hint = isAuthError ? AUTH_HINT : "";
30202
+ const isTransientError = !isAuthError && TRANSIENT_ERROR_PATTERN.test(errText);
30203
+ const hint = isAuthError ? AUTH_HINT : isTransientError ? TRANSIENT_HINT : "";
30201
30204
  try {
30202
30205
  const accounts = await run(["auth", "list"]);
30203
30206
  return toText(`${errText}
@@ -30396,6 +30399,657 @@ function registerCalendarTools(server2) {
30396
30399
  });
30397
30400
  }
30398
30401
 
30402
+ // src/tools/classroom.ts
30403
+ function registerClassroomTools(server2) {
30404
+ server2.registerTool("gog_classroom_courses_list", {
30405
+ description: "List Google Classroom courses.",
30406
+ annotations: { readOnlyHint: true },
30407
+ inputSchema: {
30408
+ state: external_exports.string().optional().describe("Comma-separated course states (ACTIVE, ARCHIVED, PROVISIONED, DECLINED, SUSPENDED)"),
30409
+ teacher: external_exports.string().optional().describe("Filter by teacher user ID"),
30410
+ student: external_exports.string().optional().describe("Filter by student user ID"),
30411
+ max: external_exports.number().optional().describe("Max results per page"),
30412
+ page: external_exports.string().optional().describe("Page token for pagination"),
30413
+ all: external_exports.boolean().optional().describe("Fetch all pages"),
30414
+ account: accountParam
30415
+ }
30416
+ }, async ({ state, teacher, student, max, page, all, account }) => {
30417
+ const args = ["classroom", "courses", "list"];
30418
+ if (state) args.push(`--state=${state}`);
30419
+ if (teacher) args.push(`--teacher=${teacher}`);
30420
+ if (student) args.push(`--student=${student}`);
30421
+ if (max !== void 0) args.push(`--max=${max}`);
30422
+ if (page) args.push(`--page=${page}`);
30423
+ if (all) args.push("--all");
30424
+ return runOrDiagnose(args, { account });
30425
+ });
30426
+ server2.registerTool("gog_classroom_courses_get", {
30427
+ description: "Get a single Google Classroom course by ID.",
30428
+ annotations: { readOnlyHint: true },
30429
+ inputSchema: {
30430
+ courseId: external_exports.string().describe("Course ID"),
30431
+ account: accountParam
30432
+ }
30433
+ }, async ({ courseId, account }) => {
30434
+ return runOrDiagnose(["classroom", "courses", "get", courseId], { account });
30435
+ });
30436
+ server2.registerTool("gog_classroom_courses_create", {
30437
+ description: "Create a new Google Classroom course.",
30438
+ inputSchema: {
30439
+ name: external_exports.string().describe("Course name"),
30440
+ owner: external_exports.string().optional().describe('Owner user ID (default: "me")'),
30441
+ section: external_exports.string().optional().describe("Section"),
30442
+ descriptionHeading: external_exports.string().optional().describe("Description heading"),
30443
+ description: external_exports.string().optional().describe("Description"),
30444
+ room: external_exports.string().optional().describe("Room"),
30445
+ state: external_exports.string().optional().describe("Course state: ACTIVE, ARCHIVED, PROVISIONED, DECLINED, SUSPENDED"),
30446
+ account: accountParam
30447
+ }
30448
+ }, async ({ name, owner, section, descriptionHeading, description, room, state, account }) => {
30449
+ const args = ["classroom", "courses", "create", `--name=${name}`];
30450
+ if (owner) args.push(`--owner=${owner}`);
30451
+ if (section) args.push(`--section=${section}`);
30452
+ if (descriptionHeading) args.push(`--description-heading=${descriptionHeading}`);
30453
+ if (description) args.push(`--description=${description}`);
30454
+ if (room) args.push(`--room=${room}`);
30455
+ if (state) args.push(`--state=${state}`);
30456
+ return runOrDiagnose(args, { account });
30457
+ });
30458
+ server2.registerTool("gog_classroom_courses_update", {
30459
+ description: "Update an existing Google Classroom course.",
30460
+ annotations: { destructiveHint: true },
30461
+ inputSchema: {
30462
+ courseId: external_exports.string().describe("Course ID"),
30463
+ name: external_exports.string().optional().describe("Course name"),
30464
+ owner: external_exports.string().optional().describe("Owner user ID"),
30465
+ section: external_exports.string().optional().describe("Section"),
30466
+ descriptionHeading: external_exports.string().optional().describe("Description heading"),
30467
+ description: external_exports.string().optional().describe("Description"),
30468
+ room: external_exports.string().optional().describe("Room"),
30469
+ state: external_exports.string().optional().describe("Course state: ACTIVE, ARCHIVED, PROVISIONED, DECLINED, SUSPENDED"),
30470
+ account: accountParam
30471
+ }
30472
+ }, async ({ courseId, name, owner, section, descriptionHeading, description, room, state, account }) => {
30473
+ const args = ["classroom", "courses", "update", courseId];
30474
+ if (name) args.push(`--name=${name}`);
30475
+ if (owner) args.push(`--owner=${owner}`);
30476
+ if (section) args.push(`--section=${section}`);
30477
+ if (descriptionHeading) args.push(`--description-heading=${descriptionHeading}`);
30478
+ if (description) args.push(`--description=${description}`);
30479
+ if (room) args.push(`--room=${room}`);
30480
+ if (state) args.push(`--state=${state}`);
30481
+ return runOrDiagnose(args, { account });
30482
+ });
30483
+ server2.registerTool("gog_classroom_courses_delete", {
30484
+ description: "Delete a Google Classroom course.",
30485
+ annotations: { destructiveHint: true },
30486
+ inputSchema: {
30487
+ courseId: external_exports.string().describe("Course ID"),
30488
+ account: accountParam
30489
+ }
30490
+ }, async ({ courseId, account }) => {
30491
+ return runOrDiagnose(["classroom", "courses", "delete", courseId], { account });
30492
+ });
30493
+ server2.registerTool("gog_classroom_courses_archive", {
30494
+ description: "Archive a Google Classroom course.",
30495
+ annotations: { destructiveHint: true },
30496
+ inputSchema: {
30497
+ courseId: external_exports.string().describe("Course ID"),
30498
+ account: accountParam
30499
+ }
30500
+ }, async ({ courseId, account }) => {
30501
+ return runOrDiagnose(["classroom", "courses", "archive", courseId], { account });
30502
+ });
30503
+ server2.registerTool("gog_classroom_courses_unarchive", {
30504
+ description: "Unarchive a Google Classroom course (restore to ACTIVE).",
30505
+ annotations: { destructiveHint: true },
30506
+ inputSchema: {
30507
+ courseId: external_exports.string().describe("Course ID"),
30508
+ account: accountParam
30509
+ }
30510
+ }, async ({ courseId, account }) => {
30511
+ return runOrDiagnose(["classroom", "courses", "unarchive", courseId], { account });
30512
+ });
30513
+ server2.registerTool("gog_classroom_students_list", {
30514
+ description: "List students enrolled in a Google Classroom course.",
30515
+ annotations: { readOnlyHint: true },
30516
+ inputSchema: {
30517
+ courseId: external_exports.string().describe("Course ID"),
30518
+ max: external_exports.number().optional().describe("Max results per page"),
30519
+ page: external_exports.string().optional().describe("Page token"),
30520
+ all: external_exports.boolean().optional().describe("Fetch all pages"),
30521
+ account: accountParam
30522
+ }
30523
+ }, async ({ courseId, max, page, all, account }) => {
30524
+ const args = ["classroom", "students", "list", courseId];
30525
+ if (max !== void 0) args.push(`--max=${max}`);
30526
+ if (page) args.push(`--page=${page}`);
30527
+ if (all) args.push("--all");
30528
+ return runOrDiagnose(args, { account });
30529
+ });
30530
+ server2.registerTool("gog_classroom_students_get", {
30531
+ description: "Get a specific student enrolled in a course.",
30532
+ annotations: { readOnlyHint: true },
30533
+ inputSchema: {
30534
+ courseId: external_exports.string().describe("Course ID"),
30535
+ userId: external_exports.string().describe("Student user ID"),
30536
+ account: accountParam
30537
+ }
30538
+ }, async ({ courseId, userId, account }) => {
30539
+ return runOrDiagnose(["classroom", "students", "get", courseId, userId], { account });
30540
+ });
30541
+ server2.registerTool("gog_classroom_students_add", {
30542
+ description: "Add a student to a Google Classroom course.",
30543
+ inputSchema: {
30544
+ courseId: external_exports.string().describe("Course ID"),
30545
+ userId: external_exports.string().describe('Student user ID (or "me")'),
30546
+ enrollmentCode: external_exports.string().optional().describe("Enrollment code (required if adding self via code)"),
30547
+ account: accountParam
30548
+ }
30549
+ }, async ({ courseId, userId, enrollmentCode, account }) => {
30550
+ const args = ["classroom", "students", "add", courseId, userId];
30551
+ if (enrollmentCode) args.push(`--enrollment-code=${enrollmentCode}`);
30552
+ return runOrDiagnose(args, { account });
30553
+ });
30554
+ server2.registerTool("gog_classroom_students_remove", {
30555
+ description: "Remove a student from a Google Classroom course.",
30556
+ annotations: { destructiveHint: true },
30557
+ inputSchema: {
30558
+ courseId: external_exports.string().describe("Course ID"),
30559
+ userId: external_exports.string().describe("Student user ID"),
30560
+ account: accountParam
30561
+ }
30562
+ }, async ({ courseId, userId, account }) => {
30563
+ return runOrDiagnose(["classroom", "students", "remove", courseId, userId], { account });
30564
+ });
30565
+ server2.registerTool("gog_classroom_teachers_list", {
30566
+ description: "List teachers in a Google Classroom course.",
30567
+ annotations: { readOnlyHint: true },
30568
+ inputSchema: {
30569
+ courseId: external_exports.string().describe("Course ID"),
30570
+ max: external_exports.number().optional().describe("Max results per page"),
30571
+ page: external_exports.string().optional().describe("Page token"),
30572
+ all: external_exports.boolean().optional().describe("Fetch all pages"),
30573
+ account: accountParam
30574
+ }
30575
+ }, async ({ courseId, max, page, all, account }) => {
30576
+ const args = ["classroom", "teachers", "list", courseId];
30577
+ if (max !== void 0) args.push(`--max=${max}`);
30578
+ if (page) args.push(`--page=${page}`);
30579
+ if (all) args.push("--all");
30580
+ return runOrDiagnose(args, { account });
30581
+ });
30582
+ server2.registerTool("gog_classroom_teachers_get", {
30583
+ description: "Get a specific teacher in a course.",
30584
+ annotations: { readOnlyHint: true },
30585
+ inputSchema: {
30586
+ courseId: external_exports.string().describe("Course ID"),
30587
+ userId: external_exports.string().describe("Teacher user ID"),
30588
+ account: accountParam
30589
+ }
30590
+ }, async ({ courseId, userId, account }) => {
30591
+ return runOrDiagnose(["classroom", "teachers", "get", courseId, userId], { account });
30592
+ });
30593
+ server2.registerTool("gog_classroom_teachers_add", {
30594
+ description: "Add a teacher to a Google Classroom course.",
30595
+ inputSchema: {
30596
+ courseId: external_exports.string().describe("Course ID"),
30597
+ userId: external_exports.string().describe("Teacher user ID"),
30598
+ account: accountParam
30599
+ }
30600
+ }, async ({ courseId, userId, account }) => {
30601
+ return runOrDiagnose(["classroom", "teachers", "add", courseId, userId], { account });
30602
+ });
30603
+ server2.registerTool("gog_classroom_teachers_remove", {
30604
+ description: "Remove a teacher from a Google Classroom course.",
30605
+ annotations: { destructiveHint: true },
30606
+ inputSchema: {
30607
+ courseId: external_exports.string().describe("Course ID"),
30608
+ userId: external_exports.string().describe("Teacher user ID"),
30609
+ account: accountParam
30610
+ }
30611
+ }, async ({ courseId, userId, account }) => {
30612
+ return runOrDiagnose(["classroom", "teachers", "remove", courseId, userId], { account });
30613
+ });
30614
+ server2.registerTool("gog_classroom_roster", {
30615
+ description: "List the full roster (students and/or teachers) of a Google Classroom course. Omit both flags to return both groups.",
30616
+ annotations: { readOnlyHint: true },
30617
+ inputSchema: {
30618
+ courseId: external_exports.string().describe("Course ID"),
30619
+ students: external_exports.boolean().optional().describe("Include students only"),
30620
+ teachers: external_exports.boolean().optional().describe("Include teachers only"),
30621
+ max: external_exports.number().optional().describe("Max results per page"),
30622
+ page: external_exports.string().optional().describe("Page token"),
30623
+ all: external_exports.boolean().optional().describe("Fetch all pages"),
30624
+ account: accountParam
30625
+ }
30626
+ }, async ({ courseId, students, teachers, max, page, all, account }) => {
30627
+ const args = ["classroom", "roster", courseId];
30628
+ if (students) args.push("--students");
30629
+ if (teachers) args.push("--teachers");
30630
+ if (max !== void 0) args.push(`--max=${max}`);
30631
+ if (page) args.push(`--page=${page}`);
30632
+ if (all) args.push("--all");
30633
+ return runOrDiagnose(args, { account });
30634
+ });
30635
+ server2.registerTool("gog_classroom_coursework_list", {
30636
+ description: "List coursework (assignments, questions, materials) for a course.",
30637
+ annotations: { readOnlyHint: true },
30638
+ inputSchema: {
30639
+ courseId: external_exports.string().describe("Course ID"),
30640
+ state: external_exports.string().optional().describe("Filter by coursework state (PUBLISHED, DRAFT, DELETED)"),
30641
+ topic: external_exports.string().optional().describe("Filter by topic ID"),
30642
+ orderBy: external_exports.string().optional().describe('Sort order (e.g. "updateTime desc")'),
30643
+ max: external_exports.number().optional().describe("Max results per page"),
30644
+ page: external_exports.string().optional().describe("Page token"),
30645
+ all: external_exports.boolean().optional().describe("Fetch all pages"),
30646
+ scanPages: external_exports.number().optional().describe("Max pages to scan when filtering"),
30647
+ account: accountParam
30648
+ }
30649
+ }, async ({ courseId, state, topic, orderBy, max, page, all, scanPages, account }) => {
30650
+ const args = ["classroom", "coursework", "list", courseId];
30651
+ if (state) args.push(`--state=${state}`);
30652
+ if (topic) args.push(`--topic=${topic}`);
30653
+ if (orderBy) args.push(`--order-by=${orderBy}`);
30654
+ if (max !== void 0) args.push(`--max=${max}`);
30655
+ if (page) args.push(`--page=${page}`);
30656
+ if (all) args.push("--all");
30657
+ if (scanPages !== void 0) args.push(`--scan-pages=${scanPages}`);
30658
+ return runOrDiagnose(args, { account });
30659
+ });
30660
+ server2.registerTool("gog_classroom_coursework_get", {
30661
+ description: "Get a single coursework item by ID.",
30662
+ annotations: { readOnlyHint: true },
30663
+ inputSchema: {
30664
+ courseId: external_exports.string().describe("Course ID"),
30665
+ courseworkId: external_exports.string().describe("Coursework ID"),
30666
+ account: accountParam
30667
+ }
30668
+ }, async ({ courseId, courseworkId, account }) => {
30669
+ return runOrDiagnose(["classroom", "coursework", "get", courseId, courseworkId], { account });
30670
+ });
30671
+ server2.registerTool("gog_classroom_coursework_create", {
30672
+ description: "Create a new coursework item (assignment, question, etc.) in a course.",
30673
+ inputSchema: {
30674
+ courseId: external_exports.string().describe("Course ID"),
30675
+ title: external_exports.string().describe("Coursework title"),
30676
+ description: external_exports.string().optional().describe("Description"),
30677
+ type: external_exports.string().optional().describe("Work type (ASSIGNMENT, SHORT_ANSWER_QUESTION, MULTIPLE_CHOICE_QUESTION). Default: ASSIGNMENT"),
30678
+ state: external_exports.string().optional().describe("State: PUBLISHED or DRAFT"),
30679
+ maxPoints: external_exports.number().optional().describe("Max points"),
30680
+ due: external_exports.string().optional().describe("Due datetime (combined date+time)"),
30681
+ dueDate: external_exports.string().optional().describe("Due date (YYYY-MM-DD)"),
30682
+ dueTime: external_exports.string().optional().describe("Due time (HH:MM)"),
30683
+ scheduled: external_exports.string().optional().describe("Scheduled publish time"),
30684
+ topic: external_exports.string().optional().describe("Topic ID"),
30685
+ account: accountParam
30686
+ }
30687
+ }, async ({ courseId, title, description, type, state, maxPoints, due, dueDate, dueTime, scheduled, topic, account }) => {
30688
+ const args = ["classroom", "coursework", "create", courseId, `--title=${title}`];
30689
+ if (description) args.push(`--description=${description}`);
30690
+ if (type) args.push(`--type=${type}`);
30691
+ if (state) args.push(`--state=${state}`);
30692
+ if (maxPoints !== void 0) args.push(`--max-points=${maxPoints}`);
30693
+ if (due) args.push(`--due=${due}`);
30694
+ if (dueDate) args.push(`--due-date=${dueDate}`);
30695
+ if (dueTime) args.push(`--due-time=${dueTime}`);
30696
+ if (scheduled) args.push(`--scheduled=${scheduled}`);
30697
+ if (topic) args.push(`--topic=${topic}`);
30698
+ return runOrDiagnose(args, { account });
30699
+ });
30700
+ server2.registerTool("gog_classroom_coursework_update", {
30701
+ description: "Update an existing coursework item.",
30702
+ annotations: { destructiveHint: true },
30703
+ inputSchema: {
30704
+ courseId: external_exports.string().describe("Course ID"),
30705
+ courseworkId: external_exports.string().describe("Coursework ID"),
30706
+ title: external_exports.string().optional().describe("New title"),
30707
+ description: external_exports.string().optional().describe("New description"),
30708
+ type: external_exports.string().optional().describe("Work type"),
30709
+ state: external_exports.string().optional().describe("State: PUBLISHED or DRAFT"),
30710
+ maxPoints: external_exports.number().optional().describe("Max points"),
30711
+ due: external_exports.string().optional().describe("Due datetime"),
30712
+ dueDate: external_exports.string().optional().describe("Due date (YYYY-MM-DD)"),
30713
+ dueTime: external_exports.string().optional().describe("Due time (HH:MM)"),
30714
+ scheduled: external_exports.string().optional().describe("Scheduled publish time"),
30715
+ topic: external_exports.string().optional().describe("Topic ID"),
30716
+ account: accountParam
30717
+ }
30718
+ }, async ({ courseId, courseworkId, title, description, type, state, maxPoints, due, dueDate, dueTime, scheduled, topic, account }) => {
30719
+ const args = ["classroom", "coursework", "update", courseId, courseworkId];
30720
+ if (title) args.push(`--title=${title}`);
30721
+ if (description) args.push(`--description=${description}`);
30722
+ if (type) args.push(`--type=${type}`);
30723
+ if (state) args.push(`--state=${state}`);
30724
+ if (maxPoints !== void 0) args.push(`--max-points=${maxPoints}`);
30725
+ if (due) args.push(`--due=${due}`);
30726
+ if (dueDate) args.push(`--due-date=${dueDate}`);
30727
+ if (dueTime) args.push(`--due-time=${dueTime}`);
30728
+ if (scheduled) args.push(`--scheduled=${scheduled}`);
30729
+ if (topic) args.push(`--topic=${topic}`);
30730
+ return runOrDiagnose(args, { account });
30731
+ });
30732
+ server2.registerTool("gog_classroom_coursework_delete", {
30733
+ description: "Delete a coursework item.",
30734
+ annotations: { destructiveHint: true },
30735
+ inputSchema: {
30736
+ courseId: external_exports.string().describe("Course ID"),
30737
+ courseworkId: external_exports.string().describe("Coursework ID"),
30738
+ account: accountParam
30739
+ }
30740
+ }, async ({ courseId, courseworkId, account }) => {
30741
+ return runOrDiagnose(["classroom", "coursework", "delete", courseId, courseworkId], { account });
30742
+ });
30743
+ server2.registerTool("gog_classroom_submissions_list", {
30744
+ description: "List student submissions for a coursework item.",
30745
+ annotations: { readOnlyHint: true },
30746
+ inputSchema: {
30747
+ courseId: external_exports.string().describe("Course ID"),
30748
+ courseworkId: external_exports.string().describe("Coursework ID"),
30749
+ state: external_exports.string().optional().describe("Filter by submission state"),
30750
+ late: external_exports.enum(["late", "not-late"]).optional().describe("Filter by late status"),
30751
+ user: external_exports.string().optional().describe("Filter by student user ID"),
30752
+ max: external_exports.number().optional().describe("Max results per page"),
30753
+ page: external_exports.string().optional().describe("Page token"),
30754
+ all: external_exports.boolean().optional().describe("Fetch all pages"),
30755
+ account: accountParam
30756
+ }
30757
+ }, async ({ courseId, courseworkId, state, late: late2, user, max, page, all, account }) => {
30758
+ const args = ["classroom", "submissions", "list", courseId, courseworkId];
30759
+ if (state) args.push(`--state=${state}`);
30760
+ if (late2) args.push(`--late=${late2}`);
30761
+ if (user) args.push(`--user=${user}`);
30762
+ if (max !== void 0) args.push(`--max=${max}`);
30763
+ if (page) args.push(`--page=${page}`);
30764
+ if (all) args.push("--all");
30765
+ return runOrDiagnose(args, { account });
30766
+ });
30767
+ server2.registerTool("gog_classroom_submissions_get", {
30768
+ description: "Get a single submission by ID.",
30769
+ annotations: { readOnlyHint: true },
30770
+ inputSchema: {
30771
+ courseId: external_exports.string().describe("Course ID"),
30772
+ courseworkId: external_exports.string().describe("Coursework ID"),
30773
+ submissionId: external_exports.string().describe("Submission ID"),
30774
+ account: accountParam
30775
+ }
30776
+ }, async ({ courseId, courseworkId, submissionId, account }) => {
30777
+ return runOrDiagnose(["classroom", "submissions", "get", courseId, courseworkId, submissionId], { account });
30778
+ });
30779
+ server2.registerTool("gog_classroom_submissions_grade", {
30780
+ description: "Grade a student submission. Set draft and/or assigned grade values.",
30781
+ annotations: { destructiveHint: true },
30782
+ inputSchema: {
30783
+ courseId: external_exports.string().describe("Course ID"),
30784
+ courseworkId: external_exports.string().describe("Coursework ID"),
30785
+ submissionId: external_exports.string().describe("Submission ID"),
30786
+ draft: external_exports.string().optional().describe("Draft grade value"),
30787
+ assigned: external_exports.string().optional().describe("Assigned (final) grade value"),
30788
+ account: accountParam
30789
+ }
30790
+ }, async ({ courseId, courseworkId, submissionId, draft, assigned, account }) => {
30791
+ const args = ["classroom", "submissions", "grade", courseId, courseworkId, submissionId];
30792
+ if (draft) args.push(`--draft=${draft}`);
30793
+ if (assigned) args.push(`--assigned=${assigned}`);
30794
+ return runOrDiagnose(args, { account });
30795
+ });
30796
+ server2.registerTool("gog_classroom_submissions_return", {
30797
+ description: "Return a graded submission to the student.",
30798
+ annotations: { destructiveHint: true },
30799
+ inputSchema: {
30800
+ courseId: external_exports.string().describe("Course ID"),
30801
+ courseworkId: external_exports.string().describe("Coursework ID"),
30802
+ submissionId: external_exports.string().describe("Submission ID"),
30803
+ account: accountParam
30804
+ }
30805
+ }, async ({ courseId, courseworkId, submissionId, account }) => {
30806
+ return runOrDiagnose(["classroom", "submissions", "return", courseId, courseworkId, submissionId], { account });
30807
+ });
30808
+ server2.registerTool("gog_classroom_submissions_turn_in", {
30809
+ description: "Turn in a student submission (student action).",
30810
+ annotations: { destructiveHint: true },
30811
+ inputSchema: {
30812
+ courseId: external_exports.string().describe("Course ID"),
30813
+ courseworkId: external_exports.string().describe("Coursework ID"),
30814
+ submissionId: external_exports.string().describe("Submission ID"),
30815
+ account: accountParam
30816
+ }
30817
+ }, async ({ courseId, courseworkId, submissionId, account }) => {
30818
+ return runOrDiagnose(["classroom", "submissions", "turn-in", courseId, courseworkId, submissionId], { account });
30819
+ });
30820
+ server2.registerTool("gog_classroom_submissions_reclaim", {
30821
+ description: "Reclaim a turned-in submission (student action to edit a submission).",
30822
+ annotations: { destructiveHint: true },
30823
+ inputSchema: {
30824
+ courseId: external_exports.string().describe("Course ID"),
30825
+ courseworkId: external_exports.string().describe("Coursework ID"),
30826
+ submissionId: external_exports.string().describe("Submission ID"),
30827
+ account: accountParam
30828
+ }
30829
+ }, async ({ courseId, courseworkId, submissionId, account }) => {
30830
+ return runOrDiagnose(["classroom", "submissions", "reclaim", courseId, courseworkId, submissionId], { account });
30831
+ });
30832
+ server2.registerTool("gog_classroom_announcements_list", {
30833
+ description: "List announcements in a Google Classroom course.",
30834
+ annotations: { readOnlyHint: true },
30835
+ inputSchema: {
30836
+ courseId: external_exports.string().describe("Course ID"),
30837
+ state: external_exports.string().optional().describe("Filter by announcement state"),
30838
+ orderBy: external_exports.string().optional().describe("Sort order"),
30839
+ max: external_exports.number().optional().describe("Max results per page"),
30840
+ page: external_exports.string().optional().describe("Page token"),
30841
+ all: external_exports.boolean().optional().describe("Fetch all pages"),
30842
+ account: accountParam
30843
+ }
30844
+ }, async ({ courseId, state, orderBy, max, page, all, account }) => {
30845
+ const args = ["classroom", "announcements", "list", courseId];
30846
+ if (state) args.push(`--state=${state}`);
30847
+ if (orderBy) args.push(`--order-by=${orderBy}`);
30848
+ if (max !== void 0) args.push(`--max=${max}`);
30849
+ if (page) args.push(`--page=${page}`);
30850
+ if (all) args.push("--all");
30851
+ return runOrDiagnose(args, { account });
30852
+ });
30853
+ server2.registerTool("gog_classroom_announcements_get", {
30854
+ description: "Get a single announcement by ID.",
30855
+ annotations: { readOnlyHint: true },
30856
+ inputSchema: {
30857
+ courseId: external_exports.string().describe("Course ID"),
30858
+ announcementId: external_exports.string().describe("Announcement ID"),
30859
+ account: accountParam
30860
+ }
30861
+ }, async ({ courseId, announcementId, account }) => {
30862
+ return runOrDiagnose(["classroom", "announcements", "get", courseId, announcementId], { account });
30863
+ });
30864
+ server2.registerTool("gog_classroom_announcements_create", {
30865
+ description: "Create an announcement in a Google Classroom course.",
30866
+ inputSchema: {
30867
+ courseId: external_exports.string().describe("Course ID"),
30868
+ text: external_exports.string().describe("Announcement text"),
30869
+ state: external_exports.string().optional().describe("State: PUBLISHED or DRAFT"),
30870
+ scheduled: external_exports.string().optional().describe("Scheduled publish time"),
30871
+ account: accountParam
30872
+ }
30873
+ }, async ({ courseId, text, state, scheduled, account }) => {
30874
+ const args = ["classroom", "announcements", "create", courseId, `--text=${text}`];
30875
+ if (state) args.push(`--state=${state}`);
30876
+ if (scheduled) args.push(`--scheduled=${scheduled}`);
30877
+ return runOrDiagnose(args, { account });
30878
+ });
30879
+ server2.registerTool("gog_classroom_announcements_update", {
30880
+ description: "Update an existing announcement.",
30881
+ annotations: { destructiveHint: true },
30882
+ inputSchema: {
30883
+ courseId: external_exports.string().describe("Course ID"),
30884
+ announcementId: external_exports.string().describe("Announcement ID"),
30885
+ text: external_exports.string().optional().describe("New text"),
30886
+ state: external_exports.string().optional().describe("State: PUBLISHED or DRAFT"),
30887
+ scheduled: external_exports.string().optional().describe("Scheduled publish time"),
30888
+ account: accountParam
30889
+ }
30890
+ }, async ({ courseId, announcementId, text, state, scheduled, account }) => {
30891
+ const args = ["classroom", "announcements", "update", courseId, announcementId];
30892
+ if (text) args.push(`--text=${text}`);
30893
+ if (state) args.push(`--state=${state}`);
30894
+ if (scheduled) args.push(`--scheduled=${scheduled}`);
30895
+ return runOrDiagnose(args, { account });
30896
+ });
30897
+ server2.registerTool("gog_classroom_announcements_delete", {
30898
+ description: "Delete an announcement.",
30899
+ annotations: { destructiveHint: true },
30900
+ inputSchema: {
30901
+ courseId: external_exports.string().describe("Course ID"),
30902
+ announcementId: external_exports.string().describe("Announcement ID"),
30903
+ account: accountParam
30904
+ }
30905
+ }, async ({ courseId, announcementId, account }) => {
30906
+ return runOrDiagnose(["classroom", "announcements", "delete", courseId, announcementId], { account });
30907
+ });
30908
+ server2.registerTool("gog_classroom_topics_list", {
30909
+ description: "List topics in a Google Classroom course.",
30910
+ annotations: { readOnlyHint: true },
30911
+ inputSchema: {
30912
+ courseId: external_exports.string().describe("Course ID"),
30913
+ max: external_exports.number().optional().describe("Max results per page"),
30914
+ page: external_exports.string().optional().describe("Page token"),
30915
+ all: external_exports.boolean().optional().describe("Fetch all pages"),
30916
+ account: accountParam
30917
+ }
30918
+ }, async ({ courseId, max, page, all, account }) => {
30919
+ const args = ["classroom", "topics", "list", courseId];
30920
+ if (max !== void 0) args.push(`--max=${max}`);
30921
+ if (page) args.push(`--page=${page}`);
30922
+ if (all) args.push("--all");
30923
+ return runOrDiagnose(args, { account });
30924
+ });
30925
+ server2.registerTool("gog_classroom_topics_get", {
30926
+ description: "Get a single topic by ID.",
30927
+ annotations: { readOnlyHint: true },
30928
+ inputSchema: {
30929
+ courseId: external_exports.string().describe("Course ID"),
30930
+ topicId: external_exports.string().describe("Topic ID"),
30931
+ account: accountParam
30932
+ }
30933
+ }, async ({ courseId, topicId, account }) => {
30934
+ return runOrDiagnose(["classroom", "topics", "get", courseId, topicId], { account });
30935
+ });
30936
+ server2.registerTool("gog_classroom_topics_create", {
30937
+ description: "Create a topic in a Google Classroom course.",
30938
+ inputSchema: {
30939
+ courseId: external_exports.string().describe("Course ID"),
30940
+ name: external_exports.string().describe("Topic name"),
30941
+ account: accountParam
30942
+ }
30943
+ }, async ({ courseId, name, account }) => {
30944
+ return runOrDiagnose(["classroom", "topics", "create", courseId, `--name=${name}`], { account });
30945
+ });
30946
+ server2.registerTool("gog_classroom_topics_update", {
30947
+ description: "Rename an existing topic.",
30948
+ annotations: { destructiveHint: true },
30949
+ inputSchema: {
30950
+ courseId: external_exports.string().describe("Course ID"),
30951
+ topicId: external_exports.string().describe("Topic ID"),
30952
+ name: external_exports.string().describe("New topic name"),
30953
+ account: accountParam
30954
+ }
30955
+ }, async ({ courseId, topicId, name, account }) => {
30956
+ return runOrDiagnose(["classroom", "topics", "update", courseId, topicId, `--name=${name}`], { account });
30957
+ });
30958
+ server2.registerTool("gog_classroom_topics_delete", {
30959
+ description: "Delete a topic.",
30960
+ annotations: { destructiveHint: true },
30961
+ inputSchema: {
30962
+ courseId: external_exports.string().describe("Course ID"),
30963
+ topicId: external_exports.string().describe("Topic ID"),
30964
+ account: accountParam
30965
+ }
30966
+ }, async ({ courseId, topicId, account }) => {
30967
+ return runOrDiagnose(["classroom", "topics", "delete", courseId, topicId], { account });
30968
+ });
30969
+ server2.registerTool("gog_classroom_invitations_list", {
30970
+ description: "List Google Classroom invitations.",
30971
+ annotations: { readOnlyHint: true },
30972
+ inputSchema: {
30973
+ course: external_exports.string().optional().describe("Filter by course ID"),
30974
+ user: external_exports.string().optional().describe("Filter by user ID"),
30975
+ max: external_exports.number().optional().describe("Max results per page"),
30976
+ page: external_exports.string().optional().describe("Page token"),
30977
+ all: external_exports.boolean().optional().describe("Fetch all pages"),
30978
+ account: accountParam
30979
+ }
30980
+ }, async ({ course, user, max, page, all, account }) => {
30981
+ const args = ["classroom", "invitations", "list"];
30982
+ if (course) args.push(`--course=${course}`);
30983
+ if (user) args.push(`--user=${user}`);
30984
+ if (max !== void 0) args.push(`--max=${max}`);
30985
+ if (page) args.push(`--page=${page}`);
30986
+ if (all) args.push("--all");
30987
+ return runOrDiagnose(args, { account });
30988
+ });
30989
+ server2.registerTool("gog_classroom_invitations_get", {
30990
+ description: "Get a single invitation by ID.",
30991
+ annotations: { readOnlyHint: true },
30992
+ inputSchema: {
30993
+ invitationId: external_exports.string().describe("Invitation ID"),
30994
+ account: accountParam
30995
+ }
30996
+ }, async ({ invitationId, account }) => {
30997
+ return runOrDiagnose(["classroom", "invitations", "get", invitationId], { account });
30998
+ });
30999
+ server2.registerTool("gog_classroom_invitations_create", {
31000
+ description: "Create an invitation to a Google Classroom course.",
31001
+ inputSchema: {
31002
+ courseId: external_exports.string().describe("Course ID"),
31003
+ userId: external_exports.string().describe("User ID to invite"),
31004
+ role: external_exports.enum(["STUDENT", "TEACHER", "OWNER"]).describe("Role for the invited user"),
31005
+ account: accountParam
31006
+ }
31007
+ }, async ({ courseId, userId, role, account }) => {
31008
+ return runOrDiagnose(["classroom", "invitations", "create", courseId, userId, `--role=${role}`], { account });
31009
+ });
31010
+ server2.registerTool("gog_classroom_invitations_accept", {
31011
+ description: "Accept a Google Classroom invitation.",
31012
+ inputSchema: {
31013
+ invitationId: external_exports.string().describe("Invitation ID"),
31014
+ account: accountParam
31015
+ }
31016
+ }, async ({ invitationId, account }) => {
31017
+ return runOrDiagnose(["classroom", "invitations", "accept", invitationId], { account });
31018
+ });
31019
+ server2.registerTool("gog_classroom_invitations_delete", {
31020
+ description: "Delete (revoke) a Google Classroom invitation.",
31021
+ annotations: { destructiveHint: true },
31022
+ inputSchema: {
31023
+ invitationId: external_exports.string().describe("Invitation ID"),
31024
+ account: accountParam
31025
+ }
31026
+ }, async ({ invitationId, account }) => {
31027
+ return runOrDiagnose(["classroom", "invitations", "delete", invitationId], { account });
31028
+ });
31029
+ server2.registerTool("gog_classroom_profile_get", {
31030
+ description: "Get a Google Classroom user profile. Omit userId to fetch the authenticated user.",
31031
+ annotations: { readOnlyHint: true },
31032
+ inputSchema: {
31033
+ userId: external_exports.string().optional().describe("User ID (omit for self)"),
31034
+ account: accountParam
31035
+ }
31036
+ }, async ({ userId, account }) => {
31037
+ const args = ["classroom", "profile", "get"];
31038
+ if (userId) args.push(userId);
31039
+ return runOrDiagnose(args, { account });
31040
+ });
31041
+ server2.registerTool("gog_classroom_run", {
31042
+ 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.",
31043
+ inputSchema: {
31044
+ subcommand: external_exports.string().describe('The gog classroom subcommand to run, e.g. "guardians", "materials", "guardian-invitations"'),
31045
+ args: external_exports.array(external_exports.string()).describe("Additional positional args and flags"),
31046
+ account: accountParam
31047
+ }
31048
+ }, async ({ subcommand, args, account }) => {
31049
+ return runOrDiagnose(["classroom", subcommand, ...args], { account });
31050
+ });
31051
+ }
31052
+
30399
31053
  // src/tools/contacts.ts
30400
31054
  function registerContactsTools(server2) {
30401
31055
  server2.registerTool("gog_contacts_search", {
@@ -30548,11 +31202,19 @@ function registerDriveTools(server2) {
30548
31202
  annotations: { readOnlyHint: true },
30549
31203
  inputSchema: {
30550
31204
  folderId: external_exports.string().optional().describe("Folder ID to list (default: root)"),
31205
+ max: external_exports.number().optional().describe("Max results (default: 20)"),
31206
+ page: external_exports.string().optional().describe("Page token for pagination"),
31207
+ query: external_exports.string().optional().describe(`Drive query filter (e.g. "name contains 'budget'")`),
31208
+ allDrives: external_exports.boolean().optional().describe("Include shared drives (default: true). Set false for My Drive only."),
30551
31209
  account: accountParam
30552
31210
  }
30553
- }, async ({ folderId, account }) => {
31211
+ }, async ({ folderId, max, page, query, allDrives, account }) => {
30554
31212
  const args = ["drive", "ls"];
30555
- if (folderId) args.push(folderId);
31213
+ if (folderId) args.push(`--parent=${folderId}`);
31214
+ if (max !== void 0) args.push(`--max=${max}`);
31215
+ if (page) args.push(`--page=${page}`);
31216
+ if (query) args.push(`--query=${query}`);
31217
+ if (allDrives === false) args.push("--no-all-drives");
30556
31218
  return runOrDiagnose(args, { account });
30557
31219
  });
30558
31220
  server2.registerTool("gog_drive_search", {
@@ -30608,14 +31270,17 @@ function registerDriveTools(server2) {
30608
31270
  return runOrDiagnose(["drive", "move", fileId, `--parent=${parentId}`], { account });
30609
31271
  });
30610
31272
  server2.registerTool("gog_drive_delete", {
30611
- description: "Move a Google Drive file to trash.",
31273
+ description: "Move a Google Drive file to trash, or permanently delete it with permanent=true (irreversible).",
30612
31274
  annotations: { destructiveHint: true },
30613
31275
  inputSchema: {
30614
- fileId: external_exports.string().describe("File ID to trash"),
31276
+ fileId: external_exports.string().describe("File ID to delete"),
31277
+ permanent: external_exports.boolean().optional().describe("Permanently delete instead of moving to trash (irreversible)"),
30615
31278
  account: accountParam
30616
31279
  }
30617
- }, async ({ fileId, account }) => {
30618
- return runOrDiagnose(["drive", "delete", fileId], { account });
31280
+ }, async ({ fileId, permanent, account }) => {
31281
+ const args = ["drive", "delete", fileId];
31282
+ if (permanent) args.push("--permanent");
31283
+ return runOrDiagnose(args, { account });
30619
31284
  });
30620
31285
  server2.registerTool("gog_drive_share", {
30621
31286
  description: "Share a Google Drive file or folder.",
@@ -30809,6 +31474,195 @@ function registerSheetsTools(server2) {
30809
31474
  });
30810
31475
  }
30811
31476
 
31477
+ // src/tools/slides.ts
31478
+ function registerSlidesTools(server2) {
31479
+ server2.registerTool("gog_slides_export", {
31480
+ description: "Export a Google Slides presentation to a local file (pdf or pptx).",
31481
+ annotations: { readOnlyHint: true },
31482
+ inputSchema: {
31483
+ presentationId: external_exports.string().describe("Presentation ID"),
31484
+ out: external_exports.string().optional().describe("Output file path"),
31485
+ format: external_exports.enum(["pdf", "pptx"]).optional().describe("Export format (default: pptx)"),
31486
+ account: accountParam
31487
+ }
31488
+ }, async ({ presentationId, out, format, account }) => {
31489
+ const args = ["slides", "export", presentationId];
31490
+ if (out) args.push(`--out=${out}`);
31491
+ if (format) args.push(`--format=${format}`);
31492
+ return runOrDiagnose(args, { account });
31493
+ });
31494
+ server2.registerTool("gog_slides_info", {
31495
+ description: "Get metadata for a Google Slides presentation (title, ID, slide count, etc.).",
31496
+ annotations: { readOnlyHint: true },
31497
+ inputSchema: {
31498
+ presentationId: external_exports.string().describe("Presentation ID"),
31499
+ account: accountParam
31500
+ }
31501
+ }, async ({ presentationId, account }) => {
31502
+ return runOrDiagnose(["slides", "info", presentationId], { account });
31503
+ });
31504
+ server2.registerTool("gog_slides_create", {
31505
+ description: "Create a new Google Slides presentation, optionally in a folder or copying from a template.",
31506
+ inputSchema: {
31507
+ title: external_exports.string().describe("Presentation title"),
31508
+ parent: external_exports.string().optional().describe("Destination folder ID"),
31509
+ template: external_exports.string().optional().describe("Template presentation ID to copy from"),
31510
+ account: accountParam
31511
+ }
31512
+ }, async ({ title, parent, template, account }) => {
31513
+ const args = ["slides", "create", title];
31514
+ if (parent) args.push(`--parent=${parent}`);
31515
+ if (template) args.push(`--template=${template}`);
31516
+ return runOrDiagnose(args, { account });
31517
+ });
31518
+ server2.registerTool("gog_slides_create_from_markdown", {
31519
+ description: "Create a new Google Slides presentation from markdown content (inline or from a file).",
31520
+ inputSchema: {
31521
+ title: external_exports.string().describe("Presentation title"),
31522
+ content: external_exports.string().optional().describe("Inline markdown content"),
31523
+ contentFile: external_exports.string().optional().describe("Path to a markdown file"),
31524
+ parent: external_exports.string().optional().describe("Destination folder ID"),
31525
+ debug: external_exports.boolean().optional().describe("Enable debug output"),
31526
+ account: accountParam
31527
+ }
31528
+ }, async ({ title, content, contentFile, parent, debug, account }) => {
31529
+ const args = ["slides", "create-from-markdown", title];
31530
+ if (content) args.push(`--content=${content}`);
31531
+ if (contentFile) args.push(`--content-file=${contentFile}`);
31532
+ if (parent) args.push(`--parent=${parent}`);
31533
+ if (debug) args.push("--debug");
31534
+ return runOrDiagnose(args, { account });
31535
+ });
31536
+ server2.registerTool("gog_slides_create_from_template", {
31537
+ description: "Create a new Google Slides presentation from a template, with optional placeholder replacements.",
31538
+ inputSchema: {
31539
+ templateId: external_exports.string().describe("Template presentation ID"),
31540
+ title: external_exports.string().describe("New presentation title"),
31541
+ replacements: external_exports.record(external_exports.string(), external_exports.string()).optional().describe("Placeholder replacements as a key/value object (emitted as --replace=k=v for each entry)"),
31542
+ replacementsFile: external_exports.string().optional().describe("Path to a JSON file containing replacements"),
31543
+ parent: external_exports.string().optional().describe("Destination folder ID"),
31544
+ exact: external_exports.boolean().optional().describe("Require exact placeholder matches"),
31545
+ account: accountParam
31546
+ }
31547
+ }, async ({ templateId, title, replacements, replacementsFile, parent, exact, account }) => {
31548
+ const args = ["slides", "create-from-template", templateId, title];
31549
+ if (replacements) {
31550
+ for (const [k, v] of Object.entries(replacements)) {
31551
+ args.push(`--replace=${k}=${v}`);
31552
+ }
31553
+ }
31554
+ if (replacementsFile) args.push(`--replacements=${replacementsFile}`);
31555
+ if (parent) args.push(`--parent=${parent}`);
31556
+ if (exact) args.push("--exact");
31557
+ return runOrDiagnose(args, { account });
31558
+ });
31559
+ server2.registerTool("gog_slides_copy", {
31560
+ description: "Copy a Google Slides presentation to a new presentation with the given title.",
31561
+ inputSchema: {
31562
+ presentationId: external_exports.string().describe("Presentation ID to copy"),
31563
+ title: external_exports.string().describe("Title for the new copy"),
31564
+ parent: external_exports.string().optional().describe("Destination folder ID"),
31565
+ account: accountParam
31566
+ }
31567
+ }, async ({ presentationId, title, parent, account }) => {
31568
+ const args = ["slides", "copy", presentationId, title];
31569
+ if (parent) args.push(`--parent=${parent}`);
31570
+ return runOrDiagnose(args, { account });
31571
+ });
31572
+ server2.registerTool("gog_slides_add_slide", {
31573
+ description: "Add a new slide to a presentation from a local image, with optional speaker notes.",
31574
+ inputSchema: {
31575
+ presentationId: external_exports.string().describe("Presentation ID"),
31576
+ image: external_exports.string().describe("Path to the local image file"),
31577
+ notes: external_exports.string().optional().describe("Speaker notes text"),
31578
+ notesFile: external_exports.string().optional().describe("Path to a file containing speaker notes"),
31579
+ before: external_exports.string().optional().describe("Insert before this slide ID (default: append at end)"),
31580
+ account: accountParam
31581
+ }
31582
+ }, async ({ presentationId, image, notes, notesFile, before, account }) => {
31583
+ const args = ["slides", "add-slide", presentationId, image];
31584
+ if (notes) args.push(`--notes=${notes}`);
31585
+ if (notesFile) args.push(`--notes-file=${notesFile}`);
31586
+ if (before) args.push(`--before=${before}`);
31587
+ return runOrDiagnose(args, { account });
31588
+ });
31589
+ server2.registerTool("gog_slides_list_slides", {
31590
+ description: "List slides in a Google Slides presentation.",
31591
+ annotations: { readOnlyHint: true },
31592
+ inputSchema: {
31593
+ presentationId: external_exports.string().describe("Presentation ID"),
31594
+ account: accountParam
31595
+ }
31596
+ }, async ({ presentationId, account }) => {
31597
+ return runOrDiagnose(["slides", "list-slides", presentationId], { account });
31598
+ });
31599
+ server2.registerTool("gog_slides_delete_slide", {
31600
+ description: "Delete a slide from a Google Slides presentation.",
31601
+ annotations: { destructiveHint: true },
31602
+ inputSchema: {
31603
+ presentationId: external_exports.string().describe("Presentation ID"),
31604
+ slideId: external_exports.string().describe("Slide ID to delete"),
31605
+ account: accountParam
31606
+ }
31607
+ }, async ({ presentationId, slideId, account }) => {
31608
+ return runOrDiagnose(["slides", "delete-slide", presentationId, slideId], { account });
31609
+ });
31610
+ server2.registerTool("gog_slides_read_slide", {
31611
+ description: "Read the content of a slide (text, shapes, speaker notes).",
31612
+ annotations: { readOnlyHint: true },
31613
+ inputSchema: {
31614
+ presentationId: external_exports.string().describe("Presentation ID"),
31615
+ slideId: external_exports.string().describe("Slide ID to read"),
31616
+ account: accountParam
31617
+ }
31618
+ }, async ({ presentationId, slideId, account }) => {
31619
+ return runOrDiagnose(["slides", "read-slide", presentationId, slideId], { account });
31620
+ });
31621
+ server2.registerTool("gog_slides_update_notes", {
31622
+ description: "Update the speaker notes on a slide (inline text or from a file).",
31623
+ annotations: { destructiveHint: true },
31624
+ inputSchema: {
31625
+ presentationId: external_exports.string().describe("Presentation ID"),
31626
+ slideId: external_exports.string().describe("Slide ID"),
31627
+ notes: external_exports.string().optional().describe("New speaker notes text"),
31628
+ notesFile: external_exports.string().optional().describe("Path to a file containing new speaker notes"),
31629
+ account: accountParam
31630
+ }
31631
+ }, async ({ presentationId, slideId, notes, notesFile, account }) => {
31632
+ const args = ["slides", "update-notes", presentationId, slideId];
31633
+ if (notes) args.push(`--notes=${notes}`);
31634
+ if (notesFile) args.push(`--notes-file=${notesFile}`);
31635
+ return runOrDiagnose(args, { account });
31636
+ });
31637
+ server2.registerTool("gog_slides_replace_slide", {
31638
+ description: "Replace the image content of an existing slide, with optional speaker notes.",
31639
+ annotations: { destructiveHint: true },
31640
+ inputSchema: {
31641
+ presentationId: external_exports.string().describe("Presentation ID"),
31642
+ slideId: external_exports.string().describe("Slide ID to replace"),
31643
+ image: external_exports.string().describe("Path to the new local image file"),
31644
+ notes: external_exports.string().optional().describe("Speaker notes text"),
31645
+ notesFile: external_exports.string().optional().describe("Path to a file containing speaker notes"),
31646
+ account: accountParam
31647
+ }
31648
+ }, async ({ presentationId, slideId, image, notes, notesFile, account }) => {
31649
+ const args = ["slides", "replace-slide", presentationId, slideId, image];
31650
+ if (notes) args.push(`--notes=${notes}`);
31651
+ if (notesFile) args.push(`--notes-file=${notesFile}`);
31652
+ return runOrDiagnose(args, { account });
31653
+ });
31654
+ server2.registerTool("gog_slides_run", {
31655
+ description: "Run any gog slides subcommand not covered by the other tools. Run `gog slides --help` for the full list of subcommands, or `gog slides <subcommand> --help` for flags on a specific subcommand.",
31656
+ inputSchema: {
31657
+ subcommand: external_exports.string().describe("The gog slides subcommand to run"),
31658
+ args: external_exports.array(external_exports.string()).describe("Additional positional args and flags"),
31659
+ account: accountParam
31660
+ }
31661
+ }, async ({ subcommand, args, account }) => {
31662
+ return runOrDiagnose(["slides", subcommand, ...args], { account });
31663
+ });
31664
+ }
31665
+
30812
31666
  // src/tools/tasks.ts
30813
31667
  function registerTasksTools(server2) {
30814
31668
  server2.registerTool("gog_tasks_lists", {
@@ -30893,19 +31747,24 @@ function registerTasksTools(server2) {
30893
31747
  }
30894
31748
 
30895
31749
  // src/server.ts
30896
- var VERSION = true ? "1.0.10" : "0.0.0";
30897
- function createBaseServer(options) {
30898
- const server2 = new McpServer({
31750
+ var VERSION = true ? "2.0.2" : "0.0.0";
31751
+ function createServer(options) {
31752
+ return new McpServer({
30899
31753
  name: options?.name ?? "gogcli",
30900
31754
  version: options?.version ?? VERSION
30901
31755
  });
31756
+ }
31757
+ function createBaseServer(options) {
31758
+ const server2 = createServer(options);
30902
31759
  registerAuthTools(server2);
30903
31760
  registerCalendarTools(server2);
31761
+ registerClassroomTools(server2);
30904
31762
  registerContactsTools(server2);
30905
31763
  registerDocsTools(server2);
30906
31764
  registerDriveTools(server2);
30907
31765
  registerGmailTools(server2);
30908
31766
  registerSheetsTools(server2);
31767
+ registerSlidesTools(server2);
30909
31768
  registerTasksTools(server2);
30910
31769
  return server2;
30911
31770
  }