universal-mcp-applications 0.1.17__py3-none-any.whl → 0.1.18__py3-none-any.whl
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.
Potentially problematic release.
This version of universal-mcp-applications might be problematic. Click here for more details.
- universal_mcp/applications/falai/app.py +6 -6
- universal_mcp/applications/firecrawl/app.py +10 -10
- universal_mcp/applications/github/app.py +9 -9
- universal_mcp/applications/google_calendar/app.py +10 -10
- universal_mcp/applications/google_docs/app.py +12 -12
- universal_mcp/applications/google_drive/app.py +38 -38
- universal_mcp/applications/google_gemini/app.py +13 -12
- universal_mcp/applications/google_mail/app.py +19 -19
- universal_mcp/applications/google_searchconsole/app.py +8 -8
- universal_mcp/applications/google_sheet/app.py +19 -19
- universal_mcp/applications/linkedin/app.py +4 -4
- universal_mcp/applications/ms_teams/app.py +28 -28
- universal_mcp/applications/outlook/app.py +9 -9
- universal_mcp/applications/reddit/app.py +90 -89
- universal_mcp/applications/scraper/app.py +31 -31
- universal_mcp/applications/sharepoint/app.py +7 -7
- universal_mcp/applications/unipile/app.py +14 -14
- {universal_mcp_applications-0.1.17.dist-info → universal_mcp_applications-0.1.18.dist-info}/METADATA +1 -1
- {universal_mcp_applications-0.1.17.dist-info → universal_mcp_applications-0.1.18.dist-info}/RECORD +21 -21
- {universal_mcp_applications-0.1.17.dist-info → universal_mcp_applications-0.1.18.dist-info}/WHEEL +0 -0
- {universal_mcp_applications-0.1.17.dist-info → universal_mcp_applications-0.1.18.dist-info}/licenses/LICENSE +0 -0
|
@@ -21,7 +21,7 @@ class GoogleDriveApp(APIApplication):
|
|
|
21
21
|
self, file_id: str, add_parents: str, remove_parents: str
|
|
22
22
|
) -> dict[str, Any]:
|
|
23
23
|
"""
|
|
24
|
-
Moves a
|
|
24
|
+
Moves a file to a new folder by updating its parent references. This function adds the file to a destination folder (`add_parents`) and removes it from the source (`remove_parents`), offering a focused alternative to the more comprehensive `update_file_metadata` function.
|
|
25
25
|
|
|
26
26
|
Args:
|
|
27
27
|
file_id: The ID of the file to move
|
|
@@ -48,7 +48,7 @@ class GoogleDriveApp(APIApplication):
|
|
|
48
48
|
|
|
49
49
|
def get_drive_info(self) -> dict[str, Any]:
|
|
50
50
|
"""
|
|
51
|
-
Fetches key user and storage quota information for the authenticated Google Drive account. This streamlined function
|
|
51
|
+
Fetches key user and storage quota information for the authenticated Google Drive account. This streamlined function offers a focused alternative to `get_about_info`, which queries the same endpoint but exposes all available API parameters, providing a simpler way to get essential account details.
|
|
52
52
|
|
|
53
53
|
Returns:
|
|
54
54
|
A dictionary containing Drive information including storage quota (usage, limit) and user details (name, email, etc.).
|
|
@@ -70,7 +70,7 @@ class GoogleDriveApp(APIApplication):
|
|
|
70
70
|
self, page_size: int = 10, query: str | None = None, order_by: str | None = None
|
|
71
71
|
) -> dict[str, Any]:
|
|
72
72
|
"""
|
|
73
|
-
Searches for files in Google Drive, allowing for powerful filtering, sorting, and pagination. This
|
|
73
|
+
Searches for files in Google Drive, allowing for powerful filtering, sorting, and pagination. This streamlined function offers a more user-friendly alternative to the comprehensive `search_files_advanced` method, making it ideal for targeted queries like finding files by name, type, or parent folder.
|
|
74
74
|
|
|
75
75
|
Args:
|
|
76
76
|
page_size: Maximum number of files to return per page (default: 10)
|
|
@@ -101,7 +101,7 @@ class GoogleDriveApp(APIApplication):
|
|
|
101
101
|
|
|
102
102
|
def get_file_details(self, file_id: str) -> dict[str, Any]:
|
|
103
103
|
"""
|
|
104
|
-
|
|
104
|
+
Fetches all default metadata for a specific file by its unique ID. This function provides a simple, direct retrieval of a single file's complete attributes, differing from `search_files` which performs broad queries for multiple files based on various criteria.
|
|
105
105
|
|
|
106
106
|
Args:
|
|
107
107
|
file_id: String identifier of the file whose metadata should be retrieved
|
|
@@ -122,7 +122,7 @@ class GoogleDriveApp(APIApplication):
|
|
|
122
122
|
|
|
123
123
|
def trash_file(self, file_id: str) -> dict[str, Any]:
|
|
124
124
|
"""
|
|
125
|
-
Moves a specified file to the trash using its ID. It provides simplified error handling by
|
|
125
|
+
Moves a specified file to the trash using its ID. It provides simplified error handling by returning a dictionary with a success or error message, unlike the `permanently_delete_file` function which raises an exception on failure.
|
|
126
126
|
|
|
127
127
|
Args:
|
|
128
128
|
file_id: The unique identifier string of the file to be deleted from Google Drive
|
|
@@ -151,7 +151,7 @@ class GoogleDriveApp(APIApplication):
|
|
|
151
151
|
mime_type: str = "text/plain",
|
|
152
152
|
) -> dict[str, Any]:
|
|
153
153
|
"""
|
|
154
|
-
Creates a
|
|
154
|
+
Creates a file in Google Drive using an in-memory text string. Unlike `upload_file_from_path`, which reads from a local file, this function first creates the file's metadata (name, parent) and then uploads the provided string content, returning the new file's complete metadata upon completion.
|
|
155
155
|
|
|
156
156
|
Args:
|
|
157
157
|
file_name: Name of the file to create on Google Drive
|
|
@@ -188,7 +188,7 @@ class GoogleDriveApp(APIApplication):
|
|
|
188
188
|
|
|
189
189
|
def find_folder_id_by_name(self, folder_name: str) -> str | None:
|
|
190
190
|
"""
|
|
191
|
-
Searches for a non-trashed folder by its exact name
|
|
191
|
+
Searches for a non-trashed folder by its exact name, returning the ID of the first match. As a utility for `create_folder`, it resolves parent names to IDs and returns None if the folder isn't found or an API error occurs, logging the failure internally.
|
|
192
192
|
|
|
193
193
|
Args:
|
|
194
194
|
folder_name: The name of the folder to search for in Google Drive
|
|
@@ -216,7 +216,7 @@ class GoogleDriveApp(APIApplication):
|
|
|
216
216
|
|
|
217
217
|
def create_folder(self, folder_name: str, parent_id: str = None) -> dict[str, Any]:
|
|
218
218
|
"""
|
|
219
|
-
Creates a new folder in Google Drive, optionally within a parent
|
|
219
|
+
Creates a new folder in Google Drive, optionally within a parent specified by name or ID. If a parent name is given, it internally resolves it to an ID using the `find_folder_id_by_name` function. Returns the metadata for the newly created folder upon successful creation.
|
|
220
220
|
|
|
221
221
|
Args:
|
|
222
222
|
folder_name: Name of the folder to create
|
|
@@ -261,7 +261,7 @@ class GoogleDriveApp(APIApplication):
|
|
|
261
261
|
mime_type: str = None,
|
|
262
262
|
) -> dict[str, Any]:
|
|
263
263
|
"""
|
|
264
|
-
Uploads a local file to Google Drive by reading its binary content from a path. It
|
|
264
|
+
Uploads a local file to Google Drive by reading its binary content from a path. It creates the file's metadata, uploads the content, and returns the new file's metadata. This differs from `create_text_file` which uses in-memory string content instead of a local file path.
|
|
265
265
|
|
|
266
266
|
Args:
|
|
267
267
|
file_name: Name to give the file on Google Drive
|
|
@@ -397,7 +397,7 @@ class GoogleDriveApp(APIApplication):
|
|
|
397
397
|
xgafv: str | None = None,
|
|
398
398
|
) -> dict[str, Any]:
|
|
399
399
|
"""
|
|
400
|
-
Retrieves detailed information for a single installed Google Drive application using its unique ID. This
|
|
400
|
+
Retrieves detailed information for a single installed Google Drive application using its unique ID. This provides a targeted alternative to `list_installed_apps`, which returns a complete list, allowing for focused data retrieval about a specific application.
|
|
401
401
|
|
|
402
402
|
Args:
|
|
403
403
|
appId (string): appId
|
|
@@ -467,7 +467,7 @@ class GoogleDriveApp(APIApplication):
|
|
|
467
467
|
userIp: str | None = None,
|
|
468
468
|
) -> dict[str, Any]:
|
|
469
469
|
"""
|
|
470
|
-
Retrieves
|
|
470
|
+
Retrieves user account and Drive settings from the `/about` endpoint. This generic function provides full parameter control, offering a flexible alternative to the `get_drive_info` method, which requests specific, predefined fields like storage quota and user details.
|
|
471
471
|
|
|
472
472
|
Args:
|
|
473
473
|
alt (string): Data format for the response. Example: 'json'.
|
|
@@ -945,7 +945,7 @@ class GoogleDriveApp(APIApplication):
|
|
|
945
945
|
userIp: str | None = None,
|
|
946
946
|
) -> dict[str, Any]:
|
|
947
947
|
"""
|
|
948
|
-
Retrieves a list of comments for a specified
|
|
948
|
+
Retrieves a paginated list of all top-level comments for a specified Google Drive file. It supports filtering by modification time and including deleted comments, fetching parent comments rather than replies, unlike `list_comment_replies`.
|
|
949
949
|
|
|
950
950
|
Args:
|
|
951
951
|
fileId (string): fileId
|
|
@@ -1028,7 +1028,7 @@ class GoogleDriveApp(APIApplication):
|
|
|
1028
1028
|
resolved: str | None = None,
|
|
1029
1029
|
) -> dict[str, Any]:
|
|
1030
1030
|
"""
|
|
1031
|
-
Creates a new comment on a specified Google Drive file. It requires a file ID and the comment's content, returning the new comment's metadata. This adds top-level comments, distinct from `
|
|
1031
|
+
Creates a new comment on a specified Google Drive file. It requires a file ID and the comment's content, returning the new comment's metadata. This adds top-level comments, distinct from `create_comment_reply` which replies to existing comments.
|
|
1032
1032
|
|
|
1033
1033
|
Args:
|
|
1034
1034
|
fileId (string): fileId
|
|
@@ -1128,7 +1128,7 @@ class GoogleDriveApp(APIApplication):
|
|
|
1128
1128
|
userIp: str | None = None,
|
|
1129
1129
|
) -> dict[str, Any]:
|
|
1130
1130
|
"""
|
|
1131
|
-
Retrieves
|
|
1131
|
+
Retrieves a single comment's metadata using its unique comment and file IDs. This provides targeted access to one comment, unlike `list_file_comments` which lists all comments for a file. It can optionally include deleted comments in the returned data.
|
|
1132
1132
|
|
|
1133
1133
|
Args:
|
|
1134
1134
|
fileId (string): fileId
|
|
@@ -1197,7 +1197,7 @@ class GoogleDriveApp(APIApplication):
|
|
|
1197
1197
|
userIp: str | None = None,
|
|
1198
1198
|
) -> Any:
|
|
1199
1199
|
"""
|
|
1200
|
-
Permanently deletes a specific comment from a Google Drive file, identified by both the file
|
|
1200
|
+
Permanently deletes a specific comment from a Google Drive file, identified by both the file and comment IDs. This irreversible action removes the top-level comment and its replies, distinguishing it from the `delete_reply` function which targets only individual replies within a comment thread.
|
|
1201
1201
|
|
|
1202
1202
|
Args:
|
|
1203
1203
|
fileId (string): fileId
|
|
@@ -1375,7 +1375,7 @@ class GoogleDriveApp(APIApplication):
|
|
|
1375
1375
|
userIp: str | None = None,
|
|
1376
1376
|
) -> dict[str, Any]:
|
|
1377
1377
|
"""
|
|
1378
|
-
Retrieves a paginated list of shared drives accessible to the user. Supports optional query-based filtering and can be executed with domain administrator privileges to list all shared drives within the domain
|
|
1378
|
+
Retrieves a paginated list of shared drives accessible to the user. Supports optional query-based filtering and can be executed with domain administrator privileges to list all shared drives within the domain, returning a dictionary containing the list of drives and pagination details.
|
|
1379
1379
|
|
|
1380
1380
|
Args:
|
|
1381
1381
|
pageSize (string): Maximum number of shared drives to return per page. Example: '<integer>'.
|
|
@@ -1553,7 +1553,7 @@ class GoogleDriveApp(APIApplication):
|
|
|
1553
1553
|
userIp: str | None = None,
|
|
1554
1554
|
) -> dict[str, Any]:
|
|
1555
1555
|
"""
|
|
1556
|
-
Retrieves metadata for a specific shared drive using its ID.
|
|
1556
|
+
Retrieves metadata for a specific shared drive using its ID. Unlike `get_drive_info`, which gets user account data, this function targets a single drive's properties. It supports domain administrator access and allows specifying fields to customize the response, returning the drive's detailed information.
|
|
1557
1557
|
|
|
1558
1558
|
Args:
|
|
1559
1559
|
driveId (string): driveId
|
|
@@ -1620,7 +1620,7 @@ class GoogleDriveApp(APIApplication):
|
|
|
1620
1620
|
userIp: str | None = None,
|
|
1621
1621
|
) -> Any:
|
|
1622
1622
|
"""
|
|
1623
|
-
Permanently deletes a shared drive
|
|
1623
|
+
Permanently deletes a shared drive by its ID. This irreversible action removes the entire drive and, unlike `trash_file`, can optionally delete all its contents for domain administrators, providing a complete removal solution for a shared workspace.
|
|
1624
1624
|
|
|
1625
1625
|
Args:
|
|
1626
1626
|
driveId (string): driveId
|
|
@@ -1700,7 +1700,7 @@ class GoogleDriveApp(APIApplication):
|
|
|
1700
1700
|
themeId: str | None = None,
|
|
1701
1701
|
) -> dict[str, Any]:
|
|
1702
1702
|
"""
|
|
1703
|
-
Updates
|
|
1703
|
+
Updates a shared drive's metadata properties, such as its name, theme, or color, using its ID. This function sends a PATCH request to modify the drive and returns a dictionary containing the complete, updated metadata for the shared drive upon success.
|
|
1704
1704
|
|
|
1705
1705
|
Args:
|
|
1706
1706
|
driveId (string): driveId
|
|
@@ -1864,7 +1864,7 @@ class GoogleDriveApp(APIApplication):
|
|
|
1864
1864
|
userIp: str | None = None,
|
|
1865
1865
|
) -> dict[str, Any]:
|
|
1866
1866
|
"""
|
|
1867
|
-
Makes a hidden shared drive visible again in the user's default view by its ID. This function sends a POST request to the Google Drive API's `/unhide` endpoint, effectively reversing the action of the `
|
|
1867
|
+
Makes a hidden shared drive visible again in the user's default view by its ID. This function sends a POST request to the Google Drive API's `/unhide` endpoint, effectively reversing the action of the `hide_drive` function, and returns the updated drive metadata.
|
|
1868
1868
|
|
|
1869
1869
|
Args:
|
|
1870
1870
|
driveId (string): driveId
|
|
@@ -1946,7 +1946,7 @@ class GoogleDriveApp(APIApplication):
|
|
|
1946
1946
|
userIp: str | None = None,
|
|
1947
1947
|
) -> dict[str, Any]:
|
|
1948
1948
|
"""
|
|
1949
|
-
Exhaustively lists or searches
|
|
1949
|
+
Exhaustively lists or searches files using advanced parameters for filtering, sorting, and pagination. As a low-level alternative to the simplified `search_files` function, it provides granular control by exposing the full range of Google Drive API query options for complex retrieval.
|
|
1950
1950
|
|
|
1951
1951
|
Args:
|
|
1952
1952
|
corpora (string): Groupings of files to which the query applies. Supported groupings are: 'user' (files created by, opened by, or shared directly with the user), 'drive' (files in the specified shared drive as indicated by the 'driveId'), 'domain' (files shared to the user's domain), and 'allDrives' (A combination of 'user' and 'drive' for all drives where the user is a member). When able, use 'user' or 'drive', instead of 'allDrives', for efficiency. Example: '<string>'.
|
|
@@ -2104,7 +2104,7 @@ class GoogleDriveApp(APIApplication):
|
|
|
2104
2104
|
writersCanShare: str | None = None,
|
|
2105
2105
|
) -> dict[str, Any]:
|
|
2106
2106
|
"""
|
|
2107
|
-
Creates a new file's metadata resource in Google Drive, allowing
|
|
2107
|
+
Creates a new file's metadata resource in Google Drive, allowing detailed configuration of properties like name, MIME type, and parent folders. Unlike `upload_file_from_path` or `create_text_file`, this function only creates the metadata entry without uploading any file content.
|
|
2108
2108
|
|
|
2109
2109
|
Args:
|
|
2110
2110
|
enforceSingleParent (string): Deprecated. Creating files in multiple folders is no longer supported. Example: '<boolean>'.
|
|
@@ -2319,7 +2319,7 @@ class GoogleDriveApp(APIApplication):
|
|
|
2319
2319
|
userIp: str | None = None,
|
|
2320
2320
|
) -> dict[str, Any]:
|
|
2321
2321
|
"""
|
|
2322
|
-
|
|
2322
|
+
Generates a batch of unique IDs for future Google Drive files or shortcuts. This utility optimizes creation workflows by allowing identifiers to be fetched in advance, specifying quantity, storage space (e.g., 'drive'), and item type (e.g., 'files').
|
|
2323
2323
|
|
|
2324
2324
|
Args:
|
|
2325
2325
|
count (string): The number of IDs to return. Example: '<integer>'.
|
|
@@ -2386,7 +2386,7 @@ class GoogleDriveApp(APIApplication):
|
|
|
2386
2386
|
userIp: str | None = None,
|
|
2387
2387
|
) -> Any:
|
|
2388
2388
|
"""
|
|
2389
|
-
Permanently deletes all files and folders from the trash.
|
|
2389
|
+
Permanently deletes all files and folders from the trash. This irreversible action can target the user's main trash or a specific shared drive's trash via its `driveId`, distinguishing it from `trash_file` which only moves a single item to the trash.
|
|
2390
2390
|
|
|
2391
2391
|
Args:
|
|
2392
2392
|
driveId (string): If set, empties the trash of the provided shared drive. Example: '{{driveId}}'.
|
|
@@ -2453,7 +2453,7 @@ class GoogleDriveApp(APIApplication):
|
|
|
2453
2453
|
userIp: str | None = None,
|
|
2454
2454
|
) -> Any:
|
|
2455
2455
|
"""
|
|
2456
|
-
Permanently deletes a
|
|
2456
|
+
Permanently deletes a file by its ID, bypassing the trash for irreversible removal. Unlike the simpler `trash_file` function, this method offers advanced control through numerous optional API parameters, such as handling files located in shared drives.
|
|
2457
2457
|
|
|
2458
2458
|
Args:
|
|
2459
2459
|
fileId (string): fileId
|
|
@@ -2594,7 +2594,7 @@ class GoogleDriveApp(APIApplication):
|
|
|
2594
2594
|
writersCanShare: str | None = None,
|
|
2595
2595
|
) -> dict[str, Any]:
|
|
2596
2596
|
"""
|
|
2597
|
-
Modifies a file's metadata properties, such as name, description, or trashed status, using its unique ID. It
|
|
2597
|
+
Modifies a file's metadata properties, such as name, description, or trashed status, using its unique ID. It also moves files by changing parent attributes, acting as a comprehensive alternative to the more specialized `move_file` function.
|
|
2598
2598
|
|
|
2599
2599
|
Args:
|
|
2600
2600
|
fileId (string): fileId
|
|
@@ -3092,7 +3092,7 @@ class GoogleDriveApp(APIApplication):
|
|
|
3092
3092
|
userIp: str | None = None,
|
|
3093
3093
|
) -> Any:
|
|
3094
3094
|
"""
|
|
3095
|
-
Exports a Google Workspace document (e.g., Google Doc) by its ID, converting it
|
|
3095
|
+
Exports a Google Workspace document (e.g., Google Doc) by its ID, converting it to a specified format like PDF using the `mimeType` argument. This function returns the raw, converted file content for download, differentiating it from methods that retrieve metadata.
|
|
3096
3096
|
|
|
3097
3097
|
Args:
|
|
3098
3098
|
fileId (string): fileId
|
|
@@ -3159,7 +3159,7 @@ class GoogleDriveApp(APIApplication):
|
|
|
3159
3159
|
userIp: str | None = None,
|
|
3160
3160
|
) -> dict[str, Any]:
|
|
3161
3161
|
"""
|
|
3162
|
-
Retrieves a paginated list of all labels applied to a specific file in Google Drive, identified by its unique ID. It allows controlling the number of results per page and navigating through pages of labels.
|
|
3162
|
+
Retrieves a paginated list of all labels applied to a specific file in Google Drive, identified by its unique ID. It allows controlling the number of results per page and navigating through pages of labels, differing from `modify_file_labels` which alters them.
|
|
3163
3163
|
|
|
3164
3164
|
Args:
|
|
3165
3165
|
fileId (string): fileId
|
|
@@ -3321,7 +3321,7 @@ class GoogleDriveApp(APIApplication):
|
|
|
3321
3321
|
type: str | None = None,
|
|
3322
3322
|
) -> dict[str, Any]:
|
|
3323
3323
|
"""
|
|
3324
|
-
Establishes a push notification channel
|
|
3324
|
+
Establishes a push notification channel for a specific file, enabling real-time updates via webhook. Unlike `watch_drive_changes`, which monitors an entire drive, this function provides targeted notifications for content or metadata updates to a single file identified by its ID.
|
|
3325
3325
|
|
|
3326
3326
|
Args:
|
|
3327
3327
|
fileId (string): fileId
|
|
@@ -3431,7 +3431,7 @@ class GoogleDriveApp(APIApplication):
|
|
|
3431
3431
|
userIp: str | None = None,
|
|
3432
3432
|
) -> dict[str, Any]:
|
|
3433
3433
|
"""
|
|
3434
|
-
Retrieves the list of permissions for a specified file or shared drive
|
|
3434
|
+
Retrieves the list of permissions for a specified file or shared drive. This function supports pagination and various query parameters to customize results for different access levels, such as domain administration, unlike `get_permission_by_id` which fetches a single permission.
|
|
3435
3435
|
|
|
3436
3436
|
Args:
|
|
3437
3437
|
fileId (string): fileId
|
|
@@ -3529,7 +3529,7 @@ class GoogleDriveApp(APIApplication):
|
|
|
3529
3529
|
view: str | None = None,
|
|
3530
3530
|
) -> dict[str, Any]:
|
|
3531
3531
|
"""
|
|
3532
|
-
Creates a
|
|
3532
|
+
Creates a permission for a file or shared drive, assigning roles like 'reader' to a user, group, or domain. This comprehensive method supports advanced options like notification emails and ownership transfer, distinguishing it from the simplified `create_permission` function which offers fewer parameters.
|
|
3533
3533
|
|
|
3534
3534
|
Args:
|
|
3535
3535
|
fileId (string): fileId
|
|
@@ -3653,7 +3653,7 @@ class GoogleDriveApp(APIApplication):
|
|
|
3653
3653
|
userIp: str | None = None,
|
|
3654
3654
|
) -> dict[str, Any]:
|
|
3655
3655
|
"""
|
|
3656
|
-
Retrieves
|
|
3656
|
+
Retrieves metadata for a specific permission on a file or shared drive, identified by its unique ID. This provides targeted access information, unlike `list_file_permissions` which fetches all permissions for a file.
|
|
3657
3657
|
|
|
3658
3658
|
Args:
|
|
3659
3659
|
fileId (string): fileId
|
|
@@ -3938,7 +3938,7 @@ class GoogleDriveApp(APIApplication):
|
|
|
3938
3938
|
userIp: str | None = None,
|
|
3939
3939
|
) -> dict[str, Any]:
|
|
3940
3940
|
"""
|
|
3941
|
-
|
|
3941
|
+
Fetches a paginated list of replies for a specific comment, requiring both file and comment IDs. It can optionally include deleted replies. Unlike `list_file_comments`, which retrieves all top-level comments, this function targets replies within a single comment's thread.
|
|
3942
3942
|
|
|
3943
3943
|
Args:
|
|
3944
3944
|
fileId (string): fileId
|
|
@@ -4118,7 +4118,7 @@ class GoogleDriveApp(APIApplication):
|
|
|
4118
4118
|
userIp: str | None = None,
|
|
4119
4119
|
) -> dict[str, Any]:
|
|
4120
4120
|
"""
|
|
4121
|
-
Retrieves a specific reply
|
|
4121
|
+
Retrieves a specific reply's metadata from a comment thread using file, comment, and reply IDs. Unlike `list_comment_replies`, which fetches all replies for a comment, this function targets a single one and can optionally include deleted replies in the result.
|
|
4122
4122
|
|
|
4123
4123
|
Args:
|
|
4124
4124
|
fileId (string): fileId
|
|
@@ -4191,7 +4191,7 @@ class GoogleDriveApp(APIApplication):
|
|
|
4191
4191
|
userIp: str | None = None,
|
|
4192
4192
|
) -> Any:
|
|
4193
4193
|
"""
|
|
4194
|
-
Permanently deletes a specific reply
|
|
4194
|
+
Permanently deletes a specific reply from a comment on a Google Drive file. This targeted operation requires file, comment, and reply IDs to remove a single nested reply, distinguishing it from `delete_comment` which removes an entire top-level comment.
|
|
4195
4195
|
|
|
4196
4196
|
Args:
|
|
4197
4197
|
fileId (string): fileId
|
|
@@ -4435,7 +4435,7 @@ class GoogleDriveApp(APIApplication):
|
|
|
4435
4435
|
userIp: str | None = None,
|
|
4436
4436
|
) -> dict[str, Any]:
|
|
4437
4437
|
"""
|
|
4438
|
-
|
|
4438
|
+
Fetches metadata for a single, specific file revision using its file and revision IDs. Unlike `list_file_revisions` which lists a file's complete version history, this function targets one historical version to retrieve its unique metadata.
|
|
4439
4439
|
|
|
4440
4440
|
Args:
|
|
4441
4441
|
fileId (string): fileId
|
|
@@ -4504,7 +4504,7 @@ class GoogleDriveApp(APIApplication):
|
|
|
4504
4504
|
userIp: str | None = None,
|
|
4505
4505
|
) -> Any:
|
|
4506
4506
|
"""
|
|
4507
|
-
Permanently deletes a specific revision of a file, identified by its file and revision IDs. This
|
|
4507
|
+
Permanently deletes a specific revision of a file, identified by its file and revision IDs. This irreversible action removes a single historical version, distinguishing it from functions like `permanently_delete_file`, which deletes the entire file, or `trash_file`, which moves it to the trash.
|
|
4508
4508
|
|
|
4509
4509
|
Args:
|
|
4510
4510
|
fileId (string): fileId
|
|
@@ -4683,7 +4683,7 @@ class GoogleDriveApp(APIApplication):
|
|
|
4683
4683
|
type: str | None = None,
|
|
4684
4684
|
) -> dict[str, Any]:
|
|
4685
4685
|
"""
|
|
4686
|
-
|
|
4686
|
+
Grants a specified role (e.g., 'reader') to a user or group for a file. This is a simplified alternative to the comprehensive `create_file_permission` function, focusing only on the core arguments required for basic sharing operations and omitting advanced options like notification settings or ownership transfer.
|
|
4687
4687
|
|
|
4688
4688
|
Args:
|
|
4689
4689
|
fileId (string): fileId
|
|
@@ -65,7 +65,7 @@ class GoogleGeminiApp(APIApplication):
|
|
|
65
65
|
async def generate_image(
|
|
66
66
|
self,
|
|
67
67
|
prompt: Annotated[str, "The prompt to generate image from"],
|
|
68
|
-
|
|
68
|
+
images: Annotated[list[str], "The reference images path"] | None = None,
|
|
69
69
|
model: str = "gemini-2.5-flash-image-preview",
|
|
70
70
|
) -> list:
|
|
71
71
|
"""
|
|
@@ -75,7 +75,7 @@ class GoogleGeminiApp(APIApplication):
|
|
|
75
75
|
|
|
76
76
|
Args:
|
|
77
77
|
prompt (str): The descriptive text prompt to guide the image generation. For example: "A futuristic city at sunset with flying cars."
|
|
78
|
-
|
|
78
|
+
images (list[str], optional): An optional list of URL to a reference image. These images will be used as a basis for the generation.
|
|
79
79
|
model (str, optional): The Gemini model to use for image generation. Defaults to "gemini-2.5-flash-image-preview".
|
|
80
80
|
|
|
81
81
|
Returns:
|
|
@@ -96,16 +96,17 @@ class GoogleGeminiApp(APIApplication):
|
|
|
96
96
|
"""
|
|
97
97
|
# The Gemini API is synchronous, so run in a thread
|
|
98
98
|
contents = [prompt]
|
|
99
|
-
if
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
99
|
+
if images:
|
|
100
|
+
for image in images:
|
|
101
|
+
if image.startswith(("http://", "https://")):
|
|
102
|
+
import requests
|
|
103
|
+
|
|
104
|
+
response = requests.get(image)
|
|
105
|
+
response.raise_for_status()
|
|
106
|
+
image = Image.open(io.BytesIO(response.content))
|
|
107
|
+
else:
|
|
108
|
+
image = Image.open(image)
|
|
109
|
+
contents.append(image)
|
|
109
110
|
response = self.genai_client.models.generate_content(
|
|
110
111
|
model=model,
|
|
111
112
|
contents=contents,
|
|
@@ -24,7 +24,7 @@ class GoogleMailApp(APIApplication):
|
|
|
24
24
|
thread_id: str | None = None,
|
|
25
25
|
) -> dict[str, Any]:
|
|
26
26
|
"""
|
|
27
|
-
Composes and immediately sends an email message via the Gmail API. It can function as a reply within an existing conversation if a `thread_id` is provided. This action is distinct from `send_draft`, which sends a previously saved draft message.
|
|
27
|
+
Composes and immediately sends an email message via the Gmail API. It can function as a reply within an existing conversation if a `thread_id` is provided. This action is distinct from `send_draft`, which sends a previously saved draft message, or `create_draft`, which only saves an email.
|
|
28
28
|
|
|
29
29
|
Args:
|
|
30
30
|
to: The email address of the recipient
|
|
@@ -79,7 +79,7 @@ class GoogleMailApp(APIApplication):
|
|
|
79
79
|
thread_id: str | None = None,
|
|
80
80
|
) -> dict[str, Any]:
|
|
81
81
|
"""
|
|
82
|
-
Saves a new draft
|
|
82
|
+
Saves a new email draft in Gmail with a specified recipient, subject, and body. An optional thread ID can create the draft as a reply within an existing conversation, distinguishing it from `send_email`, which sends immediately.
|
|
83
83
|
|
|
84
84
|
Args:
|
|
85
85
|
to: The email address of the recipient
|
|
@@ -118,7 +118,7 @@ class GoogleMailApp(APIApplication):
|
|
|
118
118
|
|
|
119
119
|
def send_draft(self, draft_id: str) -> dict[str, Any]:
|
|
120
120
|
"""
|
|
121
|
-
Sends a pre-existing Gmail draft identified by its unique ID. It posts to the `/drafts/send` endpoint, converting a saved draft into a sent message. This function acts on drafts
|
|
121
|
+
Sends a pre-existing Gmail draft identified by its unique ID. It posts to the `/drafts/send` endpoint, converting a saved draft into a sent message. This function acts on drafts from `create_draft` and differs from `send_email`, which composes and sends an email in one step.
|
|
122
122
|
|
|
123
123
|
Args:
|
|
124
124
|
draft_id: The unique identifier of the Gmail draft to be sent
|
|
@@ -183,7 +183,7 @@ class GoogleMailApp(APIApplication):
|
|
|
183
183
|
include_spam_trash: bool = False,
|
|
184
184
|
) -> dict[str, Any]:
|
|
185
185
|
"""
|
|
186
|
-
|
|
186
|
+
Fetches a list of email drafts, allowing filtering by a search query and limiting results. It can optionally include drafts from spam and trash, returning a collection of draft objects. This is distinct from `get_draft`, which retrieves only a single, specific draft by its ID.
|
|
187
187
|
|
|
188
188
|
Args:
|
|
189
189
|
max_results: Maximum number of drafts to return (max 500, default 20)
|
|
@@ -221,7 +221,7 @@ class GoogleMailApp(APIApplication):
|
|
|
221
221
|
|
|
222
222
|
def get_message_details(self, message_id: str) -> dict[str, Any]:
|
|
223
223
|
"""
|
|
224
|
-
Retrieves a specific email from Gmail by its ID. It parses the API response to extract and format key details—including sender,
|
|
224
|
+
Retrieves a specific email from Gmail by its ID. It parses the API response to extract and format key details—including sender, subject, body, and attachments—into a structured dictionary. This function provides detailed data for a single message, distinguishing it from `list_messages` which fetches multiple messages.
|
|
225
225
|
|
|
226
226
|
Args:
|
|
227
227
|
message_id: The unique identifier of the Gmail message to retrieve
|
|
@@ -387,7 +387,7 @@ class GoogleMailApp(APIApplication):
|
|
|
387
387
|
page_token: str | None = None,
|
|
388
388
|
) -> dict[str, Any]:
|
|
389
389
|
"""
|
|
390
|
-
Fetches a paginated list of detailed email messages
|
|
390
|
+
Fetches a paginated list of detailed email messages using optional search queries. It concurrently retrieves full content (sender, subject, body) for each message, returning the results and a pagination token. This differs from `get_message_details`, which fetches only a single message.
|
|
391
391
|
|
|
392
392
|
Args:
|
|
393
393
|
max_results: Maximum number of messages to return (max 500, default 20)
|
|
@@ -471,7 +471,7 @@ class GoogleMailApp(APIApplication):
|
|
|
471
471
|
|
|
472
472
|
def get_email_thread(self, thread_id: str) -> dict[str, Any]:
|
|
473
473
|
"""
|
|
474
|
-
|
|
474
|
+
Fetches a complete email conversation by its unique thread ID. Unlike `get_message_details`, which retrieves a single message, this returns all messages and metadata for the entire thread, providing the full context of the conversation.
|
|
475
475
|
|
|
476
476
|
Args:
|
|
477
477
|
thread_id: The unique identifier of the Gmail thread to retrieve
|
|
@@ -494,7 +494,7 @@ class GoogleMailApp(APIApplication):
|
|
|
494
494
|
|
|
495
495
|
def list_labels(self) -> dict[str, Any]:
|
|
496
496
|
"""
|
|
497
|
-
Fetches a complete list of all available labels from the user's Gmail account via the API.
|
|
497
|
+
Fetches a complete list of all available labels from the user's Gmail account via the API. It retrieves both system-defined (e.g., INBOX) and user-created labels, returning their names and IDs, complementing management functions like `create_label` and `update_label`.
|
|
498
498
|
|
|
499
499
|
Args:
|
|
500
500
|
None: This method takes no arguments
|
|
@@ -520,7 +520,7 @@ class GoogleMailApp(APIApplication):
|
|
|
520
520
|
|
|
521
521
|
def create_label(self, name: str) -> dict[str, Any]:
|
|
522
522
|
"""
|
|
523
|
-
Creates a new Gmail label with a specified name
|
|
523
|
+
Creates a new Gmail label with a specified name, hardcoding its visibility to ensure it appears in both label and message lists. This function complements `update_label` and `delete_label` by adding new organizational tags to the user's account via the API.
|
|
524
524
|
|
|
525
525
|
Args:
|
|
526
526
|
name: The display name of the label to create
|
|
@@ -594,7 +594,7 @@ class GoogleMailApp(APIApplication):
|
|
|
594
594
|
message=None,
|
|
595
595
|
) -> dict[str, Any]:
|
|
596
596
|
"""
|
|
597
|
-
|
|
597
|
+
Replaces the entire content of a specific Gmail draft, identified by its ID, with a new message object. This allows complete modification of the recipient, subject, and body, serving as the primary "edit" function for drafts created via `create_draft`.
|
|
598
598
|
|
|
599
599
|
Args:
|
|
600
600
|
userId (string): userId
|
|
@@ -713,7 +713,7 @@ class GoogleMailApp(APIApplication):
|
|
|
713
713
|
xgafv=None,
|
|
714
714
|
) -> dict[str, Any]:
|
|
715
715
|
"""
|
|
716
|
-
Moves a specific Gmail message to the trash folder
|
|
716
|
+
Moves a specific Gmail message to the trash folder by its unique ID. This action performs a soft delete and is the direct counterpart to `untrash_message`, which restores a message. It requires both a user ID and the specific message ID to make the API call.
|
|
717
717
|
|
|
718
718
|
Args:
|
|
719
719
|
userId (string): userId
|
|
@@ -779,7 +779,7 @@ class GoogleMailApp(APIApplication):
|
|
|
779
779
|
xgafv=None,
|
|
780
780
|
) -> dict[str, Any]:
|
|
781
781
|
"""
|
|
782
|
-
Restores a specific Gmail message from the trash to the user's mailbox, identified by its unique ID. It serves as the direct counterpart to `
|
|
782
|
+
Restores a specific Gmail message from the trash to the user's mailbox, identified by its unique ID. It serves as the direct counterpart to `trash_message`, undoing the deletion action and making the message visible again in the user's account via an API call.
|
|
783
783
|
|
|
784
784
|
Args:
|
|
785
785
|
userId (string): userId
|
|
@@ -846,7 +846,7 @@ class GoogleMailApp(APIApplication):
|
|
|
846
846
|
xgafv=None,
|
|
847
847
|
) -> dict[str, Any]:
|
|
848
848
|
"""
|
|
849
|
-
|
|
849
|
+
Fetches the raw, base64-encoded content of a specific email attachment using its unique ID. It requires the parent message and user IDs for a targeted API request, returning the file's size and data for download or processing, unlike functions that only list attachment metadata.
|
|
850
850
|
|
|
851
851
|
Args:
|
|
852
852
|
userId (string): userId
|
|
@@ -924,7 +924,7 @@ class GoogleMailApp(APIApplication):
|
|
|
924
924
|
type=None,
|
|
925
925
|
) -> dict[str, Any]:
|
|
926
926
|
"""
|
|
927
|
-
Updates an existing Gmail label's properties, such as its name, color, or visibility, using its unique ID.
|
|
927
|
+
Updates an existing Gmail label's properties, such as its name, color, or visibility, using its unique ID. This modification function is distinct from `create_label` and `delete_label`, returning the full, updated label resource from the API upon successful completion.
|
|
928
928
|
|
|
929
929
|
Args:
|
|
930
930
|
userId (string): userId
|
|
@@ -1030,7 +1030,7 @@ class GoogleMailApp(APIApplication):
|
|
|
1030
1030
|
xgafv=None,
|
|
1031
1031
|
) -> Any:
|
|
1032
1032
|
"""
|
|
1033
|
-
Permanently removes a specific Gmail label from a user's account, identified by its unique ID. This function performs an irreversible deletion via an API call, requiring both the `userId` and the label `id`. It is the destructive counterpart to `create_label` and `
|
|
1033
|
+
Permanently removes a specific Gmail label from a user's account, identified by its unique ID. This function performs an irreversible deletion via an API call, requiring both the `userId` and the label `id`. It is the destructive counterpart to `create_label` and `update_label`.
|
|
1034
1034
|
|
|
1035
1035
|
Args:
|
|
1036
1036
|
userId (string): userId
|
|
@@ -1096,7 +1096,7 @@ class GoogleMailApp(APIApplication):
|
|
|
1096
1096
|
xgafv=None,
|
|
1097
1097
|
) -> dict[str, Any]:
|
|
1098
1098
|
"""
|
|
1099
|
-
Fetches
|
|
1099
|
+
Fetches a single Gmail filter's configuration by its unique ID for a specified user. It returns the filter’s criteria (e.g., sender) and actions (e.g., add label). This differs from `get_all_filters`, which retrieves a complete list of all filters for the user.
|
|
1100
1100
|
|
|
1101
1101
|
Args:
|
|
1102
1102
|
userId (string): userId
|
|
@@ -1162,7 +1162,7 @@ class GoogleMailApp(APIApplication):
|
|
|
1162
1162
|
xgafv=None,
|
|
1163
1163
|
) -> Any:
|
|
1164
1164
|
"""
|
|
1165
|
-
|
|
1165
|
+
Permanently removes a specific Gmail filter, identified by its unique ID, from a user's account. This action deletes the filter's criteria and all associated automation rules, making it the destructive counterpart to `create_filter` and `get_filter`.
|
|
1166
1166
|
|
|
1167
1167
|
Args:
|
|
1168
1168
|
userId (string): userId
|
|
@@ -1227,7 +1227,7 @@ class GoogleMailApp(APIApplication):
|
|
|
1227
1227
|
xgafv=None,
|
|
1228
1228
|
) -> dict[str, Any]:
|
|
1229
1229
|
"""
|
|
1230
|
-
Retrieves all configured email filters for a specified Gmail user ID. It fetches a list of a user's filters, including their matching criteria and automated actions,
|
|
1230
|
+
Retrieves all configured email filters for a specified Gmail user ID. It fetches a list of a user's filters, including their matching criteria and automated actions, distinguishing it from `get_filter`, which retrieves only a single filter.
|
|
1231
1231
|
|
|
1232
1232
|
Args:
|
|
1233
1233
|
userId (string): userId
|
|
@@ -1292,7 +1292,7 @@ class GoogleMailApp(APIApplication):
|
|
|
1292
1292
|
id=None,
|
|
1293
1293
|
) -> dict[str, Any]:
|
|
1294
1294
|
"""
|
|
1295
|
-
|
|
1295
|
+
Creates a new automated email filter in Gmail for a specified user. It requires defining matching criteria (e.g., sender, subject) and an action (e.g., add label). This function adds new rules, distinguishing it from `get_all_filters` and `delete_filter` which manage existing ones.
|
|
1296
1296
|
|
|
1297
1297
|
Args:
|
|
1298
1298
|
userId (string): userId
|