google-mcp-suite 1.6.0 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -7
- package/dist/doctor/services.d.ts.map +1 -1
- package/dist/doctor/services.js +13 -1
- package/dist/doctor/services.js.map +1 -1
- package/dist/drive/capabilities.d.ts +3 -0
- package/dist/drive/capabilities.d.ts.map +1 -0
- package/dist/drive/capabilities.js +21 -0
- package/dist/drive/capabilities.js.map +1 -0
- package/dist/drive/entities/About.d.ts +26 -0
- package/dist/drive/entities/About.d.ts.map +1 -0
- package/dist/drive/entities/About.js +31 -0
- package/dist/drive/entities/About.js.map +1 -0
- package/dist/drive/entities/Comment.d.ts +48 -0
- package/dist/drive/entities/Comment.d.ts.map +1 -0
- package/dist/drive/entities/Comment.js +53 -0
- package/dist/drive/entities/Comment.js.map +1 -0
- package/dist/drive/entities/File.d.ts +42 -0
- package/dist/drive/entities/File.d.ts.map +1 -0
- package/dist/drive/entities/File.js +75 -0
- package/dist/drive/entities/File.js.map +1 -0
- package/dist/drive/entities/Permission.d.ts +33 -0
- package/dist/drive/entities/Permission.d.ts.map +1 -0
- package/dist/drive/entities/Permission.js +32 -0
- package/dist/drive/entities/Permission.js.map +1 -0
- package/dist/drive/entities/Reply.d.ts +27 -0
- package/dist/drive/entities/Reply.d.ts.map +1 -0
- package/dist/drive/entities/Reply.js +39 -0
- package/dist/drive/entities/Reply.js.map +1 -0
- package/dist/drive/entities/Revision.d.ts +30 -0
- package/dist/drive/entities/Revision.d.ts.map +1 -0
- package/dist/drive/entities/Revision.js +62 -0
- package/dist/drive/entities/Revision.js.map +1 -0
- package/dist/drive/entities/SharedDrive.d.ts +28 -0
- package/dist/drive/entities/SharedDrive.d.ts.map +1 -0
- package/dist/drive/entities/SharedDrive.js +65 -0
- package/dist/drive/entities/SharedDrive.js.map +1 -0
- package/dist/drive/entities/User.d.ts +16 -0
- package/dist/drive/entities/User.d.ts.map +1 -0
- package/dist/drive/entities/User.js +25 -0
- package/dist/drive/entities/User.js.map +1 -0
- package/dist/drive/index.d.ts +3 -0
- package/dist/drive/index.d.ts.map +1 -0
- package/dist/drive/index.js +23 -0
- package/dist/drive/index.js.map +1 -0
- package/dist/drive/instructions.d.ts +2 -0
- package/dist/drive/instructions.d.ts.map +1 -0
- package/dist/drive/instructions.js +24 -0
- package/dist/drive/instructions.js.map +1 -0
- package/dist/drive/lib/comment.d.ts +15 -0
- package/dist/drive/lib/comment.d.ts.map +1 -0
- package/dist/drive/lib/comment.js +52 -0
- package/dist/drive/lib/comment.js.map +1 -0
- package/dist/drive/lib/content.d.ts +20 -0
- package/dist/drive/lib/content.d.ts.map +1 -0
- package/dist/drive/lib/content.js +41 -0
- package/dist/drive/lib/content.js.map +1 -0
- package/dist/drive/lib/file.d.ts +25 -0
- package/dist/drive/lib/file.d.ts.map +1 -0
- package/dist/drive/lib/file.js +62 -0
- package/dist/drive/lib/file.js.map +1 -0
- package/dist/drive/lib/query.d.ts +30 -0
- package/dist/drive/lib/query.d.ts.map +1 -0
- package/dist/drive/lib/query.js +104 -0
- package/dist/drive/lib/query.js.map +1 -0
- package/dist/drive/lib/revision.d.ts +7 -0
- package/dist/drive/lib/revision.d.ts.map +1 -0
- package/dist/drive/lib/revision.js +23 -0
- package/dist/drive/lib/revision.js.map +1 -0
- package/dist/drive/lib/shared-drive.d.ts +7 -0
- package/dist/drive/lib/shared-drive.d.ts.map +1 -0
- package/dist/drive/lib/shared-drive.js +26 -0
- package/dist/drive/lib/shared-drive.js.map +1 -0
- package/dist/drive/methods/create_comment/handler.d.ts +5 -0
- package/dist/drive/methods/create_comment/handler.d.ts.map +1 -0
- package/dist/drive/methods/create_comment/handler.js +11 -0
- package/dist/drive/methods/create_comment/handler.js.map +1 -0
- package/dist/drive/methods/create_comment/index.d.ts +43 -0
- package/dist/drive/methods/create_comment/index.d.ts.map +1 -0
- package/dist/drive/methods/create_comment/index.js +16 -0
- package/dist/drive/methods/create_comment/index.js.map +1 -0
- package/dist/drive/methods/create_comment/schema.d.ts +47 -0
- package/dist/drive/methods/create_comment/schema.d.ts.map +1 -0
- package/dist/drive/methods/create_comment/schema.js +14 -0
- package/dist/drive/methods/create_comment/schema.js.map +1 -0
- package/dist/drive/methods/create_reply/handler.d.ts +5 -0
- package/dist/drive/methods/create_reply/handler.d.ts.map +1 -0
- package/dist/drive/methods/create_reply/handler.js +15 -0
- package/dist/drive/methods/create_reply/handler.js.map +1 -0
- package/dist/drive/methods/create_reply/index.d.ts +27 -0
- package/dist/drive/methods/create_reply/index.d.ts.map +1 -0
- package/dist/drive/methods/create_reply/index.js +17 -0
- package/dist/drive/methods/create_reply/index.js.map +1 -0
- package/dist/drive/methods/create_reply/schema.d.ts +31 -0
- package/dist/drive/methods/create_reply/schema.d.ts.map +1 -0
- package/dist/drive/methods/create_reply/schema.js +18 -0
- package/dist/drive/methods/create_reply/schema.js.map +1 -0
- package/dist/drive/methods/create_shared_drive/handler.d.ts +5 -0
- package/dist/drive/methods/create_shared_drive/handler.d.ts.map +1 -0
- package/dist/drive/methods/create_shared_drive/handler.js +11 -0
- package/dist/drive/methods/create_shared_drive/handler.js.map +1 -0
- package/dist/drive/methods/create_shared_drive/index.d.ts +20 -0
- package/dist/drive/methods/create_shared_drive/index.d.ts.map +1 -0
- package/dist/drive/methods/create_shared_drive/index.js +16 -0
- package/dist/drive/methods/create_shared_drive/index.js.map +1 -0
- package/dist/drive/methods/create_shared_drive/schema.d.ts +24 -0
- package/dist/drive/methods/create_shared_drive/schema.d.ts.map +1 -0
- package/dist/drive/methods/create_shared_drive/schema.js +15 -0
- package/dist/drive/methods/create_shared_drive/schema.js.map +1 -0
- package/dist/drive/methods/delete_comment/handler.d.ts +5 -0
- package/dist/drive/methods/delete_comment/handler.d.ts.map +1 -0
- package/dist/drive/methods/delete_comment/handler.js +5 -0
- package/dist/drive/methods/delete_comment/handler.js.map +1 -0
- package/dist/drive/methods/delete_comment/index.d.ts +8 -0
- package/dist/drive/methods/delete_comment/index.d.ts.map +1 -0
- package/dist/drive/methods/delete_comment/index.js +16 -0
- package/dist/drive/methods/delete_comment/index.js.map +1 -0
- package/dist/drive/methods/delete_comment/schema.d.ts +13 -0
- package/dist/drive/methods/delete_comment/schema.d.ts.map +1 -0
- package/dist/drive/methods/delete_comment/schema.js +13 -0
- package/dist/drive/methods/delete_comment/schema.js.map +1 -0
- package/dist/drive/methods/delete_file/handler.d.ts +5 -0
- package/dist/drive/methods/delete_file/handler.d.ts.map +1 -0
- package/dist/drive/methods/delete_file/handler.js +5 -0
- package/dist/drive/methods/delete_file/handler.js.map +1 -0
- package/dist/drive/methods/delete_file/index.d.ts +6 -0
- package/dist/drive/methods/delete_file/index.d.ts.map +1 -0
- package/dist/drive/methods/delete_file/index.js +19 -0
- package/dist/drive/methods/delete_file/index.js.map +1 -0
- package/dist/drive/methods/delete_file/schema.d.ts +11 -0
- package/dist/drive/methods/delete_file/schema.d.ts.map +1 -0
- package/dist/drive/methods/delete_file/schema.js +11 -0
- package/dist/drive/methods/delete_file/schema.js.map +1 -0
- package/dist/drive/methods/delete_reply/handler.d.ts +5 -0
- package/dist/drive/methods/delete_reply/handler.d.ts.map +1 -0
- package/dist/drive/methods/delete_reply/handler.js +9 -0
- package/dist/drive/methods/delete_reply/handler.js.map +1 -0
- package/dist/drive/methods/delete_reply/index.d.ts +10 -0
- package/dist/drive/methods/delete_reply/index.d.ts.map +1 -0
- package/dist/drive/methods/delete_reply/index.js +16 -0
- package/dist/drive/methods/delete_reply/index.js.map +1 -0
- package/dist/drive/methods/delete_reply/schema.d.ts +15 -0
- package/dist/drive/methods/delete_reply/schema.d.ts.map +1 -0
- package/dist/drive/methods/delete_reply/schema.js +15 -0
- package/dist/drive/methods/delete_reply/schema.js.map +1 -0
- package/dist/drive/methods/delete_revision/handler.d.ts +5 -0
- package/dist/drive/methods/delete_revision/handler.d.ts.map +1 -0
- package/dist/drive/methods/delete_revision/handler.js +5 -0
- package/dist/drive/methods/delete_revision/handler.js.map +1 -0
- package/dist/drive/methods/delete_revision/index.d.ts +8 -0
- package/dist/drive/methods/delete_revision/index.d.ts.map +1 -0
- package/dist/drive/methods/delete_revision/index.js +18 -0
- package/dist/drive/methods/delete_revision/index.js.map +1 -0
- package/dist/drive/methods/delete_revision/schema.d.ts +13 -0
- package/dist/drive/methods/delete_revision/schema.d.ts.map +1 -0
- package/dist/drive/methods/delete_revision/schema.js +13 -0
- package/dist/drive/methods/delete_revision/schema.js.map +1 -0
- package/dist/drive/methods/delete_shared_drive/handler.d.ts +5 -0
- package/dist/drive/methods/delete_shared_drive/handler.d.ts.map +1 -0
- package/dist/drive/methods/delete_shared_drive/handler.js +10 -0
- package/dist/drive/methods/delete_shared_drive/handler.js.map +1 -0
- package/dist/drive/methods/delete_shared_drive/index.d.ts +8 -0
- package/dist/drive/methods/delete_shared_drive/index.d.ts.map +1 -0
- package/dist/drive/methods/delete_shared_drive/index.js +17 -0
- package/dist/drive/methods/delete_shared_drive/index.js.map +1 -0
- package/dist/drive/methods/delete_shared_drive/schema.d.ts +13 -0
- package/dist/drive/methods/delete_shared_drive/schema.d.ts.map +1 -0
- package/dist/drive/methods/delete_shared_drive/schema.js +22 -0
- package/dist/drive/methods/delete_shared_drive/schema.js.map +1 -0
- package/dist/drive/methods/empty_trash/handler.d.ts +5 -0
- package/dist/drive/methods/empty_trash/handler.d.ts.map +1 -0
- package/dist/drive/methods/empty_trash/handler.js +6 -0
- package/dist/drive/methods/empty_trash/handler.js.map +1 -0
- package/dist/drive/methods/empty_trash/index.d.ts +6 -0
- package/dist/drive/methods/empty_trash/index.d.ts.map +1 -0
- package/dist/drive/methods/empty_trash/index.js +17 -0
- package/dist/drive/methods/empty_trash/index.js.map +1 -0
- package/dist/drive/methods/empty_trash/schema.d.ts +11 -0
- package/dist/drive/methods/empty_trash/schema.d.ts.map +1 -0
- package/dist/drive/methods/empty_trash/schema.js +14 -0
- package/dist/drive/methods/empty_trash/schema.js.map +1 -0
- package/dist/drive/methods/get_about/handler.d.ts +5 -0
- package/dist/drive/methods/get_about/handler.d.ts.map +1 -0
- package/dist/drive/methods/get_about/handler.js +30 -0
- package/dist/drive/methods/get_about/handler.js.map +1 -0
- package/dist/drive/methods/get_about/index.d.ts +17 -0
- package/dist/drive/methods/get_about/index.d.ts.map +1 -0
- package/dist/drive/methods/get_about/index.js +17 -0
- package/dist/drive/methods/get_about/index.js.map +1 -0
- package/dist/drive/methods/get_about/schema.d.ts +21 -0
- package/dist/drive/methods/get_about/schema.d.ts.map +1 -0
- package/dist/drive/methods/get_about/schema.js +7 -0
- package/dist/drive/methods/get_about/schema.js.map +1 -0
- package/dist/drive/methods/get_comment/handler.d.ts +5 -0
- package/dist/drive/methods/get_comment/handler.d.ts.map +1 -0
- package/dist/drive/methods/get_comment/handler.js +12 -0
- package/dist/drive/methods/get_comment/handler.js.map +1 -0
- package/dist/drive/methods/get_comment/index.d.ts +43 -0
- package/dist/drive/methods/get_comment/index.d.ts.map +1 -0
- package/dist/drive/methods/get_comment/index.js +16 -0
- package/dist/drive/methods/get_comment/index.js.map +1 -0
- package/dist/drive/methods/get_comment/schema.d.ts +47 -0
- package/dist/drive/methods/get_comment/schema.d.ts.map +1 -0
- package/dist/drive/methods/get_comment/schema.js +14 -0
- package/dist/drive/methods/get_comment/schema.js.map +1 -0
- package/dist/drive/methods/get_reply/handler.d.ts +5 -0
- package/dist/drive/methods/get_reply/handler.d.ts.map +1 -0
- package/dist/drive/methods/get_reply/handler.js +13 -0
- package/dist/drive/methods/get_reply/handler.js.map +1 -0
- package/dist/drive/methods/get_reply/index.d.ts +24 -0
- package/dist/drive/methods/get_reply/index.d.ts.map +1 -0
- package/dist/drive/methods/get_reply/index.js +16 -0
- package/dist/drive/methods/get_reply/index.js.map +1 -0
- package/dist/drive/methods/get_reply/schema.d.ts +28 -0
- package/dist/drive/methods/get_reply/schema.d.ts.map +1 -0
- package/dist/drive/methods/get_reply/schema.js +15 -0
- package/dist/drive/methods/get_reply/schema.js.map +1 -0
- package/dist/drive/methods/get_revision/handler.d.ts +5 -0
- package/dist/drive/methods/get_revision/handler.d.ts.map +1 -0
- package/dist/drive/methods/get_revision/handler.js +10 -0
- package/dist/drive/methods/get_revision/handler.js.map +1 -0
- package/dist/drive/methods/get_revision/index.d.ts +23 -0
- package/dist/drive/methods/get_revision/index.d.ts.map +1 -0
- package/dist/drive/methods/get_revision/index.js +16 -0
- package/dist/drive/methods/get_revision/index.js.map +1 -0
- package/dist/drive/methods/get_revision/schema.d.ts +27 -0
- package/dist/drive/methods/get_revision/schema.d.ts.map +1 -0
- package/dist/drive/methods/get_revision/schema.js +10 -0
- package/dist/drive/methods/get_revision/schema.js.map +1 -0
- package/dist/drive/methods/get_shared_drive/handler.d.ts +5 -0
- package/dist/drive/methods/get_shared_drive/handler.d.ts.map +1 -0
- package/dist/drive/methods/get_shared_drive/handler.js +11 -0
- package/dist/drive/methods/get_shared_drive/handler.js.map +1 -0
- package/dist/drive/methods/get_shared_drive/index.d.ts +20 -0
- package/dist/drive/methods/get_shared_drive/index.d.ts.map +1 -0
- package/dist/drive/methods/get_shared_drive/index.js +16 -0
- package/dist/drive/methods/get_shared_drive/index.js.map +1 -0
- package/dist/drive/methods/get_shared_drive/schema.d.ts +24 -0
- package/dist/drive/methods/get_shared_drive/schema.d.ts.map +1 -0
- package/dist/drive/methods/get_shared_drive/schema.js +15 -0
- package/dist/drive/methods/get_shared_drive/schema.js.map +1 -0
- package/dist/drive/methods/hide_shared_drive/handler.d.ts +5 -0
- package/dist/drive/methods/hide_shared_drive/handler.d.ts.map +1 -0
- package/dist/drive/methods/hide_shared_drive/handler.js +9 -0
- package/dist/drive/methods/hide_shared_drive/handler.js.map +1 -0
- package/dist/drive/methods/hide_shared_drive/index.d.ts +19 -0
- package/dist/drive/methods/hide_shared_drive/index.d.ts.map +1 -0
- package/dist/drive/methods/hide_shared_drive/index.js +16 -0
- package/dist/drive/methods/hide_shared_drive/index.js.map +1 -0
- package/dist/drive/methods/hide_shared_drive/schema.d.ts +23 -0
- package/dist/drive/methods/hide_shared_drive/schema.d.ts.map +1 -0
- package/dist/drive/methods/hide_shared_drive/schema.js +9 -0
- package/dist/drive/methods/hide_shared_drive/schema.js.map +1 -0
- package/dist/drive/methods/list_comments/handler.d.ts +5 -0
- package/dist/drive/methods/list_comments/handler.d.ts.map +1 -0
- package/dist/drive/methods/list_comments/handler.js +17 -0
- package/dist/drive/methods/list_comments/handler.js.map +1 -0
- package/dist/drive/methods/list_comments/index.d.ts +48 -0
- package/dist/drive/methods/list_comments/index.d.ts.map +1 -0
- package/dist/drive/methods/list_comments/index.js +16 -0
- package/dist/drive/methods/list_comments/index.js.map +1 -0
- package/dist/drive/methods/list_comments/schema.d.ts +52 -0
- package/dist/drive/methods/list_comments/schema.d.ts.map +1 -0
- package/dist/drive/methods/list_comments/schema.js +34 -0
- package/dist/drive/methods/list_comments/schema.js.map +1 -0
- package/dist/drive/methods/list_replies/handler.d.ts +5 -0
- package/dist/drive/methods/list_replies/handler.d.ts.map +1 -0
- package/dist/drive/methods/list_replies/handler.js +17 -0
- package/dist/drive/methods/list_replies/handler.js.map +1 -0
- package/dist/drive/methods/list_replies/index.d.ts +28 -0
- package/dist/drive/methods/list_replies/index.d.ts.map +1 -0
- package/dist/drive/methods/list_replies/index.js +16 -0
- package/dist/drive/methods/list_replies/index.js.map +1 -0
- package/dist/drive/methods/list_replies/schema.d.ts +32 -0
- package/dist/drive/methods/list_replies/schema.d.ts.map +1 -0
- package/dist/drive/methods/list_replies/schema.js +31 -0
- package/dist/drive/methods/list_replies/schema.js.map +1 -0
- package/dist/drive/methods/list_revisions/handler.d.ts +5 -0
- package/dist/drive/methods/list_revisions/handler.d.ts.map +1 -0
- package/dist/drive/methods/list_revisions/handler.js +15 -0
- package/dist/drive/methods/list_revisions/handler.js.map +1 -0
- package/dist/drive/methods/list_revisions/index.d.ts +27 -0
- package/dist/drive/methods/list_revisions/index.d.ts.map +1 -0
- package/dist/drive/methods/list_revisions/index.js +17 -0
- package/dist/drive/methods/list_revisions/index.js.map +1 -0
- package/dist/drive/methods/list_revisions/schema.d.ts +31 -0
- package/dist/drive/methods/list_revisions/schema.d.ts.map +1 -0
- package/dist/drive/methods/list_revisions/schema.js +30 -0
- package/dist/drive/methods/list_revisions/schema.js.map +1 -0
- package/dist/drive/methods/list_shared_drives/handler.d.ts +5 -0
- package/dist/drive/methods/list_shared_drives/handler.d.ts.map +1 -0
- package/dist/drive/methods/list_shared_drives/handler.js +16 -0
- package/dist/drive/methods/list_shared_drives/handler.js.map +1 -0
- package/dist/drive/methods/list_shared_drives/index.d.ts +25 -0
- package/dist/drive/methods/list_shared_drives/index.d.ts.map +1 -0
- package/dist/drive/methods/list_shared_drives/index.js +16 -0
- package/dist/drive/methods/list_shared_drives/index.js.map +1 -0
- package/dist/drive/methods/list_shared_drives/schema.d.ts +29 -0
- package/dist/drive/methods/list_shared_drives/schema.d.ts.map +1 -0
- package/dist/drive/methods/list_shared_drives/schema.js +27 -0
- package/dist/drive/methods/list_shared_drives/schema.js.map +1 -0
- package/dist/drive/methods/registry.d.ts +619 -0
- package/dist/drive/methods/registry.d.ts.map +1 -0
- package/dist/drive/methods/registry.js +69 -0
- package/dist/drive/methods/registry.js.map +1 -0
- package/dist/drive/methods/trash_file/handler.d.ts +5 -0
- package/dist/drive/methods/trash_file/handler.d.ts.map +1 -0
- package/dist/drive/methods/trash_file/handler.js +11 -0
- package/dist/drive/methods/trash_file/handler.js.map +1 -0
- package/dist/drive/methods/trash_file/index.d.ts +25 -0
- package/dist/drive/methods/trash_file/index.d.ts.map +1 -0
- package/dist/drive/methods/trash_file/index.js +18 -0
- package/dist/drive/methods/trash_file/index.js.map +1 -0
- package/dist/drive/methods/trash_file/schema.d.ts +29 -0
- package/dist/drive/methods/trash_file/schema.d.ts.map +1 -0
- package/dist/drive/methods/trash_file/schema.js +9 -0
- package/dist/drive/methods/trash_file/schema.js.map +1 -0
- package/dist/drive/methods/unhide_shared_drive/handler.d.ts +5 -0
- package/dist/drive/methods/unhide_shared_drive/handler.d.ts.map +1 -0
- package/dist/drive/methods/unhide_shared_drive/handler.js +9 -0
- package/dist/drive/methods/unhide_shared_drive/handler.js.map +1 -0
- package/dist/drive/methods/unhide_shared_drive/index.d.ts +19 -0
- package/dist/drive/methods/unhide_shared_drive/index.d.ts.map +1 -0
- package/dist/drive/methods/unhide_shared_drive/index.js +16 -0
- package/dist/drive/methods/unhide_shared_drive/index.js.map +1 -0
- package/dist/drive/methods/unhide_shared_drive/schema.d.ts +23 -0
- package/dist/drive/methods/unhide_shared_drive/schema.d.ts.map +1 -0
- package/dist/drive/methods/unhide_shared_drive/schema.js +9 -0
- package/dist/drive/methods/unhide_shared_drive/schema.js.map +1 -0
- package/dist/drive/methods/untrash_file/handler.d.ts +5 -0
- package/dist/drive/methods/untrash_file/handler.d.ts.map +1 -0
- package/dist/drive/methods/untrash_file/handler.js +11 -0
- package/dist/drive/methods/untrash_file/handler.js.map +1 -0
- package/dist/drive/methods/untrash_file/index.d.ts +25 -0
- package/dist/drive/methods/untrash_file/index.d.ts.map +1 -0
- package/dist/drive/methods/untrash_file/index.js +17 -0
- package/dist/drive/methods/untrash_file/index.js.map +1 -0
- package/dist/drive/methods/untrash_file/schema.d.ts +29 -0
- package/dist/drive/methods/untrash_file/schema.d.ts.map +1 -0
- package/dist/drive/methods/untrash_file/schema.js +9 -0
- package/dist/drive/methods/untrash_file/schema.js.map +1 -0
- package/dist/drive/methods/update_comment/handler.d.ts +5 -0
- package/dist/drive/methods/update_comment/handler.d.ts.map +1 -0
- package/dist/drive/methods/update_comment/handler.js +11 -0
- package/dist/drive/methods/update_comment/handler.js.map +1 -0
- package/dist/drive/methods/update_comment/index.d.ts +43 -0
- package/dist/drive/methods/update_comment/index.d.ts.map +1 -0
- package/dist/drive/methods/update_comment/index.js +16 -0
- package/dist/drive/methods/update_comment/index.js.map +1 -0
- package/dist/drive/methods/update_comment/schema.d.ts +47 -0
- package/dist/drive/methods/update_comment/schema.d.ts.map +1 -0
- package/dist/drive/methods/update_comment/schema.js +11 -0
- package/dist/drive/methods/update_comment/schema.js.map +1 -0
- package/dist/drive/methods/update_file/handler.d.ts +5 -0
- package/dist/drive/methods/update_file/handler.d.ts.map +1 -0
- package/dist/drive/methods/update_file/handler.js +21 -0
- package/dist/drive/methods/update_file/handler.js.map +1 -0
- package/dist/drive/methods/update_file/index.d.ts +33 -0
- package/dist/drive/methods/update_file/index.d.ts.map +1 -0
- package/dist/drive/methods/update_file/index.js +19 -0
- package/dist/drive/methods/update_file/index.js.map +1 -0
- package/dist/drive/methods/update_file/schema.d.ts +37 -0
- package/dist/drive/methods/update_file/schema.d.ts.map +1 -0
- package/dist/drive/methods/update_file/schema.js +35 -0
- package/dist/drive/methods/update_file/schema.js.map +1 -0
- package/dist/drive/methods/update_reply/handler.d.ts +5 -0
- package/dist/drive/methods/update_reply/handler.d.ts.map +1 -0
- package/dist/drive/methods/update_reply/handler.js +12 -0
- package/dist/drive/methods/update_reply/handler.js.map +1 -0
- package/dist/drive/methods/update_reply/index.d.ts +24 -0
- package/dist/drive/methods/update_reply/index.d.ts.map +1 -0
- package/dist/drive/methods/update_reply/index.js +16 -0
- package/dist/drive/methods/update_reply/index.js.map +1 -0
- package/dist/drive/methods/update_reply/schema.d.ts +28 -0
- package/dist/drive/methods/update_reply/schema.d.ts.map +1 -0
- package/dist/drive/methods/update_reply/schema.js +12 -0
- package/dist/drive/methods/update_reply/schema.js.map +1 -0
- package/dist/drive/methods/update_revision/handler.d.ts +5 -0
- package/dist/drive/methods/update_revision/handler.d.ts.map +1 -0
- package/dist/drive/methods/update_revision/handler.js +17 -0
- package/dist/drive/methods/update_revision/handler.js.map +1 -0
- package/dist/drive/methods/update_revision/index.d.ts +27 -0
- package/dist/drive/methods/update_revision/index.d.ts.map +1 -0
- package/dist/drive/methods/update_revision/index.js +17 -0
- package/dist/drive/methods/update_revision/index.js.map +1 -0
- package/dist/drive/methods/update_revision/schema.d.ts +31 -0
- package/dist/drive/methods/update_revision/schema.d.ts.map +1 -0
- package/dist/drive/methods/update_revision/schema.js +29 -0
- package/dist/drive/methods/update_revision/schema.js.map +1 -0
- package/dist/drive/methods/update_shared_drive/handler.d.ts +5 -0
- package/dist/drive/methods/update_shared_drive/handler.d.ts.map +1 -0
- package/dist/drive/methods/update_shared_drive/handler.js +17 -0
- package/dist/drive/methods/update_shared_drive/handler.js.map +1 -0
- package/dist/drive/methods/update_shared_drive/index.d.ts +30 -0
- package/dist/drive/methods/update_shared_drive/index.d.ts.map +1 -0
- package/dist/drive/methods/update_shared_drive/index.js +17 -0
- package/dist/drive/methods/update_shared_drive/index.js.map +1 -0
- package/dist/drive/methods/update_shared_drive/schema.d.ts +34 -0
- package/dist/drive/methods/update_shared_drive/schema.d.ts.map +1 -0
- package/dist/drive/methods/update_shared_drive/schema.js +53 -0
- package/dist/drive/methods/update_shared_drive/schema.js.map +1 -0
- package/dist/drive/operation.d.ts +12 -0
- package/dist/drive/operation.d.ts.map +1 -0
- package/dist/drive/operation.js +10 -0
- package/dist/drive/operation.js.map +1 -0
- package/dist/drive/tools/copy_file/handler.d.ts +5 -0
- package/dist/drive/tools/copy_file/handler.d.ts.map +1 -0
- package/dist/drive/tools/copy_file/handler.js +15 -0
- package/dist/drive/tools/copy_file/handler.js.map +1 -0
- package/dist/drive/tools/copy_file/index.d.ts +27 -0
- package/dist/drive/tools/copy_file/index.d.ts.map +1 -0
- package/dist/drive/tools/copy_file/index.js +18 -0
- package/dist/drive/tools/copy_file/index.js.map +1 -0
- package/dist/drive/tools/copy_file/schema.d.ts +31 -0
- package/dist/drive/tools/copy_file/schema.d.ts.map +1 -0
- package/dist/drive/tools/copy_file/schema.js +18 -0
- package/dist/drive/tools/copy_file/schema.js.map +1 -0
- package/dist/drive/tools/create_file/handler.d.ts +5 -0
- package/dist/drive/tools/create_file/handler.d.ts.map +1 -0
- package/dist/drive/tools/create_file/handler.js +42 -0
- package/dist/drive/tools/create_file/handler.js.map +1 -0
- package/dist/drive/tools/create_file/index.d.ts +30 -0
- package/dist/drive/tools/create_file/index.d.ts.map +1 -0
- package/dist/drive/tools/create_file/index.js +19 -0
- package/dist/drive/tools/create_file/index.js.map +1 -0
- package/dist/drive/tools/create_file/schema.d.ts +34 -0
- package/dist/drive/tools/create_file/schema.d.ts.map +1 -0
- package/dist/drive/tools/create_file/schema.js +29 -0
- package/dist/drive/tools/create_file/schema.js.map +1 -0
- package/dist/drive/tools/download_file_content/handler.d.ts +5 -0
- package/dist/drive/tools/download_file_content/handler.d.ts.map +1 -0
- package/dist/drive/tools/download_file_content/handler.js +33 -0
- package/dist/drive/tools/download_file_content/handler.js.map +1 -0
- package/dist/drive/tools/download_file_content/index.d.ts +10 -0
- package/dist/drive/tools/download_file_content/index.d.ts.map +1 -0
- package/dist/drive/tools/download_file_content/index.js +19 -0
- package/dist/drive/tools/download_file_content/index.js.map +1 -0
- package/dist/drive/tools/download_file_content/schema.d.ts +14 -0
- package/dist/drive/tools/download_file_content/schema.d.ts.map +1 -0
- package/dist/drive/tools/download_file_content/schema.js +18 -0
- package/dist/drive/tools/download_file_content/schema.js.map +1 -0
- package/dist/drive/tools/get_file_metadata/handler.d.ts +5 -0
- package/dist/drive/tools/get_file_metadata/handler.d.ts.map +1 -0
- package/dist/drive/tools/get_file_metadata/handler.js +10 -0
- package/dist/drive/tools/get_file_metadata/handler.js.map +1 -0
- package/dist/drive/tools/get_file_metadata/index.d.ts +26 -0
- package/dist/drive/tools/get_file_metadata/index.d.ts.map +1 -0
- package/dist/drive/tools/get_file_metadata/index.js +17 -0
- package/dist/drive/tools/get_file_metadata/index.js.map +1 -0
- package/dist/drive/tools/get_file_metadata/schema.d.ts +30 -0
- package/dist/drive/tools/get_file_metadata/schema.d.ts.map +1 -0
- package/dist/drive/tools/get_file_metadata/schema.js +15 -0
- package/dist/drive/tools/get_file_metadata/schema.js.map +1 -0
- package/dist/drive/tools/get_file_permissions/handler.d.ts +5 -0
- package/dist/drive/tools/get_file_permissions/handler.d.ts.map +1 -0
- package/dist/drive/tools/get_file_permissions/handler.js +20 -0
- package/dist/drive/tools/get_file_permissions/handler.js.map +1 -0
- package/dist/drive/tools/get_file_permissions/index.d.ts +27 -0
- package/dist/drive/tools/get_file_permissions/index.d.ts.map +1 -0
- package/dist/drive/tools/get_file_permissions/index.js +16 -0
- package/dist/drive/tools/get_file_permissions/index.js.map +1 -0
- package/dist/drive/tools/get_file_permissions/schema.d.ts +31 -0
- package/dist/drive/tools/get_file_permissions/schema.d.ts.map +1 -0
- package/dist/drive/tools/get_file_permissions/schema.js +11 -0
- package/dist/drive/tools/get_file_permissions/schema.js.map +1 -0
- package/dist/drive/tools/list_recent_files/handler.d.ts +5 -0
- package/dist/drive/tools/list_recent_files/handler.d.ts.map +1 -0
- package/dist/drive/tools/list_recent_files/handler.js +23 -0
- package/dist/drive/tools/list_recent_files/handler.js.map +1 -0
- package/dist/drive/tools/list_recent_files/index.d.ts +35 -0
- package/dist/drive/tools/list_recent_files/index.d.ts.map +1 -0
- package/dist/drive/tools/list_recent_files/index.js +16 -0
- package/dist/drive/tools/list_recent_files/index.js.map +1 -0
- package/dist/drive/tools/list_recent_files/schema.d.ts +39 -0
- package/dist/drive/tools/list_recent_files/schema.d.ts.map +1 -0
- package/dist/drive/tools/list_recent_files/schema.js +29 -0
- package/dist/drive/tools/list_recent_files/schema.js.map +1 -0
- package/dist/drive/tools/read_file_content/handler.d.ts +5 -0
- package/dist/drive/tools/read_file_content/handler.d.ts.map +1 -0
- package/dist/drive/tools/read_file_content/handler.js +24 -0
- package/dist/drive/tools/read_file_content/handler.js.map +1 -0
- package/dist/drive/tools/read_file_content/index.d.ts +6 -0
- package/dist/drive/tools/read_file_content/index.d.ts.map +1 -0
- package/dist/drive/tools/read_file_content/index.js +19 -0
- package/dist/drive/tools/read_file_content/index.js.map +1 -0
- package/dist/drive/tools/read_file_content/schema.d.ts +10 -0
- package/dist/drive/tools/read_file_content/schema.d.ts.map +1 -0
- package/dist/drive/tools/read_file_content/schema.js +10 -0
- package/dist/drive/tools/read_file_content/schema.js.map +1 -0
- package/dist/drive/tools/registry.d.ts +193 -0
- package/dist/drive/tools/registry.d.ts.map +1 -0
- package/dist/drive/tools/registry.js +24 -0
- package/dist/drive/tools/registry.js.map +1 -0
- package/dist/drive/tools/search_files/handler.d.ts +5 -0
- package/dist/drive/tools/search_files/handler.d.ts.map +1 -0
- package/dist/drive/tools/search_files/handler.js +18 -0
- package/dist/drive/tools/search_files/handler.js.map +1 -0
- package/dist/drive/tools/search_files/index.d.ts +31 -0
- package/dist/drive/tools/search_files/index.d.ts.map +1 -0
- package/dist/drive/tools/search_files/index.js +17 -0
- package/dist/drive/tools/search_files/index.js.map +1 -0
- package/dist/drive/tools/search_files/schema.d.ts +35 -0
- package/dist/drive/tools/search_files/schema.d.ts.map +1 -0
- package/dist/drive/tools/search_files/schema.js +27 -0
- package/dist/drive/tools/search_files/schema.js.map +1 -0
- package/dist/{sheets/lib → lib}/enums.d.ts +1 -1
- package/dist/lib/enums.d.ts.map +1 -0
- package/dist/{sheets/lib → lib}/enums.js +1 -1
- package/dist/lib/enums.js.map +1 -0
- package/dist/sheets/lib/filters.d.ts.map +1 -1
- package/dist/sheets/lib/filters.js +1 -1
- package/dist/sheets/lib/filters.js.map +1 -1
- package/dist/sheets/lib/metadata.d.ts.map +1 -1
- package/dist/sheets/lib/metadata.js +1 -1
- package/dist/sheets/lib/metadata.js.map +1 -1
- package/dist/sheets/lib/spreadsheet.d.ts.map +1 -1
- package/dist/sheets/lib/spreadsheet.js +1 -1
- package/dist/sheets/lib/spreadsheet.js.map +1 -1
- package/dist/sheets/lib/values.d.ts.map +1 -1
- package/dist/sheets/lib/values.js +1 -1
- package/dist/sheets/lib/values.js.map +1 -1
- package/package.json +9 -3
- package/dist/sheets/lib/enums.d.ts.map +0 -1
- package/dist/sheets/lib/enums.js.map +0 -1
package/README.md
CHANGED
|
@@ -26,16 +26,16 @@
|
|
|
26
26
|
|
|
27
27
|
<img src=".github/assets/docs.svg" height="44" alt="Docs" title="Docs" />
|
|
28
28
|
|
|
29
|
-
<img src=".github/assets/drive.svg" height="44" alt="Drive
|
|
29
|
+
<img src=".github/assets/drive.svg" height="44" alt="Drive" title="Drive" />
|
|
30
30
|
</p>
|
|
31
31
|
|
|
32
32
|
<p align="center">
|
|
33
|
-
<sub><strong>Gmail</strong> (<a href="./src/gmail/CAPABILITIES.md">33 operations</a>), <strong>Calendar</strong> (<a href="./src/calendar/CAPABILITIES.md">25 operations</a>), <strong>Sheets</strong> (<a href="./src/sheets/CAPABILITIES.md">15 operations</a>),
|
|
33
|
+
<sub><strong>Gmail</strong> (<a href="./src/gmail/CAPABILITIES.md">33 operations</a>), <strong>Calendar</strong> (<a href="./src/calendar/CAPABILITIES.md">25 operations</a>), <strong>Sheets</strong> (<a href="./src/sheets/CAPABILITIES.md">15 operations</a>), <strong>Docs</strong> (<a href="./src/docs/CAPABILITIES.md">9 operations</a>), and <strong>Drive</strong> (<a href="./src/drive/CAPABILITIES.md">35 operations</a>) ship today.</sub>
|
|
34
34
|
</p>
|
|
35
35
|
|
|
36
36
|
## What it does
|
|
37
37
|
|
|
38
|
-
Point an AI agent at your Google accounts and let it do the work: triage and send mail, run your calendars, read and write your spreadsheets,
|
|
38
|
+
Point an AI agent at your Google accounts and let it do the work: triage and send mail, run your calendars, read and write your spreadsheets, draft and edit documents, and manage your files and shared drives. The end goal is an agent that operates your accounts and hands you results.
|
|
39
39
|
|
|
40
40
|
The design has two internal concepts and nothing else:
|
|
41
41
|
|
|
@@ -44,7 +44,7 @@ The design has two internal concepts and nothing else:
|
|
|
44
44
|
|
|
45
45
|
That is the whole surface. Read one operation folder and you understand all of them.
|
|
46
46
|
|
|
47
|
-
- **REST plus MCP in one surface.** Each server exposes the curated MCP toolset *and* the broader REST method set of its Google API, so an agent gets far more than a thin slice. Gmail ships with [33 operations](./src/gmail/CAPABILITIES.md) (10 curated MCP tools plus 23 REST methods), Calendar with [25](./src/calendar/CAPABILITIES.md) (8 plus 17), Sheets with [15](./src/sheets/CAPABILITIES.md), and Docs with [9](./src/docs/CAPABILITIES.md) (Google publishes no MCP toolset for Sheets or Docs, so those are REST-sourced throughout); the split is explained in [MCP, and then some](#mcp-and-then-some).
|
|
47
|
+
- **REST plus MCP in one surface.** Each server exposes the curated MCP toolset *and* the broader REST method set of its Google API, so an agent gets far more than a thin slice. Gmail ships with [33 operations](./src/gmail/CAPABILITIES.md) (10 curated MCP tools plus 23 REST methods), Calendar with [25](./src/calendar/CAPABILITIES.md) (8 plus 17), Drive with [35](./src/drive/CAPABILITIES.md) (8 plus 27), Sheets with [15](./src/sheets/CAPABILITIES.md), and Docs with [9](./src/docs/CAPABILITIES.md) (Google publishes no MCP toolset for Sheets or Docs, so those are REST-sourced throughout); the split is explained in [MCP, and then some](#mcp-and-then-some).
|
|
48
48
|
- **The folder tree mirrors Google's docs.** A Google tools-list reference page becomes a `tools/` folder; a Google REST method reference page becomes a `methods/` folder. If you can find the operation in Google's docs, you can find it in this repo.
|
|
49
49
|
|
|
50
50
|
| Google's reference page | This repo's folder |
|
|
@@ -56,7 +56,7 @@ That is the whole surface. Read one operation folder and you understand all of t
|
|
|
56
56
|
- **Siloed by design.** Each service runs as its own independent server in its own lane; the orchestrating agent is the single thing that coordinates them.
|
|
57
57
|
- **Strict by construction.** Input and output schemas are validated on every call, vocabulary is sourced from Google's own docs, types are strict (NodeNext ESM, `verbatimModuleSyntax`, `noUncheckedIndexedAccess`), and coverage is pinned at 100% in `bunfig.toml`.
|
|
58
58
|
|
|
59
|
-
One package, one version: everything compiles into `google-mcp-suite`, which ships a bin per service (`google-mcp-gmail`, `google-mcp-calendar`, `google-mcp-sheets`, and `google-mcp-
|
|
59
|
+
One package, one version: everything compiles into `google-mcp-suite`, which ships a bin per service (`google-mcp-gmail`, `google-mcp-calendar`, `google-mcp-sheets`, `google-mcp-docs`, and `google-mcp-drive` today) plus the `google-mcp-doctor` setup CLI.
|
|
60
60
|
|
|
61
61
|
## MCP, and then some
|
|
62
62
|
|
|
@@ -107,6 +107,10 @@ Then point your MCP client at the servers, one instance per service per account:
|
|
|
107
107
|
"docs-work": {
|
|
108
108
|
"command": "google-mcp-docs",
|
|
109
109
|
"env": { "GOOGLE_MCP_ACCOUNT": "work@example.com" }
|
|
110
|
+
},
|
|
111
|
+
"drive-work": {
|
|
112
|
+
"command": "google-mcp-drive",
|
|
113
|
+
"env": { "GOOGLE_MCP_ACCOUNT": "work@example.com" }
|
|
110
114
|
}
|
|
111
115
|
}
|
|
112
116
|
}
|
|
@@ -127,6 +131,7 @@ src/
|
|
|
127
131
|
calendar/ # the Calendar server; same shape
|
|
128
132
|
sheets/ # the Sheets server; same shape, methods-only (no Google MCP toolset)
|
|
129
133
|
docs/ # the Docs server; same shape, methods-only
|
|
134
|
+
drive/ # the Drive server; same shape (MCP toolset + REST methods)
|
|
130
135
|
```
|
|
131
136
|
|
|
132
137
|
One package, one version. `auth`, `lib`, `doctor`, and each service are folders in one `src/` and compile to a single published package.
|
|
@@ -174,9 +179,9 @@ See [CONTRIBUTING.md](./CONTRIBUTING.md) for the full task list, [AGENTS.md](./A
|
|
|
174
179
|
| **Calendar** | ✅ Implemented | [25 operations](./src/calendar/CAPABILITIES.md): events, calendars, free/busy, and meeting-time suggestions |
|
|
175
180
|
| **Sheets** | ✅ Implemented | [15 operations](./src/sheets/CAPABILITIES.md): spreadsheets, values, batch and data-filter reads/writes, developer metadata |
|
|
176
181
|
| **Docs** | ✅ Implemented | [9 operations](./src/docs/CAPABILITIES.md): document reads and creation, curated text editing and styling |
|
|
177
|
-
| Drive |
|
|
182
|
+
| **Drive** | ✅ Implemented | [35 operations](./src/drive/CAPABILITIES.md): files, search, content, comments, revisions, shared drives |
|
|
178
183
|
|
|
179
|
-
Gmail is the reference (canary) implementation; Calendar is its first replication; Sheets and Docs are methods-only (Google publishes no MCP toolset for them); each new service mirrors the same shape.
|
|
184
|
+
Gmail is the reference (canary) implementation; Calendar is its first replication; Sheets and Docs are methods-only (Google publishes no MCP toolset for them); Drive carries both wings; each new service mirrors the same shape.
|
|
180
185
|
|
|
181
186
|
---
|
|
182
187
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"services.d.ts","sourceRoot":"","sources":["../../src/doctor/services.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"services.d.ts","sourceRoot":"","sources":["../../src/doctor/services.ts"],"names":[],"mappings":"AAoBA,iFAAiF;AACjF,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;AAEhE,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,gFAAgF;IAChF,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,WAAW,EAAE,OAAO,CAAC;IACrB,KAAK,CAAC,EAAE,YAAY,CAAC;CACtB,CAAC;AA8DF,eAAO,MAAM,QAAQ,EAAE,WAAW,EA8CjC,CAAC;AAEF,iEAAiE;AACjE,wBAAgB,cAAc,IAAI,MAAM,EAAE,CAEzC;AAED,wEAAwE;AACxE,wBAAgB,YAAY,IAAI,MAAM,EAAE,CAEvC;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAChC,SAAS,EAAE,MAAM,EAAE,EACnB,QAAQ,GAAE,MAAM,EAAqB,GACpC;IAAE,OAAO,EAAE,MAAM,EAAE,CAAC;IAAC,KAAK,EAAE,MAAM,EAAE,CAAA;CAAE,CAOxC"}
|
package/dist/doctor/services.js
CHANGED
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
*/
|
|
14
14
|
import { calendar } from '@googleapis/calendar';
|
|
15
15
|
import { docs } from '@googleapis/docs';
|
|
16
|
+
import { drive } from '@googleapis/drive';
|
|
16
17
|
import { gmail } from '@googleapis/gmail';
|
|
17
18
|
import { sheets } from '@googleapis/sheets';
|
|
18
19
|
import { authorizedClient } from '../auth/oauth.js';
|
|
@@ -52,6 +53,11 @@ async function docsProbe(account) {
|
|
|
52
53
|
throw error;
|
|
53
54
|
}
|
|
54
55
|
}
|
|
56
|
+
async function driveProbe(account) {
|
|
57
|
+
const client = drive({ version: 'v3', auth: await authorizedClient(account) });
|
|
58
|
+
const res = await client.about.get({ fields: 'user(emailAddress)' });
|
|
59
|
+
return res.data.user?.emailAddress ?? '(reachable)';
|
|
60
|
+
}
|
|
55
61
|
// The Sheets API has no id-free read (listing spreadsheets is Drive's job), so
|
|
56
62
|
// the probe reads Google's long-stable public sample spreadsheet (titled
|
|
57
63
|
// "Example Spreadsheet", used throughout the Sheets API docs). If Google ever
|
|
@@ -71,7 +77,13 @@ export const SERVICES = [
|
|
|
71
77
|
implemented: true,
|
|
72
78
|
probe: gmailProbe,
|
|
73
79
|
},
|
|
74
|
-
{
|
|
80
|
+
{
|
|
81
|
+
name: 'drive',
|
|
82
|
+
api: 'drive.googleapis.com',
|
|
83
|
+
scopes: [`${S}drive`],
|
|
84
|
+
implemented: true,
|
|
85
|
+
probe: driveProbe,
|
|
86
|
+
},
|
|
75
87
|
{
|
|
76
88
|
name: 'sheets',
|
|
77
89
|
api: 'sheets.googleapis.com',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"services.js","sourceRoot":"","sources":["../../src/doctor/services.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAcpD,gFAAgF;AAChF,iFAAiF;AAEjF,KAAK,UAAU,UAAU,CAAC,OAAe;IACvC,MAAM,MAAM,GAAG,KAAK,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,E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AC,GAAG,CAAC,CAAC,CAAC,CAAC;KAC9C,CAAC;AACJ,CAAC","sourcesContent":["/**\n * The doctor's knowledge of the Google services this suite targets.\n *\n * Dependency direction is one-way: doctor knows services; services never import\n * doctor. To stay decoupled from each service's churning internals, a probe is\n * expressed against stable public surfaces only (`@googleapis/*` plus the shared\n * `authorizedClient`), not `src/<service>` code. Adding a service here is how the\n * doctor learns to check it.\n *\n * Scopes are attributed per service for reporting, but the canonical scope list\n * is `SCOPES` in `src/auth/config.ts` (services do not declare scopes locally).\n * `assertScopeRegistryMatches` guards the two against silent drift.\n */\nimport { calendar } from '@googleapis/calendar';\nimport { docs } from '@googleapis/docs';\nimport { gmail } from '@googleapis/gmail';\nimport { sheets } from '@googleapis/sheets';\nimport { authorizedClient } from '../auth/oauth.js';\n\n/** A cheap, read-only call that proves a service's token + API actually work. */\nexport type ServiceProbe = (account: string) => Promise<string>;\n\nexport type ServiceInfo = {\n name: string;\n /** Google Cloud API identifier to enable (as `gcloud services enable` uses). */\n api: string;\n scopes: string[];\n implemented: boolean;\n probe?: ServiceProbe;\n};\n\n// Probe API versions duplicate each service's index.ts on purpose (doctor never\n// imports service internals); when a service moves versions, move its probe too.\n\nasync function gmailProbe(account: string): Promise<string> {\n const client = gmail({ version: 'v1', auth: await authorizedClient(account) });\n const res = await client.users.getProfile({ userId: 'me' });\n return res.data.emailAddress ?? '(reachable)';\n}\n\nasync function calendarProbe(account: string): Promise<string> {\n const client = calendar({ version: 'v3', auth: await authorizedClient(account) });\n const res = await client.calendars.get({ calendarId: 'primary' });\n return res.data.summary ?? res.data.timeZone ?? '(reachable)';\n}\n\n// Docs has neither an id-free read (listing is Drive's) nor a stable public\n// sample document (Sheets' probe trick below does not transfer), so the probe\n// reads a sentinel id: a clean 404 proves the token authenticated and the API\n// is enabled (an auth failure is 401, a disabled API 403); anything else throws.\nconst DOCS_PROBE_SENTINEL = 'google-mcp-doctor-probe-sentinel';\n\nfunction isNotFound(error: unknown): boolean {\n if (typeof error !== 'object' || error === null) return false;\n const status =\n (error as { status?: unknown }).status ??\n (error as { response?: { status?: unknown } }).response?.status;\n return status === 404;\n}\n\nasync function docsProbe(account: string): Promise<string> {\n const client = docs({ version: 'v1', auth: await authorizedClient(account) });\n try {\n await client.documents.get({ documentId: DOCS_PROBE_SENTINEL });\n return '(reachable)';\n } catch (error) {\n if (isNotFound(error)) return '(reachable)';\n throw error;\n }\n}\n\n// The Sheets API has no id-free read (listing spreadsheets is Drive's job), so\n// the probe reads Google's long-stable public sample spreadsheet (titled\n// \"Example Spreadsheet\", used throughout the Sheets API docs). If Google ever\n// unpublishes it, the probe fails loudly and this id gets replaced.\nconst SAMPLE_SPREADSHEET_ID = '1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms';\n\nasync function sheetsProbe(account: string): Promise<string> {\n const client = sheets({ version: 'v4', auth: await authorizedClient(account) });\n const res = await client.spreadsheets.get({ spreadsheetId: SAMPLE_SPREADSHEET_ID });\n return res.data.properties?.title ?? '(reachable)';\n}\n\nconst S = 'https://www.googleapis.com/auth/';\n\nexport const SERVICES: ServiceInfo[] = [\n {\n name: 'gmail',\n api: 'gmail.googleapis.com',\n scopes: ['https://mail.google.com/', `${S}gmail.settings.basic`],\n implemented: true,\n probe: gmailProbe,\n },\n { name: 'drive', api: 'drive.googleapis.com', scopes: [`${S}drive`], implemented: false },\n {\n name: 'sheets',\n api: 'sheets.googleapis.com',\n scopes: [`${S}spreadsheets`],\n implemented: true,\n probe: sheetsProbe,\n },\n {\n name: 'docs',\n api: 'docs.googleapis.com',\n scopes: [`${S}documents`],\n implemented: true,\n probe: docsProbe,\n },\n {\n name: 'calendar',\n api: 'calendar-json.googleapis.com',\n scopes: [`${S}calendar`],\n implemented: true,\n probe: calendarProbe,\n },\n {\n name: 'meet',\n api: 'meet.googleapis.com',\n scopes: [\n `${S}meetings.space.created`,\n `${S}meetings.space.readonly`,\n `${S}meetings.space.settings`,\n ],\n implemented: false,\n },\n];\n\n/** Every scope the suite expects, attributed across services. */\nexport function requiredScopes(): string[] {\n return SERVICES.flatMap((s) => s.scopes);\n}\n\n/** APIs to enable in Google Cloud, in `gcloud services enable` form. */\nexport function requiredApis(): string[] {\n return SERVICES.map((s) => s.api);\n}\n\n/**\n * Guard the per-service scope attribution against the canonical `SCOPES` union.\n * Returns the symmetric difference; empty means the two agree.\n */\nexport function scopeRegistryDrift(\n canonical: string[],\n declared: string[] = requiredScopes(),\n): { missing: string[]; extra: string[] } {\n const have = new Set(declared);\n const truth = new Set(canonical);\n return {\n missing: [...truth].filter((s) => !have.has(s)),\n extra: [...have].filter((s) => !truth.has(s)),\n };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"services.js","sourceRoot":"","sources":["../../src/doctor/services.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAcpD,gFAAgF;AAChF,iFAAiF;AAEjF,KAAK,UAAU,UAAU,CAAC,OAAe;IACvC,MAAM,MAAM,GAAG,KAAK,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;IAC/E,MAAM,GAAG,GAAG,MAAM,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;IAC5D,OAAO,GAAG,CAAC,IAAI,CAAC,YAAY,IAAI,aAAa,CAAC;AAChD,CAAC;AAED,KAAK,UAAU,aAAa,CAAC,OAAe;IA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QAC/C,KAAK,EAAE,CAAC,GAAG,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;KAC9C,CAAC;AACJ,CAAC","sourcesContent":["/**\n * The doctor's knowledge of the Google services this suite targets.\n *\n * Dependency direction is one-way: doctor knows services; services never import\n * doctor. To stay decoupled from each service's churning internals, a probe is\n * expressed against stable public surfaces only (`@googleapis/*` plus the shared\n * `authorizedClient`), not `src/<service>` code. Adding a service here is how the\n * doctor learns to check it.\n *\n * Scopes are attributed per service for reporting, but the canonical scope list\n * is `SCOPES` in `src/auth/config.ts` (services do not declare scopes locally).\n * `assertScopeRegistryMatches` guards the two against silent drift.\n */\nimport { calendar } from '@googleapis/calendar';\nimport { docs } from '@googleapis/docs';\nimport { drive } from '@googleapis/drive';\nimport { gmail } from '@googleapis/gmail';\nimport { sheets } from '@googleapis/sheets';\nimport { authorizedClient } from '../auth/oauth.js';\n\n/** A cheap, read-only call that proves a service's token + API actually work. */\nexport type ServiceProbe = (account: string) => Promise<string>;\n\nexport type ServiceInfo = {\n name: string;\n /** Google Cloud API identifier to enable (as `gcloud services enable` uses). */\n api: string;\n scopes: string[];\n implemented: boolean;\n probe?: ServiceProbe;\n};\n\n// Probe API versions duplicate each service's index.ts on purpose (doctor never\n// imports service internals); when a service moves versions, move its probe too.\n\nasync function gmailProbe(account: string): Promise<string> {\n const client = gmail({ version: 'v1', auth: await authorizedClient(account) });\n const res = await client.users.getProfile({ userId: 'me' });\n return res.data.emailAddress ?? '(reachable)';\n}\n\nasync function calendarProbe(account: string): Promise<string> {\n const client = calendar({ version: 'v3', auth: await authorizedClient(account) });\n const res = await client.calendars.get({ calendarId: 'primary' });\n return res.data.summary ?? res.data.timeZone ?? '(reachable)';\n}\n\n// Docs has neither an id-free read (listing is Drive's) nor a stable public\n// sample document (Sheets' probe trick below does not transfer), so the probe\n// reads a sentinel id: a clean 404 proves the token authenticated and the API\n// is enabled (an auth failure is 401, a disabled API 403); anything else throws.\nconst DOCS_PROBE_SENTINEL = 'google-mcp-doctor-probe-sentinel';\n\nfunction isNotFound(error: unknown): boolean {\n if (typeof error !== 'object' || error === null) return false;\n const status =\n (error as { status?: unknown }).status ??\n (error as { response?: { status?: unknown } }).response?.status;\n return status === 404;\n}\n\nasync function docsProbe(account: string): Promise<string> {\n const client = docs({ version: 'v1', auth: await authorizedClient(account) });\n try {\n await client.documents.get({ documentId: DOCS_PROBE_SENTINEL });\n return '(reachable)';\n } catch (error) {\n if (isNotFound(error)) return '(reachable)';\n throw error;\n }\n}\n\nasync function driveProbe(account: string): Promise<string> {\n const client = drive({ version: 'v3', auth: await authorizedClient(account) });\n const res = await client.about.get({ fields: 'user(emailAddress)' });\n return res.data.user?.emailAddress ?? '(reachable)';\n}\n\n// The Sheets API has no id-free read (listing spreadsheets is Drive's job), so\n// the probe reads Google's long-stable public sample spreadsheet (titled\n// \"Example Spreadsheet\", used throughout the Sheets API docs). If Google ever\n// unpublishes it, the probe fails loudly and this id gets replaced.\nconst SAMPLE_SPREADSHEET_ID = '1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms';\n\nasync function sheetsProbe(account: string): Promise<string> {\n const client = sheets({ version: 'v4', auth: await authorizedClient(account) });\n const res = await client.spreadsheets.get({ spreadsheetId: SAMPLE_SPREADSHEET_ID });\n return res.data.properties?.title ?? '(reachable)';\n}\n\nconst S = 'https://www.googleapis.com/auth/';\n\nexport const SERVICES: ServiceInfo[] = [\n {\n name: 'gmail',\n api: 'gmail.googleapis.com',\n scopes: ['https://mail.google.com/', `${S}gmail.settings.basic`],\n implemented: true,\n probe: gmailProbe,\n },\n {\n name: 'drive',\n api: 'drive.googleapis.com',\n scopes: [`${S}drive`],\n implemented: true,\n probe: driveProbe,\n },\n {\n name: 'sheets',\n api: 'sheets.googleapis.com',\n scopes: [`${S}spreadsheets`],\n implemented: true,\n probe: sheetsProbe,\n },\n {\n name: 'docs',\n api: 'docs.googleapis.com',\n scopes: [`${S}documents`],\n implemented: true,\n probe: docsProbe,\n },\n {\n name: 'calendar',\n api: 'calendar-json.googleapis.com',\n scopes: [`${S}calendar`],\n implemented: true,\n probe: calendarProbe,\n },\n {\n name: 'meet',\n api: 'meet.googleapis.com',\n scopes: [\n `${S}meetings.space.created`,\n `${S}meetings.space.readonly`,\n `${S}meetings.space.settings`,\n ],\n implemented: false,\n },\n];\n\n/** Every scope the suite expects, attributed across services. */\nexport function requiredScopes(): string[] {\n return SERVICES.flatMap((s) => s.scopes);\n}\n\n/** APIs to enable in Google Cloud, in `gcloud services enable` form. */\nexport function requiredApis(): string[] {\n return SERVICES.map((s) => s.api);\n}\n\n/**\n * Guard the per-service scope attribution against the canonical `SCOPES` union.\n * Returns the symmetric difference; empty means the two agree.\n */\nexport function scopeRegistryDrift(\n canonical: string[],\n declared: string[] = requiredScopes(),\n): { missing: string[]; extra: string[] } {\n const have = new Set(declared);\n const truth = new Set(canonical);\n return {\n missing: [...truth].filter((s) => !have.has(s)),\n extra: [...have].filter((s) => !truth.has(s)),\n };\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"capabilities.d.ts","sourceRoot":"","sources":["../../src/drive/capabilities.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Regenerate CAPABILITIES.md from the live tool/method registries: `bun run
|
|
3
|
+
// capabilities`. The doc is derived from the same registries the server lists
|
|
4
|
+
// and dispatches, so it cannot drift from the code. Agents that speak MCP should
|
|
5
|
+
// discover the live, fully-schema'd surface via the server's `tools/list`.
|
|
6
|
+
import { writeFileSync } from 'node:fs';
|
|
7
|
+
import { fileURLToPath } from 'node:url';
|
|
8
|
+
import { mergeOperations } from '../lib/operation.js';
|
|
9
|
+
import { renderCapabilities } from '../lib/server.js';
|
|
10
|
+
import { methods } from './methods/registry.js';
|
|
11
|
+
import { tools } from './tools/registry.js';
|
|
12
|
+
if (import.meta.main) {
|
|
13
|
+
const operations = mergeOperations(tools, methods);
|
|
14
|
+
const out = fileURLToPath(new URL('./CAPABILITIES.md', import.meta.url));
|
|
15
|
+
writeFileSync(out, renderCapabilities('Drive capabilities', [
|
|
16
|
+
{ kind: 'MCP Tool', operations: tools },
|
|
17
|
+
{ kind: 'REST Method', operations: methods },
|
|
18
|
+
]));
|
|
19
|
+
console.error(`Wrote CAPABILITIES.md (${Object.keys(operations).length} operations)`);
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=capabilities.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"capabilities.js","sourceRoot":"","sources":["../../src/drive/capabilities.ts"],"names":[],"mappings":";AACA,4EAA4E;AAC5E,8EAA8E;AAC9E,iFAAiF;AACjF,2EAA2E;AAC3E,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAE5C,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;IACrB,MAAM,UAAU,GAAG,eAAe,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IACnD,MAAM,GAAG,GAAG,aAAa,CAAC,IAAI,GAAG,CAAC,mBAAmB,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;IACzE,aAAa,CACX,GAAG,EACH,kBAAkB,CAAC,oBAAoB,EAAE;QACvC,EAAE,IAAI,EAAE,UAAU,EAAE,UAAU,EAAE,KAAK,EAAE;QACvC,EAAE,IAAI,EAAE,aAAa,EAAE,UAAU,EAAE,OAAO,EAAE;KAC7C,CAAC,CACH,CAAC;IACF,OAAO,CAAC,KAAK,CAAC,0BAA0B,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,MAAM,cAAc,CAAC,CAAC;AACxF,CAAC","sourcesContent":["#!/usr/bin/env node\n// Regenerate CAPABILITIES.md from the live tool/method registries: `bun run\n// capabilities`. The doc is derived from the same registries the server lists\n// and dispatches, so it cannot drift from the code. Agents that speak MCP should\n// discover the live, fully-schema'd surface via the server's `tools/list`.\nimport { writeFileSync } from 'node:fs';\nimport { fileURLToPath } from 'node:url';\nimport { mergeOperations } from '../lib/operation.js';\nimport { renderCapabilities } from '../lib/server.js';\nimport { methods } from './methods/registry.js';\nimport { tools } from './tools/registry.js';\n\nif (import.meta.main) {\n const operations = mergeOperations(tools, methods);\n const out = fileURLToPath(new URL('./CAPABILITIES.md', import.meta.url));\n writeFileSync(\n out,\n renderCapabilities('Drive capabilities', [\n { kind: 'MCP Tool', operations: tools },\n { kind: 'REST Method', operations: methods },\n ]),\n );\n console.error(`Wrote CAPABILITIES.md (${Object.keys(operations).length} operations)`);\n}\n"]}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Information about the user, the user's Drive, and system capabilities,
|
|
4
|
+
* served by `about.get`. For users in an organization with pooled storage,
|
|
5
|
+
* the quota describes the organization rather than the individual.
|
|
6
|
+
*
|
|
7
|
+
* @see https://developers.google.com/workspace/drive/api/guides/user-info
|
|
8
|
+
*/
|
|
9
|
+
export declare const About: z.ZodObject<{
|
|
10
|
+
user: z.ZodOptional<z.ZodObject<{
|
|
11
|
+
displayName: z.ZodOptional<z.ZodString>;
|
|
12
|
+
emailAddress: z.ZodOptional<z.ZodString>;
|
|
13
|
+
me: z.ZodOptional<z.ZodBoolean>;
|
|
14
|
+
photoLink: z.ZodOptional<z.ZodString>;
|
|
15
|
+
}, z.core.$strip>>;
|
|
16
|
+
storageQuota: z.ZodOptional<z.ZodObject<{
|
|
17
|
+
limit: z.ZodOptional<z.ZodString>;
|
|
18
|
+
usage: z.ZodOptional<z.ZodString>;
|
|
19
|
+
usageInDrive: z.ZodOptional<z.ZodString>;
|
|
20
|
+
usageInDriveTrash: z.ZodOptional<z.ZodString>;
|
|
21
|
+
}, z.core.$strip>>;
|
|
22
|
+
maxUploadSize: z.ZodOptional<z.ZodString>;
|
|
23
|
+
canCreateDrives: z.ZodOptional<z.ZodBoolean>;
|
|
24
|
+
}, z.core.$strip>;
|
|
25
|
+
export type About = z.infer<typeof About>;
|
|
26
|
+
//# sourceMappingURL=About.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"About.d.ts","sourceRoot":"","sources":["../../../src/drive/entities/About.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB;;;;;;GAMG;AACH,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;iBAsBhB,CAAC;AAEH,MAAM,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,KAAK,CAAC,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { User } from './User.js';
|
|
3
|
+
/**
|
|
4
|
+
* Information about the user, the user's Drive, and system capabilities,
|
|
5
|
+
* served by `about.get`. For users in an organization with pooled storage,
|
|
6
|
+
* the quota describes the organization rather than the individual.
|
|
7
|
+
*
|
|
8
|
+
* @see https://developers.google.com/workspace/drive/api/guides/user-info
|
|
9
|
+
*/
|
|
10
|
+
export const About = z.object({
|
|
11
|
+
user: User.optional().describe('The authenticated user.'),
|
|
12
|
+
storageQuota: z
|
|
13
|
+
.object({
|
|
14
|
+
limit: z
|
|
15
|
+
.string()
|
|
16
|
+
.optional()
|
|
17
|
+
.describe('The usage limit, if applicable. This will not be present if the user has ' +
|
|
18
|
+
'unlimited storage.'),
|
|
19
|
+
usage: z.string().optional().describe('The total usage across all services.'),
|
|
20
|
+
usageInDrive: z.string().optional().describe('The usage by all files in Google Drive.'),
|
|
21
|
+
usageInDriveTrash: z
|
|
22
|
+
.string()
|
|
23
|
+
.optional()
|
|
24
|
+
.describe('The usage by trashed files in Google Drive.'),
|
|
25
|
+
})
|
|
26
|
+
.optional()
|
|
27
|
+
.describe("The user's storage quota limits and usage. All fields are measured in bytes."),
|
|
28
|
+
maxUploadSize: z.string().optional().describe('The maximum upload size in bytes.'),
|
|
29
|
+
canCreateDrives: z.boolean().optional().describe('Whether the user can create shared drives.'),
|
|
30
|
+
});
|
|
31
|
+
//# sourceMappingURL=About.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"About.js","sourceRoot":"","sources":["../../../src/drive/entities/About.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5B,IAAI,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,yBAAyB,CAAC;IACzD,YAAY,EAAE,CAAC;SACZ,MAAM,CAAC;QACN,KAAK,EAAE,CAAC;aACL,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CACP,2EAA2E;YACzE,oBAAoB,CACvB;QACH,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,sCAAsC,CAAC;QAC7E,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,yCAAyC,CAAC;QACvF,iBAAiB,EAAE,CAAC;aACjB,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CAAC,6CAA6C,CAAC;KAC3D,CAAC;SACD,QAAQ,EAAE;SACV,QAAQ,CAAC,8EAA8E,CAAC;IAC3F,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,mCAAmC,CAAC;IAClF,eAAe,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,4CAA4C,CAAC;CAC/F,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\nimport { User } from './User.js';\n\n/**\n * Information about the user, the user's Drive, and system capabilities,\n * served by `about.get`. For users in an organization with pooled storage,\n * the quota describes the organization rather than the individual.\n *\n * @see https://developers.google.com/workspace/drive/api/guides/user-info\n */\nexport const About = z.object({\n user: User.optional().describe('The authenticated user.'),\n storageQuota: z\n .object({\n limit: z\n .string()\n .optional()\n .describe(\n 'The usage limit, if applicable. This will not be present if the user has ' +\n 'unlimited storage.',\n ),\n usage: z.string().optional().describe('The total usage across all services.'),\n usageInDrive: z.string().optional().describe('The usage by all files in Google Drive.'),\n usageInDriveTrash: z\n .string()\n .optional()\n .describe('The usage by trashed files in Google Drive.'),\n })\n .optional()\n .describe(\"The user's storage quota limits and usage. All fields are measured in bytes.\"),\n maxUploadSize: z.string().optional().describe('The maximum upload size in bytes.'),\n canCreateDrives: z.boolean().optional().describe('Whether the user can create shared drives.'),\n});\n\nexport type About = z.infer<typeof About>;\n"]}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* A comment on a file: anchored or unanchored feedback with a reply thread.
|
|
4
|
+
* Comments are set as plain text (`content`) and displayed from
|
|
5
|
+
* `htmlContent`; a comment is resolved by one of its replies.
|
|
6
|
+
*
|
|
7
|
+
* @see https://developers.google.com/workspace/drive/api/guides/manage-comments
|
|
8
|
+
*/
|
|
9
|
+
export declare const Comment: z.ZodObject<{
|
|
10
|
+
id: z.ZodString;
|
|
11
|
+
content: z.ZodOptional<z.ZodString>;
|
|
12
|
+
htmlContent: z.ZodOptional<z.ZodString>;
|
|
13
|
+
author: z.ZodOptional<z.ZodObject<{
|
|
14
|
+
displayName: z.ZodOptional<z.ZodString>;
|
|
15
|
+
emailAddress: z.ZodOptional<z.ZodString>;
|
|
16
|
+
me: z.ZodOptional<z.ZodBoolean>;
|
|
17
|
+
photoLink: z.ZodOptional<z.ZodString>;
|
|
18
|
+
}, z.core.$strip>>;
|
|
19
|
+
createdTime: z.ZodOptional<z.ZodString>;
|
|
20
|
+
modifiedTime: z.ZodOptional<z.ZodString>;
|
|
21
|
+
resolved: z.ZodOptional<z.ZodBoolean>;
|
|
22
|
+
deleted: z.ZodOptional<z.ZodBoolean>;
|
|
23
|
+
anchor: z.ZodOptional<z.ZodString>;
|
|
24
|
+
quotedFileContent: z.ZodOptional<z.ZodObject<{
|
|
25
|
+
mimeType: z.ZodOptional<z.ZodString>;
|
|
26
|
+
value: z.ZodOptional<z.ZodString>;
|
|
27
|
+
}, z.core.$strip>>;
|
|
28
|
+
replies: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
29
|
+
id: z.ZodString;
|
|
30
|
+
content: z.ZodOptional<z.ZodString>;
|
|
31
|
+
htmlContent: z.ZodOptional<z.ZodString>;
|
|
32
|
+
author: z.ZodOptional<z.ZodObject<{
|
|
33
|
+
displayName: z.ZodOptional<z.ZodString>;
|
|
34
|
+
emailAddress: z.ZodOptional<z.ZodString>;
|
|
35
|
+
me: z.ZodOptional<z.ZodBoolean>;
|
|
36
|
+
photoLink: z.ZodOptional<z.ZodString>;
|
|
37
|
+
}, z.core.$strip>>;
|
|
38
|
+
createdTime: z.ZodOptional<z.ZodString>;
|
|
39
|
+
modifiedTime: z.ZodOptional<z.ZodString>;
|
|
40
|
+
deleted: z.ZodOptional<z.ZodBoolean>;
|
|
41
|
+
action: z.ZodOptional<z.ZodEnum<{
|
|
42
|
+
resolve: "resolve";
|
|
43
|
+
reopen: "reopen";
|
|
44
|
+
}>>;
|
|
45
|
+
}, z.core.$strip>>>;
|
|
46
|
+
}, z.core.$strip>;
|
|
47
|
+
export type Comment = z.infer<typeof Comment>;
|
|
48
|
+
//# sourceMappingURL=Comment.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Comment.d.ts","sourceRoot":"","sources":["../../../src/drive/entities/Comment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB;;;;;;GAMG;AACH,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAiDlB,CAAC;AAEH,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,OAAO,CAAC,CAAC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { Reply } from './Reply.js';
|
|
3
|
+
import { User } from './User.js';
|
|
4
|
+
/**
|
|
5
|
+
* A comment on a file: anchored or unanchored feedback with a reply thread.
|
|
6
|
+
* Comments are set as plain text (`content`) and displayed from
|
|
7
|
+
* `htmlContent`; a comment is resolved by one of its replies.
|
|
8
|
+
*
|
|
9
|
+
* @see https://developers.google.com/workspace/drive/api/guides/manage-comments
|
|
10
|
+
*/
|
|
11
|
+
export const Comment = z.object({
|
|
12
|
+
id: z.string().describe('Output only. The ID of the comment.'),
|
|
13
|
+
content: z
|
|
14
|
+
.string()
|
|
15
|
+
.optional()
|
|
16
|
+
.describe('The plain text content of the comment. This field is used for setting the content, ' +
|
|
17
|
+
'while htmlContent should be displayed.'),
|
|
18
|
+
htmlContent: z
|
|
19
|
+
.string()
|
|
20
|
+
.optional()
|
|
21
|
+
.describe('Output only. The content of the comment with HTML formatting.'),
|
|
22
|
+
author: User.optional().describe("Output only. The author of the comment. The author's email address and permission ID will not be populated."),
|
|
23
|
+
createdTime: z
|
|
24
|
+
.string()
|
|
25
|
+
.optional()
|
|
26
|
+
.describe('The time at which the comment was created (RFC 3339 date-time).'),
|
|
27
|
+
modifiedTime: z
|
|
28
|
+
.string()
|
|
29
|
+
.optional()
|
|
30
|
+
.describe('The last time the comment or any of its replies was modified (RFC 3339 date-time).'),
|
|
31
|
+
resolved: z
|
|
32
|
+
.boolean()
|
|
33
|
+
.optional()
|
|
34
|
+
.describe('Output only. Whether the comment has been resolved by one of its replies.'),
|
|
35
|
+
deleted: z
|
|
36
|
+
.boolean()
|
|
37
|
+
.optional()
|
|
38
|
+
.describe('Output only. Whether the comment has been deleted. A deleted comment has no content.'),
|
|
39
|
+
anchor: z.string().optional().describe('A region of the document represented as a JSON string.'),
|
|
40
|
+
quotedFileContent: z
|
|
41
|
+
.object({
|
|
42
|
+
mimeType: z.string().optional().describe('The MIME type of the quoted content.'),
|
|
43
|
+
value: z.string().optional().describe('The quoted content itself.'),
|
|
44
|
+
})
|
|
45
|
+
.optional()
|
|
46
|
+
.describe('The file content to which the comment refers, typically within the anchor region. ' +
|
|
47
|
+
'For a text file, for example, this would be the text at the location of the comment.'),
|
|
48
|
+
replies: z
|
|
49
|
+
.array(Reply)
|
|
50
|
+
.optional()
|
|
51
|
+
.describe('Output only. The full list of replies to the comment in chronological order.'),
|
|
52
|
+
});
|
|
53
|
+
//# sourceMappingURL=Comment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Comment.js","sourceRoot":"","sources":["../../../src/drive/entities/Comment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9B,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,qCAAqC,CAAC;IAC9D,OAAO,EAAE,CAAC;SACP,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CACP,qFAAqF;QACnF,wCAAwC,CAC3C;IACH,WAAW,EAAE,CAAC;SACX,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,+DAA+D,CAAC;IAC5E,MAAM,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAC9B,6GAA6G,CAC9G;IACD,WAAW,EAAE,CAAC;SACX,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,iEAAiE,CAAC;IAC9E,YAAY,EAAE,CAAC;SACZ,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,oFAAoF,CAAC;IACjG,QAAQ,EAAE,CAAC;SACR,OAAO,EAAE;SACT,QAAQ,EAAE;SACV,QAAQ,CAAC,2EAA2E,CAAC;IACxF,OAAO,EAAE,CAAC;SACP,OAAO,EAAE;SACT,QAAQ,EAAE;SACV,QAAQ,CACP,sFAAsF,CACvF;IACH,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,wDAAwD,CAAC;IAChG,iBAAiB,EAAE,CAAC;SACjB,MAAM,CAAC;QACN,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,sCAAsC,CAAC;QAChF,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,4BAA4B,CAAC;KACpE,CAAC;SACD,QAAQ,EAAE;SACV,QAAQ,CACP,oFAAoF;QAClF,sFAAsF,CACzF;IACH,OAAO,EAAE,CAAC;SACP,KAAK,CAAC,KAAK,CAAC;SACZ,QAAQ,EAAE;SACV,QAAQ,CAAC,8EAA8E,CAAC;CAC5F,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\nimport { Reply } from './Reply.js';\nimport { User } from './User.js';\n\n/**\n * A comment on a file: anchored or unanchored feedback with a reply thread.\n * Comments are set as plain text (`content`) and displayed from\n * `htmlContent`; a comment is resolved by one of its replies.\n *\n * @see https://developers.google.com/workspace/drive/api/guides/manage-comments\n */\nexport const Comment = z.object({\n id: z.string().describe('Output only. The ID of the comment.'),\n content: z\n .string()\n .optional()\n .describe(\n 'The plain text content of the comment. This field is used for setting the content, ' +\n 'while htmlContent should be displayed.',\n ),\n htmlContent: z\n .string()\n .optional()\n .describe('Output only. The content of the comment with HTML formatting.'),\n author: User.optional().describe(\n \"Output only. The author of the comment. The author's email address and permission ID will not be populated.\",\n ),\n createdTime: z\n .string()\n .optional()\n .describe('The time at which the comment was created (RFC 3339 date-time).'),\n modifiedTime: z\n .string()\n .optional()\n .describe('The last time the comment or any of its replies was modified (RFC 3339 date-time).'),\n resolved: z\n .boolean()\n .optional()\n .describe('Output only. Whether the comment has been resolved by one of its replies.'),\n deleted: z\n .boolean()\n .optional()\n .describe(\n 'Output only. Whether the comment has been deleted. A deleted comment has no content.',\n ),\n anchor: z.string().optional().describe('A region of the document represented as a JSON string.'),\n quotedFileContent: z\n .object({\n mimeType: z.string().optional().describe('The MIME type of the quoted content.'),\n value: z.string().optional().describe('The quoted content itself.'),\n })\n .optional()\n .describe(\n 'The file content to which the comment refers, typically within the anchor region. ' +\n 'For a text file, for example, this would be the text at the location of the comment.',\n ),\n replies: z\n .array(Reply)\n .optional()\n .describe('Output only. The full list of replies to the comment in chronological order.'),\n});\n\nexport type Comment = z.infer<typeof Comment>;\n"]}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* A file in Drive: any content stored in Drive (a blob, a Google Workspace
|
|
4
|
+
* document, a folder, or a shortcut), identified by an immutable id.
|
|
5
|
+
*
|
|
6
|
+
* Fields here are the MCP toolset's lossy `File` projection of the REST
|
|
7
|
+
* `files` resource (`name` → `title`, `parents[0]` → `parentId`,
|
|
8
|
+
* `owners[0].emailAddress` → `owner`, `webViewLink` → `viewUrl`, `size` →
|
|
9
|
+
* `fileSize`, `capabilities.canAddChildren` → `canAddChildren`), plus the
|
|
10
|
+
* REST-vocabulary flags the methods write (`starred`, `trashed`,
|
|
11
|
+
* `folderColorRgb`, `copyRequiresWriterPermission`, `writersCanShare`). Tools
|
|
12
|
+
* request only the toolset fields, so their outputs stay verbatim to the MCP
|
|
13
|
+
* pages; methods request the superset so a write's effect is visible in its
|
|
14
|
+
* output. Field docs use `.describe()` so they reach the wire JSON Schema an
|
|
15
|
+
* MCP client reads.
|
|
16
|
+
*
|
|
17
|
+
* @see https://developers.google.com/workspace/drive/api/guides/about-files
|
|
18
|
+
*/
|
|
19
|
+
export declare const File: z.ZodObject<{
|
|
20
|
+
id: z.ZodString;
|
|
21
|
+
title: z.ZodOptional<z.ZodString>;
|
|
22
|
+
parentId: z.ZodOptional<z.ZodString>;
|
|
23
|
+
mimeType: z.ZodOptional<z.ZodString>;
|
|
24
|
+
fileSize: z.ZodOptional<z.ZodString>;
|
|
25
|
+
description: z.ZodOptional<z.ZodString>;
|
|
26
|
+
fileExtension: z.ZodOptional<z.ZodString>;
|
|
27
|
+
contentSnippet: z.ZodOptional<z.ZodString>;
|
|
28
|
+
viewUrl: z.ZodOptional<z.ZodString>;
|
|
29
|
+
sharedWithMeTime: z.ZodOptional<z.ZodString>;
|
|
30
|
+
createdTime: z.ZodOptional<z.ZodString>;
|
|
31
|
+
modifiedTime: z.ZodOptional<z.ZodString>;
|
|
32
|
+
viewedByMeTime: z.ZodOptional<z.ZodString>;
|
|
33
|
+
owner: z.ZodOptional<z.ZodString>;
|
|
34
|
+
canAddChildren: z.ZodOptional<z.ZodBoolean>;
|
|
35
|
+
starred: z.ZodOptional<z.ZodBoolean>;
|
|
36
|
+
trashed: z.ZodOptional<z.ZodBoolean>;
|
|
37
|
+
folderColorRgb: z.ZodOptional<z.ZodString>;
|
|
38
|
+
copyRequiresWriterPermission: z.ZodOptional<z.ZodBoolean>;
|
|
39
|
+
writersCanShare: z.ZodOptional<z.ZodBoolean>;
|
|
40
|
+
}, z.core.$strip>;
|
|
41
|
+
export type File = z.infer<typeof File>;
|
|
42
|
+
//# sourceMappingURL=File.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"File.d.ts","sourceRoot":"","sources":["../../../src/drive/entities/File.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;iBAqEf,CAAC;AAEH,MAAM,MAAM,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,IAAI,CAAC,CAAC"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* A file in Drive: any content stored in Drive (a blob, a Google Workspace
|
|
4
|
+
* document, a folder, or a shortcut), identified by an immutable id.
|
|
5
|
+
*
|
|
6
|
+
* Fields here are the MCP toolset's lossy `File` projection of the REST
|
|
7
|
+
* `files` resource (`name` → `title`, `parents[0]` → `parentId`,
|
|
8
|
+
* `owners[0].emailAddress` → `owner`, `webViewLink` → `viewUrl`, `size` →
|
|
9
|
+
* `fileSize`, `capabilities.canAddChildren` → `canAddChildren`), plus the
|
|
10
|
+
* REST-vocabulary flags the methods write (`starred`, `trashed`,
|
|
11
|
+
* `folderColorRgb`, `copyRequiresWriterPermission`, `writersCanShare`). Tools
|
|
12
|
+
* request only the toolset fields, so their outputs stay verbatim to the MCP
|
|
13
|
+
* pages; methods request the superset so a write's effect is visible in its
|
|
14
|
+
* output. Field docs use `.describe()` so they reach the wire JSON Schema an
|
|
15
|
+
* MCP client reads.
|
|
16
|
+
*
|
|
17
|
+
* @see https://developers.google.com/workspace/drive/api/guides/about-files
|
|
18
|
+
*/
|
|
19
|
+
export const File = z.object({
|
|
20
|
+
id: z.string().describe('The id of the file that was fetched.'),
|
|
21
|
+
title: z.string().optional().describe('The title of the file.'),
|
|
22
|
+
parentId: z.string().optional().describe('The (optional) id of the parent of the file.'),
|
|
23
|
+
mimeType: z.string().optional().describe('The mime type of the file.'),
|
|
24
|
+
fileSize: z.string().optional().describe('The size in bytes of the file.'),
|
|
25
|
+
description: z.string().optional().describe('The description of the file.'),
|
|
26
|
+
fileExtension: z
|
|
27
|
+
.string()
|
|
28
|
+
.optional()
|
|
29
|
+
.describe('The original file extension of the file, this is only populated for files with content stored in Drive.'),
|
|
30
|
+
contentSnippet: z
|
|
31
|
+
.string()
|
|
32
|
+
.optional()
|
|
33
|
+
.describe("Generated snippet about the content of the file. Computed by Google's hosted MCP " +
|
|
34
|
+
'backend only; the Drive REST API serves no snippet, so this server never populates the field.'),
|
|
35
|
+
viewUrl: z.string().optional().describe('The URL to view the file.'),
|
|
36
|
+
sharedWithMeTime: z
|
|
37
|
+
.string()
|
|
38
|
+
.optional()
|
|
39
|
+
.describe('The time that the file was shared with the requester (RFC 3339 date-time).'),
|
|
40
|
+
createdTime: z
|
|
41
|
+
.string()
|
|
42
|
+
.optional()
|
|
43
|
+
.describe('The time that the file was created (RFC 3339 date-time).'),
|
|
44
|
+
modifiedTime: z
|
|
45
|
+
.string()
|
|
46
|
+
.optional()
|
|
47
|
+
.describe('The most recent time at which the file was modified (RFC 3339 date-time).'),
|
|
48
|
+
viewedByMeTime: z
|
|
49
|
+
.string()
|
|
50
|
+
.optional()
|
|
51
|
+
.describe('The most recent time at which the file was viewed by requester (RFC 3339 date-time).'),
|
|
52
|
+
owner: z.string().optional().describe('The email address of the owner of the file.'),
|
|
53
|
+
canAddChildren: z
|
|
54
|
+
.boolean()
|
|
55
|
+
.optional()
|
|
56
|
+
.describe('Whether the requester can add children to this folder. This is always false for non-folder types.'),
|
|
57
|
+
starred: z.boolean().optional().describe('Whether the user has starred the file.'),
|
|
58
|
+
trashed: z
|
|
59
|
+
.boolean()
|
|
60
|
+
.optional()
|
|
61
|
+
.describe('Whether the file has been trashed, either explicitly or from a trashed parent folder.'),
|
|
62
|
+
folderColorRgb: z
|
|
63
|
+
.string()
|
|
64
|
+
.optional()
|
|
65
|
+
.describe('The color for a folder or a shortcut to a folder as an RGB hex string.'),
|
|
66
|
+
copyRequiresWriterPermission: z
|
|
67
|
+
.boolean()
|
|
68
|
+
.optional()
|
|
69
|
+
.describe('Whether the options to copy, print, or download this file should be disabled for readers and commenters.'),
|
|
70
|
+
writersCanShare: z
|
|
71
|
+
.boolean()
|
|
72
|
+
.optional()
|
|
73
|
+
.describe("Whether users with only writer permission can modify the file's permissions. Not populated for items in shared drives."),
|
|
74
|
+
});
|
|
75
|
+
//# sourceMappingURL=File.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"File.js","sourceRoot":"","sources":["../../../src/drive/entities/File.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3B,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,sCAAsC,CAAC;IAC/D,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,wBAAwB,CAAC;IAC/D,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,8CAA8C,CAAC;IACxF,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,4BAA4B,CAAC;IACtE,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,gCAAgC,CAAC;IAC1E,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,8BAA8B,CAAC;IAC3E,aAAa,EAAE,CAAC;SACb,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CACP,yGAAyG,CAC1G;I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Content":["import { z } from 'zod';\n\n/**\n * A file in Drive: any content stored in Drive (a blob, a Google Workspace\n * document, a folder, or a shortcut), identified by an immutable id.\n *\n * Fields here are the MCP toolset's lossy `File` projection of the REST\n * `files` resource (`name` → `title`, `parents[0]` → `parentId`,\n * `owners[0].emailAddress` → `owner`, `webViewLink` → `viewUrl`, `size` →\n * `fileSize`, `capabilities.canAddChildren` → `canAddChildren`), plus the\n * REST-vocabulary flags the methods write (`starred`, `trashed`,\n * `folderColorRgb`, `copyRequiresWriterPermission`, `writersCanShare`). Tools\n * request only the toolset fields, so their outputs stay verbatim to the MCP\n * pages; methods request the superset so a write's effect is visible in its\n * output. Field docs use `.describe()` so they reach the wire JSON Schema an\n * MCP client reads.\n *\n * @see https://developers.google.com/workspace/drive/api/guides/about-files\n */\nexport const File = z.object({\n id: z.string().describe('The id of the file that was fetched.'),\n title: z.string().optional().describe('The title of the file.'),\n parentId: z.string().optional().describe('The (optional) id of the parent of the file.'),\n mimeType: z.string().optional().describe('The mime type of the file.'),\n fileSize: z.string().optional().describe('The size in bytes of the file.'),\n description: z.string().optional().describe('The description of the file.'),\n fileExtension: z\n .string()\n .optional()\n .describe(\n 'The original file extension of the file, this is only populated for files with content stored in Drive.',\n ),\n contentSnippet: z\n .string()\n .optional()\n .describe(\n \"Generated snippet about the content of the file. Computed by Google's hosted MCP \" +\n 'backend only; the Drive REST API serves no snippet, so this server never populates the field.',\n ),\n viewUrl: z.string().optional().describe('The URL to view the file.'),\n sharedWithMeTime: z\n .string()\n .optional()\n .describe('The time that the file was shared with the requester (RFC 3339 date-time).'),\n createdTime: z\n .string()\n .optional()\n .describe('The time that the file was created (RFC 3339 date-time).'),\n modifiedTime: z\n .string()\n .optional()\n .describe('The most recent time at which the file was modified (RFC 3339 date-time).'),\n viewedByMeTime: z\n .string()\n .optional()\n .describe(\n 'The most recent time at which the file was viewed by requester (RFC 3339 date-time).',\n ),\n owner: z.string().optional().describe('The email address of the owner of the file.'),\n canAddChildren: z\n .boolean()\n .optional()\n .describe(\n 'Whether the requester can add children to this folder. This is always false for non-folder types.',\n ),\n starred: z.boolean().optional().describe('Whether the user has starred the file.'),\n trashed: z\n .boolean()\n .optional()\n .describe(\n 'Whether the file has been trashed, either explicitly or from a trashed parent folder.',\n ),\n folderColorRgb: z\n .string()\n .optional()\n .describe('The color for a folder or a shortcut to a folder as an RGB hex string.'),\n copyRequiresWriterPermission: z\n .boolean()\n .optional()\n .describe(\n 'Whether the options to copy, print, or download this file should be disabled for readers and commenters.',\n ),\n writersCanShare: z\n .boolean()\n .optional()\n .describe(\n \"Whether users with only writer permission can modify the file's permissions. Not populated for items in shared drives.\",\n ),\n});\n\nexport type File = z.infer<typeof File>;\n"]}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* A grant of access to a file: who (a user, group, domain, or anyone) holds
|
|
4
|
+
* which role on it. The MCP toolset's projection of the REST `permissions`
|
|
5
|
+
* resource; field docs use `.describe()` so they reach the wire JSON Schema
|
|
6
|
+
* an MCP client reads.
|
|
7
|
+
*
|
|
8
|
+
* @see https://developers.google.com/workspace/drive/api/guides/manage-sharing
|
|
9
|
+
*/
|
|
10
|
+
export declare const Permission: z.ZodObject<{
|
|
11
|
+
role: z.ZodOptional<z.ZodEnum<{
|
|
12
|
+
organizer: "organizer";
|
|
13
|
+
owner: "owner";
|
|
14
|
+
fileOrganizer: "fileOrganizer";
|
|
15
|
+
writer: "writer";
|
|
16
|
+
commenter: "commenter";
|
|
17
|
+
reader: "reader";
|
|
18
|
+
}>>;
|
|
19
|
+
displayName: z.ZodOptional<z.ZodString>;
|
|
20
|
+
type: z.ZodOptional<z.ZodEnum<{
|
|
21
|
+
domain: "domain";
|
|
22
|
+
user: "user";
|
|
23
|
+
group: "group";
|
|
24
|
+
anyone: "anyone";
|
|
25
|
+
}>>;
|
|
26
|
+
emailAddress: z.ZodOptional<z.ZodString>;
|
|
27
|
+
view: z.ZodOptional<z.ZodEnum<{
|
|
28
|
+
metadata: "metadata";
|
|
29
|
+
published: "published";
|
|
30
|
+
}>>;
|
|
31
|
+
}, z.core.$strip>;
|
|
32
|
+
export type Permission = z.infer<typeof Permission>;
|
|
33
|
+
//# sourceMappingURL=Permission.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Permission.d.ts","sourceRoot":"","sources":["../../../src/drive/entities/Permission.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;GAOG;AACH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;iBAyBrB,CAAC;AAEH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* A grant of access to a file: who (a user, group, domain, or anyone) holds
|
|
4
|
+
* which role on it. The MCP toolset's projection of the REST `permissions`
|
|
5
|
+
* resource; field docs use `.describe()` so they reach the wire JSON Schema
|
|
6
|
+
* an MCP client reads.
|
|
7
|
+
*
|
|
8
|
+
* @see https://developers.google.com/workspace/drive/api/guides/manage-sharing
|
|
9
|
+
*/
|
|
10
|
+
export const Permission = z.object({
|
|
11
|
+
role: z
|
|
12
|
+
.enum(['owner', 'organizer', 'fileOrganizer', 'writer', 'commenter', 'reader'])
|
|
13
|
+
.optional()
|
|
14
|
+
.describe('The role of the grantee for the file. The possible roles include: owner, organizer, fileOrganizer, writer, commenter, reader.'),
|
|
15
|
+
displayName: z
|
|
16
|
+
.string()
|
|
17
|
+
.optional()
|
|
18
|
+
.describe("Output only. The 'pretty' name of the value of the permission."),
|
|
19
|
+
type: z
|
|
20
|
+
.enum(['user', 'group', 'domain', 'anyone'])
|
|
21
|
+
.optional()
|
|
22
|
+
.describe('The type of the grantee. Supported values include: user, group, domain, anyone.'),
|
|
23
|
+
emailAddress: z
|
|
24
|
+
.string()
|
|
25
|
+
.optional()
|
|
26
|
+
.describe('The email address of the user or group to which this permission refers.'),
|
|
27
|
+
view: z
|
|
28
|
+
.enum(['published', 'metadata'])
|
|
29
|
+
.optional()
|
|
30
|
+
.describe('Specifies the view to which this permission applies, if any. Supported values include: published, metadata.'),
|
|
31
|
+
});
|
|
32
|
+
//# sourceMappingURL=Permission.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Permission.js","sourceRoot":"","sources":["../../../src/drive/entities/Permission.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,CAAC,MAAM,CAAC;IACjC,IAAI,EAAE,CAAC;SACJ,IAAI,CAAC,CAAC,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,QAAQ,EAAE,WAAW,EAAE,QAAQ,CAAC,CAAC;SAC9E,QAAQ,EAAE;SACV,QAAQ,CACP,+HAA+H,CAChI;IACH,WAAW,EAAE,CAAC;SACX,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,gEAAgE,CAAC;IAC7E,IAAI,EAAE,CAAC;SACJ,IAAI,CAAC,CAAC,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;SAC3C,QAAQ,EAAE;SACV,QAAQ,CAAC,iFAAiF,CAAC;IAC9F,YAAY,EAAE,CAAC;SACZ,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,yEAAyE,CAAC;IACtF,IAAI,EAAE,CAAC;SACJ,IAAI,CAAC,CAAC,WAAW,EAAE,UAAU,CAAC,CAAC;SAC/B,QAAQ,EAAE;SACV,QAAQ,CACP,6GAA6G,CAC9G;CACJ,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\n\n/**\n * A grant of access to a file: who (a user, group, domain, or anyone) holds\n * which role on it. The MCP toolset's projection of the REST `permissions`\n * resource; field docs use `.describe()` so they reach the wire JSON Schema\n * an MCP client reads.\n *\n * @see https://developers.google.com/workspace/drive/api/guides/manage-sharing\n */\nexport const Permission = z.object({\n role: z\n .enum(['owner', 'organizer', 'fileOrganizer', 'writer', 'commenter', 'reader'])\n .optional()\n .describe(\n 'The role of the grantee for the file. The possible roles include: owner, organizer, fileOrganizer, writer, commenter, reader.',\n ),\n displayName: z\n .string()\n .optional()\n .describe(\"Output only. The 'pretty' name of the value of the permission.\"),\n type: z\n .enum(['user', 'group', 'domain', 'anyone'])\n .optional()\n .describe('The type of the grantee. Supported values include: user, group, domain, anyone.'),\n emailAddress: z\n .string()\n .optional()\n .describe('The email address of the user or group to which this permission refers.'),\n view: z\n .enum(['published', 'metadata'])\n .optional()\n .describe(\n 'Specifies the view to which this permission applies, if any. Supported values include: published, metadata.',\n ),\n});\n\nexport type Permission = z.infer<typeof Permission>;\n"]}
|