gogcli-mcp 2.0.4 → 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.
Files changed (44) hide show
  1. package/.claude-plugin/marketplace.json +4 -4
  2. package/.claude-plugin/plugin.json +2 -2
  3. package/dist/index.d.ts +3 -0
  4. package/dist/index.d.ts.map +1 -0
  5. package/dist/index.js +5 -529
  6. package/dist/lib.d.ts +6 -0
  7. package/dist/lib.d.ts.map +1 -0
  8. package/dist/lib.js +5 -529
  9. package/dist/runner.d.ts +12 -0
  10. package/dist/runner.d.ts.map +1 -0
  11. package/dist/server.d.ts +7 -0
  12. package/dist/server.d.ts.map +1 -0
  13. package/dist/tools/auth.d.ts +3 -0
  14. package/dist/tools/auth.d.ts.map +1 -0
  15. package/dist/tools/calendar.d.ts +3 -0
  16. package/dist/tools/calendar.d.ts.map +1 -0
  17. package/dist/tools/contacts.d.ts +3 -0
  18. package/dist/tools/contacts.d.ts.map +1 -0
  19. package/dist/tools/docs.d.ts +3 -0
  20. package/dist/tools/docs.d.ts.map +1 -0
  21. package/dist/tools/drive.d.ts +3 -0
  22. package/dist/tools/drive.d.ts.map +1 -0
  23. package/dist/tools/gmail.d.ts +3 -0
  24. package/dist/tools/gmail.d.ts.map +1 -0
  25. package/dist/tools/sheets.d.ts +3 -0
  26. package/dist/tools/sheets.d.ts.map +1 -0
  27. package/dist/tools/tasks.d.ts +3 -0
  28. package/dist/tools/tasks.d.ts.map +1 -0
  29. package/dist/tools/utils.d.ts +14 -0
  30. package/dist/tools/utils.d.ts.map +1 -0
  31. package/manifest.json +1 -145
  32. package/package.json +1 -1
  33. package/server.json +3 -3
  34. package/src/runner.ts +4 -1
  35. package/src/tools/calendar.ts +0 -92
  36. package/src/tools/classroom.ts +2 -297
  37. package/src/tools/contacts.ts +1 -75
  38. package/src/tools/slides.ts +1 -108
  39. package/tests/helpers/extras-harness.ts +31 -0
  40. package/tests/runner.test.ts +30 -0
  41. package/tests/tools/calendar.test.ts +0 -137
  42. package/tests/tools/classroom.test.ts +0 -352
  43. package/tests/tools/contacts.test.ts +0 -100
  44. package/tests/tools/slides.test.ts +6 -278
package/dist/lib.js CHANGED
@@ -31052,88 +31052,6 @@ function registerCalendarTools(server) {
31052
31052
  }, async ({ subcommand, args, account }) => {
31053
31053
  return runOrDiagnose(["calendar", subcommand, ...args], { account });
31054
31054
  });
31055
- server.registerTool("gog_meet_create", {
31056
- description: "Create a Google Meet space and return its meeting code.",
31057
- inputSchema: {
31058
- access: external_exports.enum(["open", "trusted", "restricted"]).optional().describe("Access type (default: trusted)"),
31059
- open: external_exports.boolean().optional().describe("Open the meeting in a browser after creation"),
31060
- account: accountParam
31061
- }
31062
- }, async ({ access, open, account }) => {
31063
- const args = ["meet", "create"];
31064
- if (access) args.push(`--access=${access}`);
31065
- if (open) args.push("--open");
31066
- return runOrDiagnose(args, { account });
31067
- });
31068
- server.registerTool("gog_meet_get", {
31069
- description: "Get a Google Meet space by its meeting code.",
31070
- annotations: { readOnlyHint: true },
31071
- inputSchema: {
31072
- meetingCode: external_exports.string().describe("Meeting code (e.g. abc-defg-hij)"),
31073
- account: accountParam
31074
- }
31075
- }, async ({ meetingCode, account }) => {
31076
- return runOrDiagnose(["meet", "get", meetingCode], { account });
31077
- });
31078
- server.registerTool("gog_meet_update", {
31079
- description: "Update a Google Meet space configuration.",
31080
- annotations: { destructiveHint: true },
31081
- inputSchema: {
31082
- meetingCode: external_exports.string().describe("Meeting code"),
31083
- access: external_exports.enum(["open", "trusted", "restricted"]).optional().describe("Access type"),
31084
- account: accountParam
31085
- }
31086
- }, async ({ meetingCode, access, account }) => {
31087
- const args = ["meet", "update", meetingCode];
31088
- if (access) args.push(`--access=${access}`);
31089
- return runOrDiagnose(args, { account });
31090
- });
31091
- server.registerTool("gog_meet_end", {
31092
- description: "End the active conference in a Google Meet space.",
31093
- annotations: { destructiveHint: true },
31094
- inputSchema: {
31095
- meetingCode: external_exports.string().describe("Meeting code"),
31096
- account: accountParam
31097
- }
31098
- }, async ({ meetingCode, account }) => {
31099
- return runOrDiagnose(["meet", "end", meetingCode], { account });
31100
- });
31101
- server.registerTool("gog_meet_history", {
31102
- description: "List past calls (conferences) in a Google Meet space.",
31103
- annotations: { readOnlyHint: true },
31104
- inputSchema: {
31105
- meetingCode: external_exports.string().describe("Meeting code"),
31106
- max: external_exports.number().optional().describe("Max results (default: 20)"),
31107
- page: external_exports.string().optional().describe("Page token"),
31108
- all: external_exports.boolean().optional().describe("Fetch all pages"),
31109
- account: accountParam
31110
- }
31111
- }, async ({ meetingCode, max, page, all, account }) => {
31112
- const args = ["meet", "history", meetingCode];
31113
- if (max !== void 0) args.push(`--max=${max}`);
31114
- if (page) args.push(`--page=${page}`);
31115
- if (all) args.push("--all");
31116
- return runOrDiagnose(args, { account });
31117
- });
31118
- server.registerTool("gog_meet_participants", {
31119
- description: "List participants from the latest (or a specific) Meet call.",
31120
- annotations: { readOnlyHint: true },
31121
- inputSchema: {
31122
- meetingCode: external_exports.string().describe("Meeting code"),
31123
- conference: external_exports.string().optional().describe("Specific conference ID (default: most recent)"),
31124
- max: external_exports.number().optional().describe("Max results (default: 50)"),
31125
- page: external_exports.string().optional().describe("Page token"),
31126
- all: external_exports.boolean().optional().describe("Fetch all pages"),
31127
- account: accountParam
31128
- }
31129
- }, async ({ meetingCode, conference, max, page, all, account }) => {
31130
- const args = ["meet", "participants", meetingCode];
31131
- if (conference) args.push(`--conference=${conference}`);
31132
- if (max !== void 0) args.push(`--max=${max}`);
31133
- if (page) args.push(`--page=${page}`);
31134
- if (all) args.push("--all");
31135
- return runOrDiagnose(args, { account });
31136
- });
31137
31055
  }
31138
31056
 
31139
31057
  // src/tools/classroom.ts
@@ -31170,83 +31088,6 @@ function registerClassroomTools(server) {
31170
31088
  }, async ({ courseId, account }) => {
31171
31089
  return runOrDiagnose(["classroom", "courses", "get", courseId], { account });
31172
31090
  });
31173
- server.registerTool("gog_classroom_courses_create", {
31174
- description: "Create a new Google Classroom course.",
31175
- inputSchema: {
31176
- name: external_exports.string().describe("Course name"),
31177
- owner: external_exports.string().optional().describe('Owner user ID (default: "me")'),
31178
- section: external_exports.string().optional().describe("Section"),
31179
- descriptionHeading: external_exports.string().optional().describe("Description heading"),
31180
- description: external_exports.string().optional().describe("Description"),
31181
- room: external_exports.string().optional().describe("Room"),
31182
- state: external_exports.string().optional().describe("Course state: ACTIVE, ARCHIVED, PROVISIONED, DECLINED, SUSPENDED"),
31183
- account: accountParam
31184
- }
31185
- }, async ({ name, owner, section, descriptionHeading, description, room, state, account }) => {
31186
- const args = ["classroom", "courses", "create", `--name=${name}`];
31187
- if (owner) args.push(`--owner=${owner}`);
31188
- if (section) args.push(`--section=${section}`);
31189
- if (descriptionHeading) args.push(`--description-heading=${descriptionHeading}`);
31190
- if (description) args.push(`--description=${description}`);
31191
- if (room) args.push(`--room=${room}`);
31192
- if (state) args.push(`--state=${state}`);
31193
- return runOrDiagnose(args, { account });
31194
- });
31195
- server.registerTool("gog_classroom_courses_update", {
31196
- description: "Update an existing Google Classroom course.",
31197
- annotations: { destructiveHint: true },
31198
- inputSchema: {
31199
- courseId: external_exports.string().describe("Course ID"),
31200
- name: external_exports.string().optional().describe("Course name"),
31201
- owner: external_exports.string().optional().describe("Owner user ID"),
31202
- section: external_exports.string().optional().describe("Section"),
31203
- descriptionHeading: external_exports.string().optional().describe("Description heading"),
31204
- description: external_exports.string().optional().describe("Description"),
31205
- room: external_exports.string().optional().describe("Room"),
31206
- state: external_exports.string().optional().describe("Course state: ACTIVE, ARCHIVED, PROVISIONED, DECLINED, SUSPENDED"),
31207
- account: accountParam
31208
- }
31209
- }, async ({ courseId, name, owner, section, descriptionHeading, description, room, state, account }) => {
31210
- const args = ["classroom", "courses", "update", courseId];
31211
- if (name) args.push(`--name=${name}`);
31212
- if (owner) args.push(`--owner=${owner}`);
31213
- if (section) args.push(`--section=${section}`);
31214
- if (descriptionHeading) args.push(`--description-heading=${descriptionHeading}`);
31215
- if (description) args.push(`--description=${description}`);
31216
- if (room) args.push(`--room=${room}`);
31217
- if (state) args.push(`--state=${state}`);
31218
- return runOrDiagnose(args, { account });
31219
- });
31220
- server.registerTool("gog_classroom_courses_delete", {
31221
- description: "Delete a Google Classroom course.",
31222
- annotations: { destructiveHint: true },
31223
- inputSchema: {
31224
- courseId: external_exports.string().describe("Course ID"),
31225
- account: accountParam
31226
- }
31227
- }, async ({ courseId, account }) => {
31228
- return runOrDiagnose(["classroom", "courses", "delete", courseId], { account });
31229
- });
31230
- server.registerTool("gog_classroom_courses_archive", {
31231
- description: "Archive a Google Classroom course.",
31232
- annotations: { destructiveHint: true },
31233
- inputSchema: {
31234
- courseId: external_exports.string().describe("Course ID"),
31235
- account: accountParam
31236
- }
31237
- }, async ({ courseId, account }) => {
31238
- return runOrDiagnose(["classroom", "courses", "archive", courseId], { account });
31239
- });
31240
- server.registerTool("gog_classroom_courses_unarchive", {
31241
- description: "Unarchive a Google Classroom course (restore to ACTIVE).",
31242
- annotations: { destructiveHint: true },
31243
- inputSchema: {
31244
- courseId: external_exports.string().describe("Course ID"),
31245
- account: accountParam
31246
- }
31247
- }, async ({ courseId, account }) => {
31248
- return runOrDiagnose(["classroom", "courses", "unarchive", courseId], { account });
31249
- });
31250
31091
  server.registerTool("gog_classroom_students_list", {
31251
31092
  description: "List students enrolled in a Google Classroom course.",
31252
31093
  annotations: { readOnlyHint: true },
@@ -31275,30 +31116,6 @@ function registerClassroomTools(server) {
31275
31116
  }, async ({ courseId, userId, account }) => {
31276
31117
  return runOrDiagnose(["classroom", "students", "get", courseId, userId], { account });
31277
31118
  });
31278
- server.registerTool("gog_classroom_students_add", {
31279
- description: "Add a student to a Google Classroom course.",
31280
- inputSchema: {
31281
- courseId: external_exports.string().describe("Course ID"),
31282
- userId: external_exports.string().describe('Student user ID (or "me")'),
31283
- enrollmentCode: external_exports.string().optional().describe("Enrollment code (required if adding self via code)"),
31284
- account: accountParam
31285
- }
31286
- }, async ({ courseId, userId, enrollmentCode, account }) => {
31287
- const args = ["classroom", "students", "add", courseId, userId];
31288
- if (enrollmentCode) args.push(`--enrollment-code=${enrollmentCode}`);
31289
- return runOrDiagnose(args, { account });
31290
- });
31291
- server.registerTool("gog_classroom_students_remove", {
31292
- description: "Remove a student from a Google Classroom course.",
31293
- annotations: { destructiveHint: true },
31294
- inputSchema: {
31295
- courseId: external_exports.string().describe("Course ID"),
31296
- userId: external_exports.string().describe("Student user ID"),
31297
- account: accountParam
31298
- }
31299
- }, async ({ courseId, userId, account }) => {
31300
- return runOrDiagnose(["classroom", "students", "remove", courseId, userId], { account });
31301
- });
31302
31119
  server.registerTool("gog_classroom_teachers_list", {
31303
31120
  description: "List teachers in a Google Classroom course.",
31304
31121
  annotations: { readOnlyHint: true },
@@ -31327,27 +31144,6 @@ function registerClassroomTools(server) {
31327
31144
  }, async ({ courseId, userId, account }) => {
31328
31145
  return runOrDiagnose(["classroom", "teachers", "get", courseId, userId], { account });
31329
31146
  });
31330
- server.registerTool("gog_classroom_teachers_add", {
31331
- description: "Add a teacher to a Google Classroom course.",
31332
- inputSchema: {
31333
- courseId: external_exports.string().describe("Course ID"),
31334
- userId: external_exports.string().describe("Teacher user ID"),
31335
- account: accountParam
31336
- }
31337
- }, async ({ courseId, userId, account }) => {
31338
- return runOrDiagnose(["classroom", "teachers", "add", courseId, userId], { account });
31339
- });
31340
- server.registerTool("gog_classroom_teachers_remove", {
31341
- description: "Remove a teacher from a Google Classroom course.",
31342
- annotations: { destructiveHint: true },
31343
- inputSchema: {
31344
- courseId: external_exports.string().describe("Course ID"),
31345
- userId: external_exports.string().describe("Teacher user ID"),
31346
- account: accountParam
31347
- }
31348
- }, async ({ courseId, userId, account }) => {
31349
- return runOrDiagnose(["classroom", "teachers", "remove", courseId, userId], { account });
31350
- });
31351
31147
  server.registerTool("gog_classroom_roster", {
31352
31148
  description: "List the full roster (students and/or teachers) of a Google Classroom course. Omit both flags to return both groups.",
31353
31149
  annotations: { readOnlyHint: true },
@@ -31405,78 +31201,6 @@ function registerClassroomTools(server) {
31405
31201
  }, async ({ courseId, courseworkId, account }) => {
31406
31202
  return runOrDiagnose(["classroom", "coursework", "get", courseId, courseworkId], { account });
31407
31203
  });
31408
- server.registerTool("gog_classroom_coursework_create", {
31409
- description: "Create a new coursework item (assignment, question, etc.) in a course.",
31410
- inputSchema: {
31411
- courseId: external_exports.string().describe("Course ID"),
31412
- title: external_exports.string().describe("Coursework title"),
31413
- description: external_exports.string().optional().describe("Description"),
31414
- type: external_exports.string().optional().describe("Work type (ASSIGNMENT, SHORT_ANSWER_QUESTION, MULTIPLE_CHOICE_QUESTION). Default: ASSIGNMENT"),
31415
- state: external_exports.string().optional().describe("State: PUBLISHED or DRAFT"),
31416
- maxPoints: external_exports.number().optional().describe("Max points"),
31417
- due: external_exports.string().optional().describe("Due datetime (combined date+time)"),
31418
- dueDate: external_exports.string().optional().describe("Due date (YYYY-MM-DD)"),
31419
- dueTime: external_exports.string().optional().describe("Due time (HH:MM)"),
31420
- scheduled: external_exports.string().optional().describe("Scheduled publish time"),
31421
- topic: external_exports.string().optional().describe("Topic ID"),
31422
- account: accountParam
31423
- }
31424
- }, async ({ courseId, title, description, type, state, maxPoints, due, dueDate, dueTime, scheduled, topic, account }) => {
31425
- const args = ["classroom", "coursework", "create", courseId, `--title=${title}`];
31426
- if (description) args.push(`--description=${description}`);
31427
- if (type) args.push(`--type=${type}`);
31428
- if (state) args.push(`--state=${state}`);
31429
- if (maxPoints !== void 0) args.push(`--max-points=${maxPoints}`);
31430
- if (due) args.push(`--due=${due}`);
31431
- if (dueDate) args.push(`--due-date=${dueDate}`);
31432
- if (dueTime) args.push(`--due-time=${dueTime}`);
31433
- if (scheduled) args.push(`--scheduled=${scheduled}`);
31434
- if (topic) args.push(`--topic=${topic}`);
31435
- return runOrDiagnose(args, { account });
31436
- });
31437
- server.registerTool("gog_classroom_coursework_update", {
31438
- description: "Update an existing coursework item.",
31439
- annotations: { destructiveHint: true },
31440
- inputSchema: {
31441
- courseId: external_exports.string().describe("Course ID"),
31442
- courseworkId: external_exports.string().describe("Coursework ID"),
31443
- title: external_exports.string().optional().describe("New title"),
31444
- description: external_exports.string().optional().describe("New description"),
31445
- type: external_exports.string().optional().describe("Work type"),
31446
- state: external_exports.string().optional().describe("State: PUBLISHED or DRAFT"),
31447
- maxPoints: external_exports.number().optional().describe("Max points"),
31448
- due: external_exports.string().optional().describe("Due datetime"),
31449
- dueDate: external_exports.string().optional().describe("Due date (YYYY-MM-DD)"),
31450
- dueTime: external_exports.string().optional().describe("Due time (HH:MM)"),
31451
- scheduled: external_exports.string().optional().describe("Scheduled publish time"),
31452
- topic: external_exports.string().optional().describe("Topic ID"),
31453
- account: accountParam
31454
- }
31455
- }, async ({ courseId, courseworkId, title, description, type, state, maxPoints, due, dueDate, dueTime, scheduled, topic, account }) => {
31456
- const args = ["classroom", "coursework", "update", courseId, courseworkId];
31457
- if (title) args.push(`--title=${title}`);
31458
- if (description) args.push(`--description=${description}`);
31459
- if (type) args.push(`--type=${type}`);
31460
- if (state) args.push(`--state=${state}`);
31461
- if (maxPoints !== void 0) args.push(`--max-points=${maxPoints}`);
31462
- if (due) args.push(`--due=${due}`);
31463
- if (dueDate) args.push(`--due-date=${dueDate}`);
31464
- if (dueTime) args.push(`--due-time=${dueTime}`);
31465
- if (scheduled) args.push(`--scheduled=${scheduled}`);
31466
- if (topic) args.push(`--topic=${topic}`);
31467
- return runOrDiagnose(args, { account });
31468
- });
31469
- server.registerTool("gog_classroom_coursework_delete", {
31470
- description: "Delete a coursework item.",
31471
- annotations: { destructiveHint: true },
31472
- inputSchema: {
31473
- courseId: external_exports.string().describe("Course ID"),
31474
- courseworkId: external_exports.string().describe("Coursework ID"),
31475
- account: accountParam
31476
- }
31477
- }, async ({ courseId, courseworkId, account }) => {
31478
- return runOrDiagnose(["classroom", "coursework", "delete", courseId, courseworkId], { account });
31479
- });
31480
31204
  server.registerTool("gog_classroom_submissions_list", {
31481
31205
  description: "List student submissions for a coursework item.",
31482
31206
  annotations: { readOnlyHint: true },
@@ -31603,7 +31327,7 @@ function registerClassroomTools(server) {
31603
31327
  inputSchema: {
31604
31328
  courseId: external_exports.string().describe("Course ID"),
31605
31329
  text: external_exports.string().describe("Announcement text"),
31606
- state: external_exports.string().optional().describe("State: PUBLISHED or DRAFT"),
31330
+ state: external_exports.enum(["PUBLISHED", "DRAFT"]).optional().describe("State"),
31607
31331
  scheduled: external_exports.string().optional().describe("Scheduled publish time"),
31608
31332
  account: accountParam
31609
31333
  }
@@ -31613,35 +31337,6 @@ function registerClassroomTools(server) {
31613
31337
  if (scheduled) args.push(`--scheduled=${scheduled}`);
31614
31338
  return runOrDiagnose(args, { account });
31615
31339
  });
31616
- server.registerTool("gog_classroom_announcements_update", {
31617
- description: "Update an existing announcement.",
31618
- annotations: { destructiveHint: true },
31619
- inputSchema: {
31620
- courseId: external_exports.string().describe("Course ID"),
31621
- announcementId: external_exports.string().describe("Announcement ID"),
31622
- text: external_exports.string().optional().describe("New text"),
31623
- state: external_exports.string().optional().describe("State: PUBLISHED or DRAFT"),
31624
- scheduled: external_exports.string().optional().describe("Scheduled publish time"),
31625
- account: accountParam
31626
- }
31627
- }, async ({ courseId, announcementId, text, state, scheduled, account }) => {
31628
- const args = ["classroom", "announcements", "update", courseId, announcementId];
31629
- if (text) args.push(`--text=${text}`);
31630
- if (state) args.push(`--state=${state}`);
31631
- if (scheduled) args.push(`--scheduled=${scheduled}`);
31632
- return runOrDiagnose(args, { account });
31633
- });
31634
- server.registerTool("gog_classroom_announcements_delete", {
31635
- description: "Delete an announcement.",
31636
- annotations: { destructiveHint: true },
31637
- inputSchema: {
31638
- courseId: external_exports.string().describe("Course ID"),
31639
- announcementId: external_exports.string().describe("Announcement ID"),
31640
- account: accountParam
31641
- }
31642
- }, async ({ courseId, announcementId, account }) => {
31643
- return runOrDiagnose(["classroom", "announcements", "delete", courseId, announcementId], { account });
31644
- });
31645
31340
  server.registerTool("gog_classroom_topics_list", {
31646
31341
  description: "List topics in a Google Classroom course.",
31647
31342
  annotations: { readOnlyHint: true },
@@ -31670,39 +31365,6 @@ function registerClassroomTools(server) {
31670
31365
  }, async ({ courseId, topicId, account }) => {
31671
31366
  return runOrDiagnose(["classroom", "topics", "get", courseId, topicId], { account });
31672
31367
  });
31673
- server.registerTool("gog_classroom_topics_create", {
31674
- description: "Create a topic in a Google Classroom course.",
31675
- inputSchema: {
31676
- courseId: external_exports.string().describe("Course ID"),
31677
- name: external_exports.string().describe("Topic name"),
31678
- account: accountParam
31679
- }
31680
- }, async ({ courseId, name, account }) => {
31681
- return runOrDiagnose(["classroom", "topics", "create", courseId, `--name=${name}`], { account });
31682
- });
31683
- server.registerTool("gog_classroom_topics_update", {
31684
- description: "Rename an existing topic.",
31685
- annotations: { destructiveHint: true },
31686
- inputSchema: {
31687
- courseId: external_exports.string().describe("Course ID"),
31688
- topicId: external_exports.string().describe("Topic ID"),
31689
- name: external_exports.string().describe("New topic name"),
31690
- account: accountParam
31691
- }
31692
- }, async ({ courseId, topicId, name, account }) => {
31693
- return runOrDiagnose(["classroom", "topics", "update", courseId, topicId, `--name=${name}`], { account });
31694
- });
31695
- server.registerTool("gog_classroom_topics_delete", {
31696
- description: "Delete a topic.",
31697
- annotations: { destructiveHint: true },
31698
- inputSchema: {
31699
- courseId: external_exports.string().describe("Course ID"),
31700
- topicId: external_exports.string().describe("Topic ID"),
31701
- account: accountParam
31702
- }
31703
- }, async ({ courseId, topicId, account }) => {
31704
- return runOrDiagnose(["classroom", "topics", "delete", courseId, topicId], { account });
31705
- });
31706
31368
  server.registerTool("gog_classroom_invitations_list", {
31707
31369
  description: "List Google Classroom invitations.",
31708
31370
  annotations: { readOnlyHint: true },
@@ -31733,17 +31395,6 @@ function registerClassroomTools(server) {
31733
31395
  }, async ({ invitationId, account }) => {
31734
31396
  return runOrDiagnose(["classroom", "invitations", "get", invitationId], { account });
31735
31397
  });
31736
- server.registerTool("gog_classroom_invitations_create", {
31737
- description: "Create an invitation to a Google Classroom course.",
31738
- inputSchema: {
31739
- courseId: external_exports.string().describe("Course ID"),
31740
- userId: external_exports.string().describe("User ID to invite"),
31741
- role: external_exports.enum(["STUDENT", "TEACHER", "OWNER"]).describe("Role for the invited user"),
31742
- account: accountParam
31743
- }
31744
- }, async ({ courseId, userId, role, account }) => {
31745
- return runOrDiagnose(["classroom", "invitations", "create", courseId, userId, `--role=${role}`], { account });
31746
- });
31747
31398
  server.registerTool("gog_classroom_invitations_accept", {
31748
31399
  description: "Accept a Google Classroom invitation.",
31749
31400
  inputSchema: {
@@ -31753,16 +31404,6 @@ function registerClassroomTools(server) {
31753
31404
  }, async ({ invitationId, account }) => {
31754
31405
  return runOrDiagnose(["classroom", "invitations", "accept", invitationId], { account });
31755
31406
  });
31756
- server.registerTool("gog_classroom_invitations_delete", {
31757
- description: "Delete (revoke) a Google Classroom invitation.",
31758
- annotations: { destructiveHint: true },
31759
- inputSchema: {
31760
- invitationId: external_exports.string().describe("Invitation ID"),
31761
- account: accountParam
31762
- }
31763
- }, async ({ invitationId, account }) => {
31764
- return runOrDiagnose(["classroom", "invitations", "delete", invitationId], { account });
31765
- });
31766
31407
  server.registerTool("gog_classroom_profile_get", {
31767
31408
  description: "Get a Google Classroom user profile. Omit userId to fetch the authenticated user.",
31768
31409
  annotations: { readOnlyHint: true },
@@ -31777,6 +31418,7 @@ function registerClassroomTools(server) {
31777
31418
  });
31778
31419
  server.registerTool("gog_classroom_run", {
31779
31420
  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.",
31421
+ annotations: { destructiveHint: true },
31780
31422
  inputSchema: {
31781
31423
  subcommand: external_exports.string().describe('The gog classroom subcommand to run, e.g. "guardians", "materials", "guardian-invitations"'),
31782
31424
  args: external_exports.array(external_exports.string()).describe("Additional positional args and flags"),
@@ -31790,7 +31432,7 @@ function registerClassroomTools(server) {
31790
31432
  // src/tools/contacts.ts
31791
31433
  function registerContactsTools(server) {
31792
31434
  server.registerTool("gog_contacts_search", {
31793
- description: "Search Google Contacts by name, email, or phone.",
31435
+ description: "Search personal Google Contacts by name, email, or phone. For searching the Workspace directory (internal users not in your personal contacts), use gog_people_search from gogcli-mcp-contacts.",
31794
31436
  annotations: { readOnlyHint: true },
31795
31437
  inputSchema: {
31796
31438
  query: external_exports.string().describe("Search query (name, email, or phone)"),
@@ -31850,71 +31492,6 @@ function registerContactsTools(server) {
31850
31492
  }, async ({ subcommand, args, account }) => {
31851
31493
  return runOrDiagnose(["contacts", subcommand, ...args], { account });
31852
31494
  });
31853
- server.registerTool("gog_people_me", {
31854
- description: "Show your own People profile (people/me).",
31855
- annotations: { readOnlyHint: true },
31856
- inputSchema: {
31857
- account: accountParam
31858
- }
31859
- }, async ({ account }) => {
31860
- return runOrDiagnose(["people", "me"], { account });
31861
- });
31862
- server.registerTool("gog_people_get", {
31863
- description: "Get a People profile by resource name.",
31864
- annotations: { readOnlyHint: true },
31865
- inputSchema: {
31866
- userId: external_exports.string().describe("Person resource name (people/...) or email"),
31867
- account: accountParam
31868
- }
31869
- }, async ({ userId, account }) => {
31870
- return runOrDiagnose(["people", "get", userId], { account });
31871
- });
31872
- server.registerTool("gog_people_search", {
31873
- description: "Search the Google Workspace directory (covers internal users, unlike contacts search which is limited to your personal contacts).",
31874
- annotations: { readOnlyHint: true },
31875
- inputSchema: {
31876
- query: external_exports.string().describe("Search query (name, email, etc.)"),
31877
- max: external_exports.number().optional().describe("Max results (default: 50)"),
31878
- page: external_exports.string().optional().describe("Page token"),
31879
- all: external_exports.boolean().optional().describe("Fetch all pages"),
31880
- account: accountParam
31881
- }
31882
- }, async ({ query, max, page, all, account }) => {
31883
- const args = ["people", "search", query];
31884
- if (max !== void 0) args.push(`--max=${max}`);
31885
- if (page) args.push(`--page=${page}`);
31886
- if (all) args.push("--all");
31887
- return runOrDiagnose(args, { account });
31888
- });
31889
- server.registerTool("gog_people_relations", {
31890
- description: "Get relations (manager, reports, etc.) for a user. Defaults to self when userId is omitted.",
31891
- annotations: { readOnlyHint: true },
31892
- inputSchema: {
31893
- userId: external_exports.string().optional().describe("Person resource name (defaults to self when omitted)"),
31894
- type: external_exports.string().optional().describe('Filter to a specific relation type (e.g. "manager")'),
31895
- account: accountParam
31896
- }
31897
- }, async ({ userId, type, account }) => {
31898
- const args = ["people", "relations"];
31899
- if (userId) args.push(userId);
31900
- if (type) args.push(`--type=${type}`);
31901
- return runOrDiagnose(args, { account });
31902
- });
31903
- server.registerTool("gog_people_raw", {
31904
- description: "Dump the raw People API response as JSON (lossless; for scripting and LLM consumption).",
31905
- annotations: { readOnlyHint: true },
31906
- inputSchema: {
31907
- userId: external_exports.string().describe("Person resource name (people/...) or email"),
31908
- personFields: external_exports.string().optional().describe("People API personFields mask (default: broad set)"),
31909
- pretty: external_exports.boolean().optional().describe("Pretty-print JSON (default: compact single-line)"),
31910
- account: accountParam
31911
- }
31912
- }, async ({ userId, personFields, pretty, account }) => {
31913
- const args = ["people", "raw", userId];
31914
- if (personFields) args.push(`--person-fields=${personFields}`);
31915
- if (pretty) args.push("--pretty");
31916
- return runOrDiagnose(args, { account });
31917
- });
31918
31495
  }
31919
31496
 
31920
31497
  // src/tools/docs.ts
@@ -32317,47 +31894,6 @@ function registerSlidesTools(server) {
32317
31894
  if (template) args.push(`--template=${template}`);
32318
31895
  return runOrDiagnose(args, { account });
32319
31896
  });
32320
- server.registerTool("gog_slides_create_from_markdown", {
32321
- description: "Create a new Google Slides presentation from markdown content (inline or from a file).",
32322
- inputSchema: {
32323
- title: external_exports.string().describe("Presentation title"),
32324
- content: external_exports.string().optional().describe("Inline markdown content"),
32325
- contentFile: external_exports.string().optional().describe("Path to a markdown file"),
32326
- parent: external_exports.string().optional().describe("Destination folder ID"),
32327
- debug: external_exports.boolean().optional().describe("Enable debug output"),
32328
- account: accountParam
32329
- }
32330
- }, async ({ title, content, contentFile, parent, debug, account }) => {
32331
- const args = ["slides", "create-from-markdown", title];
32332
- if (content) args.push(`--content=${content}`);
32333
- if (contentFile) args.push(`--content-file=${contentFile}`);
32334
- if (parent) args.push(`--parent=${parent}`);
32335
- if (debug) args.push("--debug");
32336
- return runOrDiagnose(args, { account });
32337
- });
32338
- server.registerTool("gog_slides_create_from_template", {
32339
- description: "Create a new Google Slides presentation from a template, with optional placeholder replacements.",
32340
- inputSchema: {
32341
- templateId: external_exports.string().describe("Template presentation ID"),
32342
- title: external_exports.string().describe("New presentation title"),
32343
- 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)"),
32344
- replacementsFile: external_exports.string().optional().describe("Path to a JSON file containing replacements"),
32345
- parent: external_exports.string().optional().describe("Destination folder ID"),
32346
- exact: external_exports.boolean().optional().describe("Require exact placeholder matches"),
32347
- account: accountParam
32348
- }
32349
- }, async ({ templateId, title, replacements, replacementsFile, parent, exact, account }) => {
32350
- const args = ["slides", "create-from-template", templateId, title];
32351
- if (replacements) {
32352
- for (const [k, v] of Object.entries(replacements)) {
32353
- args.push(`--replace=${k}=${v}`);
32354
- }
32355
- }
32356
- if (replacementsFile) args.push(`--replacements=${replacementsFile}`);
32357
- if (parent) args.push(`--parent=${parent}`);
32358
- if (exact) args.push("--exact");
32359
- return runOrDiagnose(args, { account });
32360
- });
32361
31897
  server.registerTool("gog_slides_copy", {
32362
31898
  description: "Copy a Google Slides presentation to a new presentation with the given title.",
32363
31899
  inputSchema: {
@@ -32371,23 +31907,6 @@ function registerSlidesTools(server) {
32371
31907
  if (parent) args.push(`--parent=${parent}`);
32372
31908
  return runOrDiagnose(args, { account });
32373
31909
  });
32374
- server.registerTool("gog_slides_add_slide", {
32375
- description: "Add a new slide to a presentation from a local image, with optional speaker notes.",
32376
- inputSchema: {
32377
- presentationId: external_exports.string().describe("Presentation ID"),
32378
- image: external_exports.string().describe("Path to the local image file"),
32379
- notes: external_exports.string().optional().describe("Speaker notes text"),
32380
- notesFile: external_exports.string().optional().describe("Path to a file containing speaker notes"),
32381
- before: external_exports.string().optional().describe("Insert before this slide ID (default: append at end)"),
32382
- account: accountParam
32383
- }
32384
- }, async ({ presentationId, image, notes, notesFile, before, account }) => {
32385
- const args = ["slides", "add-slide", presentationId, image];
32386
- if (notes) args.push(`--notes=${notes}`);
32387
- if (notesFile) args.push(`--notes-file=${notesFile}`);
32388
- if (before) args.push(`--before=${before}`);
32389
- return runOrDiagnose(args, { account });
32390
- });
32391
31910
  server.registerTool("gog_slides_list_slides", {
32392
31911
  description: "List slides in a Google Slides presentation.",
32393
31912
  annotations: { readOnlyHint: true },
@@ -32398,17 +31917,6 @@ function registerSlidesTools(server) {
32398
31917
  }, async ({ presentationId, account }) => {
32399
31918
  return runOrDiagnose(["slides", "list-slides", presentationId], { account });
32400
31919
  });
32401
- server.registerTool("gog_slides_delete_slide", {
32402
- description: "Delete a slide from a Google Slides presentation.",
32403
- annotations: { destructiveHint: true },
32404
- inputSchema: {
32405
- presentationId: external_exports.string().describe("Presentation ID"),
32406
- slideId: external_exports.string().describe("Slide ID to delete"),
32407
- account: accountParam
32408
- }
32409
- }, async ({ presentationId, slideId, account }) => {
32410
- return runOrDiagnose(["slides", "delete-slide", presentationId, slideId], { account });
32411
- });
32412
31920
  server.registerTool("gog_slides_read_slide", {
32413
31921
  description: "Read the content of a slide (text, shapes, speaker notes).",
32414
31922
  annotations: { readOnlyHint: true },
@@ -32420,41 +31928,9 @@ function registerSlidesTools(server) {
32420
31928
  }, async ({ presentationId, slideId, account }) => {
32421
31929
  return runOrDiagnose(["slides", "read-slide", presentationId, slideId], { account });
32422
31930
  });
32423
- server.registerTool("gog_slides_update_notes", {
32424
- description: "Update the speaker notes on a slide (inline text or from a file).",
32425
- annotations: { destructiveHint: true },
32426
- inputSchema: {
32427
- presentationId: external_exports.string().describe("Presentation ID"),
32428
- slideId: external_exports.string().describe("Slide ID"),
32429
- notes: external_exports.string().optional().describe("New speaker notes text"),
32430
- notesFile: external_exports.string().optional().describe("Path to a file containing new speaker notes"),
32431
- account: accountParam
32432
- }
32433
- }, async ({ presentationId, slideId, notes, notesFile, account }) => {
32434
- const args = ["slides", "update-notes", presentationId, slideId];
32435
- if (notes) args.push(`--notes=${notes}`);
32436
- if (notesFile) args.push(`--notes-file=${notesFile}`);
32437
- return runOrDiagnose(args, { account });
32438
- });
32439
- server.registerTool("gog_slides_replace_slide", {
32440
- description: "Replace the image content of an existing slide, with optional speaker notes.",
32441
- annotations: { destructiveHint: true },
32442
- inputSchema: {
32443
- presentationId: external_exports.string().describe("Presentation ID"),
32444
- slideId: external_exports.string().describe("Slide ID to replace"),
32445
- image: external_exports.string().describe("Path to the new local image file"),
32446
- notes: external_exports.string().optional().describe("Speaker notes text"),
32447
- notesFile: external_exports.string().optional().describe("Path to a file containing speaker notes"),
32448
- account: accountParam
32449
- }
32450
- }, async ({ presentationId, slideId, image, notes, notesFile, account }) => {
32451
- const args = ["slides", "replace-slide", presentationId, slideId, image];
32452
- if (notes) args.push(`--notes=${notes}`);
32453
- if (notesFile) args.push(`--notes-file=${notesFile}`);
32454
- return runOrDiagnose(args, { account });
32455
- });
32456
31931
  server.registerTool("gog_slides_run", {
32457
31932
  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.",
31933
+ annotations: { destructiveHint: true },
32458
31934
  inputSchema: {
32459
31935
  subcommand: external_exports.string().describe("The gog slides subcommand to run"),
32460
31936
  args: external_exports.array(external_exports.string()).describe("Additional positional args and flags"),
@@ -32549,7 +32025,7 @@ function registerTasksTools(server) {
32549
32025
  }
32550
32026
 
32551
32027
  // src/server.ts
32552
- var VERSION = true ? "2.0.4" : "0.0.0";
32028
+ var VERSION = true ? "2.0.5" : "0.0.0";
32553
32029
  function createServer(options) {
32554
32030
  return new McpServer({
32555
32031
  name: options?.name ?? "gogcli",
@@ -0,0 +1,12 @@
1
+ import type { ChildProcess } from 'node:child_process';
2
+ export type Spawner = (command: string, args: string[], options: {
3
+ env: NodeJS.ProcessEnv;
4
+ }) => ChildProcess;
5
+ export interface RunOptions {
6
+ account?: string;
7
+ spawner?: Spawner;
8
+ interactive?: boolean;
9
+ timeout?: number;
10
+ }
11
+ export declare function run(args: string[], options?: RunOptions): Promise<string>;
12
+ //# sourceMappingURL=runner.d.ts.map