universal-mcp-applications 0.1.13__py3-none-any.whl → 0.1.15__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/aws_s3/app.py +71 -71
- universal_mcp/applications/calendly/app.py +199 -199
- universal_mcp/applications/canva/app.py +189 -189
- universal_mcp/applications/domain_checker/app.py +31 -24
- universal_mcp/applications/e2b/app.py +6 -7
- universal_mcp/applications/elevenlabs/app.py +24 -20
- universal_mcp/applications/exa/app.py +25 -20
- universal_mcp/applications/falai/app.py +44 -41
- universal_mcp/applications/file_system/app.py +20 -12
- universal_mcp/applications/firecrawl/app.py +46 -47
- universal_mcp/applications/fireflies/app.py +79 -79
- universal_mcp/applications/fpl/app.py +83 -74
- universal_mcp/applications/github/README.md +0 -1028
- universal_mcp/applications/github/app.py +55 -50227
- universal_mcp/applications/google_calendar/app.py +63 -65
- universal_mcp/applications/google_docs/app.py +78 -78
- universal_mcp/applications/google_drive/app.py +361 -440
- universal_mcp/applications/google_gemini/app.py +34 -17
- universal_mcp/applications/google_mail/app.py +117 -117
- universal_mcp/applications/google_searchconsole/app.py +41 -47
- universal_mcp/applications/google_sheet/app.py +157 -164
- universal_mcp/applications/http_tools/app.py +16 -16
- universal_mcp/applications/linkedin/app.py +26 -31
- universal_mcp/applications/ms_teams/app.py +190 -190
- universal_mcp/applications/openai/app.py +55 -56
- universal_mcp/applications/outlook/app.py +71 -71
- universal_mcp/applications/perplexity/app.py +17 -17
- universal_mcp/applications/reddit/app.py +225 -4053
- universal_mcp/applications/replicate/app.py +40 -42
- universal_mcp/applications/resend/app.py +157 -154
- universal_mcp/applications/scraper/app.py +24 -24
- universal_mcp/applications/serpapi/app.py +18 -20
- universal_mcp/applications/sharepoint/app.py +46 -36
- universal_mcp/applications/slack/app.py +66 -66
- universal_mcp/applications/tavily/app.py +7 -7
- universal_mcp/applications/twitter/api_segments/compliance_api.py +17 -20
- universal_mcp/applications/twitter/api_segments/dm_conversations_api.py +35 -40
- universal_mcp/applications/twitter/api_segments/dm_events_api.py +18 -21
- universal_mcp/applications/twitter/api_segments/likes_api.py +19 -22
- universal_mcp/applications/twitter/api_segments/lists_api.py +59 -68
- universal_mcp/applications/twitter/api_segments/spaces_api.py +36 -42
- universal_mcp/applications/twitter/api_segments/trends_api.py +7 -8
- universal_mcp/applications/twitter/api_segments/tweets_api.py +159 -185
- universal_mcp/applications/twitter/api_segments/usage_api.py +5 -6
- universal_mcp/applications/twitter/api_segments/users_api.py +230 -264
- universal_mcp/applications/unipile/app.py +99 -105
- universal_mcp/applications/whatsapp/app.py +86 -82
- universal_mcp/applications/whatsapp_business/app.py +147 -147
- universal_mcp/applications/youtube/app.py +290 -290
- universal_mcp/applications/zenquotes/app.py +6 -6
- {universal_mcp_applications-0.1.13.dist-info → universal_mcp_applications-0.1.15.dist-info}/METADATA +2 -2
- {universal_mcp_applications-0.1.13.dist-info → universal_mcp_applications-0.1.15.dist-info}/RECORD +54 -54
- {universal_mcp_applications-0.1.13.dist-info → universal_mcp_applications-0.1.15.dist-info}/WHEEL +0 -0
- {universal_mcp_applications-0.1.13.dist-info → universal_mcp_applications-0.1.15.dist-info}/licenses/LICENSE +0 -0
|
@@ -21,18 +21,18 @@ class GoogleSheetApp(APIApplication):
|
|
|
21
21
|
|
|
22
22
|
def create_spreadsheet(self, title: str) -> dict[str, Any]:
|
|
23
23
|
"""
|
|
24
|
-
Creates a new blank Google Spreadsheet with
|
|
25
|
-
|
|
24
|
+
Creates a new, blank Google Spreadsheet file with a specified title. This function generates a completely new document, unlike `add_sheet` which adds a tab to an existing spreadsheet. It returns the API response containing the new spreadsheet's metadata.
|
|
25
|
+
|
|
26
26
|
Args:
|
|
27
27
|
title: String representing the desired title for the new spreadsheet
|
|
28
|
-
|
|
28
|
+
|
|
29
29
|
Returns:
|
|
30
30
|
Dictionary containing the full response from the Google Sheets API, including the spreadsheet's metadata and properties
|
|
31
|
-
|
|
31
|
+
|
|
32
32
|
Raises:
|
|
33
33
|
HTTPError: When the API request fails due to invalid authentication, network issues, or API limitations
|
|
34
34
|
ValueError: When the title parameter is empty or contains invalid characters
|
|
35
|
-
|
|
35
|
+
|
|
36
36
|
Tags:
|
|
37
37
|
create, spreadsheet, google-sheets, api, important
|
|
38
38
|
"""
|
|
@@ -41,21 +41,21 @@ class GoogleSheetApp(APIApplication):
|
|
|
41
41
|
response = self._post(url, data=spreadsheet_data)
|
|
42
42
|
return self._handle_response(response)
|
|
43
43
|
|
|
44
|
-
def
|
|
44
|
+
def get_spreadsheet_metadata(self, spreadsheet_id: str) -> dict[str, Any]:
|
|
45
45
|
"""
|
|
46
|
-
Retrieves
|
|
47
|
-
|
|
46
|
+
Retrieves a spreadsheet's metadata and structural properties, such as sheet names, IDs, and named ranges, using its unique ID. This function intentionally excludes cell data, distinguishing it from `get_values` which fetches the actual content within the cells.
|
|
47
|
+
|
|
48
48
|
Args:
|
|
49
49
|
spreadsheet_id: The unique identifier of the Google Spreadsheet to retrieve (found in the spreadsheet's URL)
|
|
50
|
-
|
|
50
|
+
|
|
51
51
|
Returns:
|
|
52
52
|
A dictionary containing the full spreadsheet metadata and contents, including properties, sheets, named ranges, and other spreadsheet-specific information from the Google Sheets API
|
|
53
|
-
|
|
53
|
+
|
|
54
54
|
Raises:
|
|
55
55
|
HTTPError: When the API request fails due to invalid spreadsheet_id or insufficient permissions
|
|
56
56
|
ConnectionError: When there's a network connectivity issue
|
|
57
57
|
ValueError: When the response cannot be parsed as JSON
|
|
58
|
-
|
|
58
|
+
|
|
59
59
|
Tags:
|
|
60
60
|
get, retrieve, spreadsheet, api, metadata, read, important
|
|
61
61
|
"""
|
|
@@ -72,22 +72,22 @@ class GoogleSheetApp(APIApplication):
|
|
|
72
72
|
dateTimeRenderOption: str | None = None,
|
|
73
73
|
) -> dict[str, Any]:
|
|
74
74
|
"""
|
|
75
|
-
Retrieves values from a
|
|
76
|
-
|
|
75
|
+
Retrieves cell values from a single, specified A1 notation range in a Google Spreadsheet. Unlike `batch_get_values` which fetches multiple ranges, this function is for a singular query and provides options to control the data's output format (e.g., rows vs. columns, formatted vs. raw values).
|
|
76
|
+
|
|
77
77
|
Args:
|
|
78
78
|
spreadsheetId: The unique identifier of the Google Spreadsheet to retrieve values from
|
|
79
79
|
range: A1 notation range string (e.g., 'Sheet1!A1:B2')
|
|
80
80
|
majorDimension: The major dimension that results should use. "ROWS" or "COLUMNS". Example: "ROWS"
|
|
81
81
|
valueRenderOption: How values should be represented in the output. "FORMATTED_VALUE", "UNFORMATTED_VALUE", or "FORMULA". Example: "FORMATTED_VALUE"
|
|
82
82
|
dateTimeRenderOption: How dates, times, and durations should be represented. "SERIAL_NUMBER" or "FORMATTED_STRING". Example: "FORMATTED_STRING"
|
|
83
|
-
|
|
83
|
+
|
|
84
84
|
Returns:
|
|
85
85
|
A dictionary containing the API response with the requested spreadsheet values and metadata
|
|
86
|
-
|
|
86
|
+
|
|
87
87
|
Raises:
|
|
88
88
|
HTTPError: If the API request fails due to invalid spreadsheet_id, insufficient permissions, or invalid range format
|
|
89
89
|
ValueError: If the spreadsheet_id is empty or invalid
|
|
90
|
-
|
|
90
|
+
|
|
91
91
|
Tags:
|
|
92
92
|
get, read, spreadsheet, values, important
|
|
93
93
|
"""
|
|
@@ -104,23 +104,23 @@ class GoogleSheetApp(APIApplication):
|
|
|
104
104
|
response = self._get(url, params=params)
|
|
105
105
|
return self._handle_response(response)
|
|
106
106
|
|
|
107
|
-
def
|
|
107
|
+
def batch_get_values_by_range(
|
|
108
108
|
self, spreadsheet_id: str, ranges: list[str] | None = None
|
|
109
109
|
) -> dict[str, Any]:
|
|
110
110
|
"""
|
|
111
|
-
|
|
112
|
-
|
|
111
|
+
Efficiently retrieves values from multiple specified ranges in a Google Spreadsheet using a single batch API request. This method is distinct from `get_values`, which fetches a single range, and `batch_get_values_by_data_filter`, which uses filtering criteria instead of predefined A1 notation ranges.
|
|
112
|
+
|
|
113
113
|
Args:
|
|
114
114
|
spreadsheet_id: The unique identifier of the Google Spreadsheet to retrieve values from
|
|
115
115
|
ranges: Optional list of A1 notation or R1C1 notation range strings (e.g., ['Sheet1!A1:B2', 'Sheet2!C3:D4']). If None, returns values from the entire spreadsheet
|
|
116
|
-
|
|
116
|
+
|
|
117
117
|
Returns:
|
|
118
118
|
A dictionary containing the API response with the requested spreadsheet values and metadata
|
|
119
|
-
|
|
119
|
+
|
|
120
120
|
Raises:
|
|
121
121
|
HTTPError: If the API request fails due to invalid spreadsheet_id, insufficient permissions, or invalid range format
|
|
122
122
|
ValueError: If the spreadsheet_id is empty or invalid
|
|
123
|
-
|
|
123
|
+
|
|
124
124
|
Tags:
|
|
125
125
|
get, batch, read, spreadsheet, values
|
|
126
126
|
"""
|
|
@@ -144,11 +144,11 @@ class GoogleSheetApp(APIApplication):
|
|
|
144
144
|
response_ranges: list[str] | None = None,
|
|
145
145
|
) -> dict[str, Any]:
|
|
146
146
|
"""
|
|
147
|
-
Inserts
|
|
148
|
-
|
|
147
|
+
Inserts empty rows or columns at a specified index, shifting existing content. Unlike `append_dimensions`, which adds to the end, this function is used to insert space within the data grid. Returns the API response containing update details.
|
|
148
|
+
|
|
149
149
|
This function inserts empty rows or columns at a specified location, shifting existing content.
|
|
150
150
|
Use this when you need to add rows/columns in the middle of your data.
|
|
151
|
-
|
|
151
|
+
|
|
152
152
|
Args:
|
|
153
153
|
spreadsheet_id: The ID of the spreadsheet to update. Example: "abc123spreadsheetId"
|
|
154
154
|
sheet_id: The ID of the sheet where the dimensions will be inserted. Example: 0
|
|
@@ -159,14 +159,14 @@ class GoogleSheetApp(APIApplication):
|
|
|
159
159
|
include_spreadsheet_in_response: True if the updated spreadsheet should be included in the response. Example: True
|
|
160
160
|
response_include_grid_data: True if grid data should be included in the response (if includeSpreadsheetInResponse is true). Example: True
|
|
161
161
|
response_ranges: Limits the ranges of the spreadsheet to include in the response. Example: ["Sheet1!A1:B10"]
|
|
162
|
-
|
|
162
|
+
|
|
163
163
|
Returns:
|
|
164
164
|
A dictionary containing the Google Sheets API response with update details
|
|
165
|
-
|
|
165
|
+
|
|
166
166
|
Raises:
|
|
167
167
|
HTTPError: When the API request fails due to invalid parameters or insufficient permissions
|
|
168
168
|
ValueError: When spreadsheet_id is empty or dimension is not "ROWS" or "COLUMNS"
|
|
169
|
-
|
|
169
|
+
|
|
170
170
|
Tags:
|
|
171
171
|
insert, modify, spreadsheet, rows, columns, dimensions, important
|
|
172
172
|
"""
|
|
@@ -223,24 +223,24 @@ class GoogleSheetApp(APIApplication):
|
|
|
223
223
|
length: int,
|
|
224
224
|
) -> dict[str, Any]:
|
|
225
225
|
"""
|
|
226
|
-
|
|
227
|
-
|
|
226
|
+
Adds a specified number of empty rows or columns to the end of a designated sheet. Unlike `insert_dimensions`, which adds dimensions at a specific index, this function exclusively extends the sheet's boundaries at the bottom or to the right without affecting existing content.
|
|
227
|
+
|
|
228
228
|
This function adds empty rows or columns to the end of the sheet without affecting existing content.
|
|
229
229
|
Use this when you need to extend the sheet with additional space at the bottom or right.
|
|
230
|
-
|
|
230
|
+
|
|
231
231
|
Args:
|
|
232
232
|
spreadsheet_id: The unique identifier of the Google Spreadsheet to modify
|
|
233
233
|
sheet_id: The ID of the sheet within the spreadsheet (0 for first sheet)
|
|
234
234
|
dimension: The type of dimension to append - "ROWS" or "COLUMNS"
|
|
235
235
|
length: The number of rows or columns to append to the end
|
|
236
|
-
|
|
236
|
+
|
|
237
237
|
Returns:
|
|
238
238
|
A dictionary containing the Google Sheets API response with update details
|
|
239
|
-
|
|
239
|
+
|
|
240
240
|
Raises:
|
|
241
241
|
HTTPError: When the API request fails due to invalid parameters or insufficient permissions
|
|
242
242
|
ValueError: When spreadsheet_id is empty, dimension is not "ROWS" or "COLUMNS", or length is not positive
|
|
243
|
-
|
|
243
|
+
|
|
244
244
|
Tags:
|
|
245
245
|
append, modify, spreadsheet, rows, columns, dimensions, important
|
|
246
246
|
"""
|
|
@@ -282,9 +282,8 @@ class GoogleSheetApp(APIApplication):
|
|
|
282
282
|
response_ranges: list[str] | None = None,
|
|
283
283
|
) -> dict[str, Any]:
|
|
284
284
|
"""
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
285
|
+
Deletes a specified range of rows or columns from a sheet, permanently removing them and shifting subsequent cells. This alters the sheet's structure, unlike `clear_values` which only removes cell content. It complements `insert_dimensions` and `append_dimensions` for structural modifications.
|
|
286
|
+
|
|
288
287
|
Args:
|
|
289
288
|
spreadsheet_id: The ID of the spreadsheet. Example: "abc123xyz789"
|
|
290
289
|
sheet_id: The ID of the sheet from which to delete the dimension. Example: 0 for first sheet
|
|
@@ -294,14 +293,14 @@ class GoogleSheetApp(APIApplication):
|
|
|
294
293
|
include_spreadsheet_in_response: Determines if the update response should include the spreadsheet resource. Example: True
|
|
295
294
|
response_include_grid_data: True if grid data should be returned. This parameter is ignored if a field mask was set in the request. Example: True
|
|
296
295
|
response_ranges: Limits the ranges of cells included in the response spreadsheet. Example: ["Sheet1!A1:B2", "Sheet2!C:C"]
|
|
297
|
-
|
|
296
|
+
|
|
298
297
|
Returns:
|
|
299
298
|
A dictionary containing the Google Sheets API response with update details
|
|
300
|
-
|
|
299
|
+
|
|
301
300
|
Raises:
|
|
302
301
|
HTTPError: When the API request fails due to invalid parameters or insufficient permissions
|
|
303
302
|
ValueError: When spreadsheet_id is empty, dimension is not "ROWS" or "COLUMNS", or indices are invalid
|
|
304
|
-
|
|
303
|
+
|
|
305
304
|
Tags:
|
|
306
305
|
delete, modify, spreadsheet, rows, columns, dimensions, important
|
|
307
306
|
"""
|
|
@@ -372,8 +371,8 @@ class GoogleSheetApp(APIApplication):
|
|
|
372
371
|
responseIncludeGridData: bool = False,
|
|
373
372
|
) -> dict[str, Any]:
|
|
374
373
|
"""
|
|
375
|
-
Adds a new
|
|
376
|
-
|
|
374
|
+
Adds a new worksheet (tab) to an existing Google Spreadsheet. Allows customization of the new sheet's properties, including its title, index position, size (rows/columns), and visibility. This differs from `create_spreadsheet`, which creates a new spreadsheet file entirely.
|
|
375
|
+
|
|
377
376
|
Args:
|
|
378
377
|
spreadsheetId: The ID of the spreadsheet to add the sheet to. This is the long string of characters in the URL of your Google Sheet. Example: "abc123xyz789"
|
|
379
378
|
title: The name of the sheet. Example: "Q3 Report"
|
|
@@ -392,14 +391,14 @@ class GoogleSheetApp(APIApplication):
|
|
|
392
391
|
columnGroupControlAfter: True if the column group control toggle is shown after the group, false if before.
|
|
393
392
|
includeSpreadsheetInResponse: Whether the response should include the entire spreadsheet resource. Defaults to false.
|
|
394
393
|
responseIncludeGridData: True if grid data should be returned. This parameter is ignored if includeSpreadsheetInResponse is false. Defaults to false.
|
|
395
|
-
|
|
394
|
+
|
|
396
395
|
Returns:
|
|
397
396
|
A dictionary containing the Google Sheets API response with the new sheet details
|
|
398
|
-
|
|
397
|
+
|
|
399
398
|
Raises:
|
|
400
399
|
HTTPError: When the API request fails due to invalid parameters or insufficient permissions
|
|
401
400
|
ValueError: When spreadsheet_id is empty or invalid parameters are provided
|
|
402
|
-
|
|
401
|
+
|
|
403
402
|
Tags:
|
|
404
403
|
add, sheet, spreadsheet, create
|
|
405
404
|
"""
|
|
@@ -492,11 +491,11 @@ class GoogleSheetApp(APIApplication):
|
|
|
492
491
|
y_axis_title: str | None = None,
|
|
493
492
|
) -> dict[str, Any]:
|
|
494
493
|
"""
|
|
495
|
-
Adds
|
|
496
|
-
|
|
494
|
+
Adds various axis-based charts (e.g., column, bar, line, area) to a spreadsheet from specified data ranges. The chart can be placed on a new sheet or positioned on an existing one. This is distinct from `add_pie_chart`, which creates proportional visualizations instead of axis-based charts.
|
|
495
|
+
|
|
497
496
|
This function creates various types of charts from the specified data ranges and places it in a new sheet or existing sheet.
|
|
498
497
|
Use this when you need to visualize data in different chart formats.
|
|
499
|
-
|
|
498
|
+
|
|
500
499
|
Args:
|
|
501
500
|
spreadsheet_id: The unique identifier of the Google Spreadsheet to modify
|
|
502
501
|
source_sheet_id: The ID of the sheet containing the source data
|
|
@@ -508,14 +507,14 @@ class GoogleSheetApp(APIApplication):
|
|
|
508
507
|
chart_position: Optional positioning for chart when new_sheet=False. Example: {"overlayPosition": {"anchorCell": {"sheetId": 0, "rowIndex": 10, "columnIndex": 5}, "offsetXPixels": 0, "offsetYPixels": 0, "widthPixels": 600, "heightPixels": 400}}
|
|
509
508
|
x_axis_title: Optional title for the X-axis (bottom axis). If not provided, defaults to "Categories"
|
|
510
509
|
y_axis_title: Optional title for the Y-axis (left axis). If not provided, defaults to "Values"
|
|
511
|
-
|
|
510
|
+
|
|
512
511
|
Returns:
|
|
513
512
|
A dictionary containing the Google Sheets API response with the chart details
|
|
514
|
-
|
|
513
|
+
|
|
515
514
|
Raises:
|
|
516
515
|
HTTPError: When the API request fails due to invalid parameters or insufficient permissions
|
|
517
516
|
ValueError: When spreadsheet_id is empty or invalid parameters are provided
|
|
518
|
-
|
|
517
|
+
|
|
519
518
|
Tags:
|
|
520
519
|
add, chart, basic-chart, visualization
|
|
521
520
|
"""
|
|
@@ -639,11 +638,11 @@ class GoogleSheetApp(APIApplication):
|
|
|
639
638
|
pie_hole: float | None = None,
|
|
640
639
|
) -> dict[str, Any]:
|
|
641
640
|
"""
|
|
642
|
-
Adds a pie chart to a Google Spreadsheet.
|
|
643
|
-
|
|
641
|
+
Adds a pie or donut chart to a Google Spreadsheet from a specified data range. Unlike the more general `add_basic_chart`, this function is specialized for visualizing data as proportions of a whole and supports pie-specific options like creating a donut chart via the `pie_hole` parameter.
|
|
642
|
+
|
|
644
643
|
This function creates a pie chart from the specified data range and places it in a new sheet or existing sheet.
|
|
645
644
|
Use this when you need to visualize data as proportions of a whole.
|
|
646
|
-
|
|
645
|
+
|
|
647
646
|
Args:
|
|
648
647
|
spreadsheet_id: The unique identifier of the Google Spreadsheet to modify
|
|
649
648
|
source_sheet_id: The ID of the sheet containing the source data
|
|
@@ -653,14 +652,14 @@ class GoogleSheetApp(APIApplication):
|
|
|
653
652
|
chart_position: Optional positioning for chart when new_sheet=False. Example: {"overlayPosition": {"anchorCell": {"sheetId": 0, "rowIndex": 10, "columnIndex": 5}, "offsetXPixels": 0, "offsetYPixels": 0, "widthPixels": 600, "heightPixels": 400}}
|
|
654
653
|
legend_position: Position of the legend. Options: "BOTTOM_LEGEND", "LEFT_LEGEND", "RIGHT_LEGEND", "TOP_LEGEND", "NO_LEGEND"
|
|
655
654
|
pie_hole: Optional hole size for creating a donut chart (0.0 to 1.0). 0.0 = solid pie, 0.5 = 50% hole
|
|
656
|
-
|
|
655
|
+
|
|
657
656
|
Returns:
|
|
658
657
|
A dictionary containing the Google Sheets API response with the chart details
|
|
659
|
-
|
|
658
|
+
|
|
660
659
|
Raises:
|
|
661
660
|
HTTPError: When the API request fails due to invalid parameters or insufficient permissions
|
|
662
661
|
ValueError: When spreadsheet_id is empty or invalid parameters are provided
|
|
663
|
-
|
|
662
|
+
|
|
664
663
|
Tags:
|
|
665
664
|
add, chart, pie, visualization
|
|
666
665
|
"""
|
|
@@ -759,11 +758,11 @@ class GoogleSheetApp(APIApplication):
|
|
|
759
758
|
column_properties: list[dict] | None = None,
|
|
760
759
|
) -> dict[str, Any]:
|
|
761
760
|
"""
|
|
762
|
-
|
|
763
|
-
|
|
761
|
+
Creates a structured table within a specified range on a Google Sheet. Defines the table's name, ID, and dimensions, and can optionally configure column properties like data types and validation rules. This action creates a formal table object, distinct from functions that only write cell values.
|
|
762
|
+
|
|
764
763
|
This function creates a table with specified properties and column types.
|
|
765
764
|
Use this when you need to create structured data with headers, footers, and column types.
|
|
766
|
-
|
|
765
|
+
|
|
767
766
|
Args:
|
|
768
767
|
spreadsheet_id: The unique identifier of the Google Spreadsheet to modify
|
|
769
768
|
sheet_id: The ID of the sheet where the table will be created
|
|
@@ -776,11 +775,11 @@ class GoogleSheetApp(APIApplication):
|
|
|
776
775
|
column_properties: Optional list of column properties with types and validation rules. Valid column types: "TEXT", "PERCENT", "DROPDOWN", "DOUBLE", "CURRENCY", "DATE", "TIME", "DATE_TIME". Example: [{"columnIndex": 0, "columnName": "Model Number", "columnType": "TEXT"}, {"columnIndex": 1, "columnName": "Sales - Jan", "columnType": "DOUBLE"}, {"columnIndex": 2, "columnName": "Price", "columnType": "CURRENCY"}, {"columnIndex": 3, "columnName": "Progress", "columnType": "PERCENT"}, {"columnIndex": 4, "columnName": "Created Date", "columnType": "DATE"}, {"columnIndex": 5, "columnName": "Status", "columnType": "DROPDOWN", "dataValidationRule": {"condition": {"type": "ONE_OF_LIST", "values": [{"userEnteredValue": "Active"}, {"userEnteredValue": "Inactive"}]}}}]
|
|
777
776
|
Returns:
|
|
778
777
|
A dictionary containing the Google Sheets API response with the table details
|
|
779
|
-
|
|
778
|
+
|
|
780
779
|
Raises:
|
|
781
780
|
HTTPError: When the API request fails due to invalid parameters or insufficient permissions
|
|
782
781
|
ValueError: When spreadsheet_id is empty or invalid parameters are provided
|
|
783
|
-
|
|
782
|
+
|
|
784
783
|
Tags:
|
|
785
784
|
add, table, structured-data
|
|
786
785
|
"""
|
|
@@ -865,11 +864,11 @@ class GoogleSheetApp(APIApplication):
|
|
|
865
864
|
column_properties: list[dict] | None = None,
|
|
866
865
|
) -> dict[str, Any]:
|
|
867
866
|
"""
|
|
868
|
-
|
|
869
|
-
|
|
867
|
+
Modifies properties of an existing table within a Google Sheet, such as its name, data range, or column specifications. This function updates the table's structural metadata, distinguishing it from `update_values` which alters the cell data within the table's range.
|
|
868
|
+
|
|
870
869
|
This function modifies table properties such as name, range, and column properties.
|
|
871
870
|
Use this when you need to modify an existing table's structure or properties.
|
|
872
|
-
|
|
871
|
+
|
|
873
872
|
Args:
|
|
874
873
|
spreadsheet_id: The unique identifier of the Google Spreadsheet to modify
|
|
875
874
|
table_id: The unique identifier of the table to update
|
|
@@ -879,14 +878,14 @@ class GoogleSheetApp(APIApplication):
|
|
|
879
878
|
start_column_index: Optional new starting column index (0-based)
|
|
880
879
|
end_column_index: Optional new ending column index (exclusive)
|
|
881
880
|
column_properties: Optional list of column properties with types and validation rules. Valid column types: "TEXT", "PERCENT", "DROPDOWN", "DOUBLE", "CURRENCY", "DATE", "TIME", "DATE_TIME". Example: [{"columnIndex": 0, "columnName": "Model Number", "columnType": "TEXT"}, {"columnIndex": 1, "columnName": "Sales - Jan", "columnType": "DOUBLE"}, {"columnIndex": 2, "columnName": "Price", "columnType": "CURRENCY"}, {"columnIndex": 3, "columnName": "Progress", "columnType": "PERCENT"}, {"columnIndex": 4, "columnName": "Created Date", "columnType": "DATE"}, {"columnIndex": 5, "columnName": "Status", "columnType": "DROPDOWN", "dataValidationRule": {"condition": {"type": "ONE_OF_LIST", "values": [{"userEnteredValue": "Active"}, {"userEnteredValue": "Inactive"}]}}}]
|
|
882
|
-
|
|
881
|
+
|
|
883
882
|
Returns:
|
|
884
883
|
A dictionary containing the Google Sheets API response with the updated table details
|
|
885
|
-
|
|
884
|
+
|
|
886
885
|
Raises:
|
|
887
886
|
HTTPError: When the API request fails due to invalid parameters or insufficient permissions
|
|
888
887
|
ValueError: When spreadsheet_id or table_id is empty or invalid parameters are provided
|
|
889
|
-
|
|
888
|
+
|
|
890
889
|
Tags:
|
|
891
890
|
update, table, modify, structured-data
|
|
892
891
|
"""
|
|
@@ -998,19 +997,19 @@ class GoogleSheetApp(APIApplication):
|
|
|
998
997
|
|
|
999
998
|
def clear_values(self, spreadsheet_id: str, range: str) -> dict[str, Any]:
|
|
1000
999
|
"""
|
|
1001
|
-
Clears
|
|
1002
|
-
|
|
1000
|
+
Clears data from a single, specified cell range in a Google Sheet while preserving all formatting. Unlike `delete_dimensions`, it only removes content, not the cells themselves. For clearing multiple ranges simultaneously, use the `batch_clear_values` function.
|
|
1001
|
+
|
|
1003
1002
|
Args:
|
|
1004
1003
|
spreadsheet_id: The unique identifier of the Google Spreadsheet to modify
|
|
1005
1004
|
range: The A1 or R1C1 notation range of cells to clear (e.g., 'Sheet1!A1:B2')
|
|
1006
|
-
|
|
1005
|
+
|
|
1007
1006
|
Returns:
|
|
1008
1007
|
A dictionary containing the Google Sheets API response
|
|
1009
|
-
|
|
1008
|
+
|
|
1010
1009
|
Raises:
|
|
1011
1010
|
HttpError: When the API request fails due to invalid spreadsheet_id, invalid range format, or insufficient permissions
|
|
1012
1011
|
ValueError: When spreadsheet_id is empty or range is in invalid format
|
|
1013
|
-
|
|
1012
|
+
|
|
1014
1013
|
Tags:
|
|
1015
1014
|
clear, modify, spreadsheet, api, sheets, data-management, important
|
|
1016
1015
|
"""
|
|
@@ -1026,21 +1025,21 @@ class GoogleSheetApp(APIApplication):
|
|
|
1026
1025
|
value_input_option: str = "RAW",
|
|
1027
1026
|
) -> dict[str, Any]:
|
|
1028
1027
|
"""
|
|
1029
|
-
|
|
1030
|
-
|
|
1028
|
+
Overwrites cell values within a specific A1 notation range in a Google Spreadsheet. This function replaces existing data with the provided values, differing from `append_values` which adds new rows. It provides a direct method for targeted data replacement in a predefined area of the sheet.
|
|
1029
|
+
|
|
1031
1030
|
Args:
|
|
1032
1031
|
spreadsheet_id: The unique identifier of the target Google Spreadsheet
|
|
1033
1032
|
range: The A1 notation range where values will be updated (e.g., 'Sheet1!A1:B2')
|
|
1034
1033
|
values: A list of lists containing the data to write, where each inner list represents a row of values
|
|
1035
1034
|
value_input_option: Determines how input data should be interpreted: 'RAW' (as-is) or 'USER_ENTERED' (parsed as UI input). Defaults to 'RAW'
|
|
1036
|
-
|
|
1035
|
+
|
|
1037
1036
|
Returns:
|
|
1038
1037
|
A dictionary containing the Google Sheets API response with update details
|
|
1039
|
-
|
|
1038
|
+
|
|
1040
1039
|
Raises:
|
|
1041
1040
|
RequestError: When the API request fails due to invalid parameters or network issues
|
|
1042
1041
|
AuthenticationError: When authentication with the Google Sheets API fails
|
|
1043
|
-
|
|
1042
|
+
|
|
1044
1043
|
Tags:
|
|
1045
1044
|
update, write, sheets, api, important, data-modification, google-sheets
|
|
1046
1045
|
"""
|
|
@@ -1056,19 +1055,19 @@ class GoogleSheetApp(APIApplication):
|
|
|
1056
1055
|
ranges: list[str],
|
|
1057
1056
|
) -> dict[str, Any]:
|
|
1058
1057
|
"""
|
|
1059
|
-
|
|
1060
|
-
|
|
1058
|
+
Clears cell values from multiple specified ranges in a single batch operation, preserving existing formatting. Unlike `clear_values`, which handles a single range, this method efficiently processes a list of ranges at once, removing only the content and not the cells themselves.
|
|
1059
|
+
|
|
1061
1060
|
Args:
|
|
1062
1061
|
spreadsheet_id: The ID of the spreadsheet to update. Example: "1q2w3e4r5t6y7u8i9o0p"
|
|
1063
1062
|
ranges: The ranges to clear, in A1 notation or R1C1 notation. Example: ["Sheet1!A1:B2", "Sheet1!C3:D4"]
|
|
1064
|
-
|
|
1063
|
+
|
|
1065
1064
|
Returns:
|
|
1066
1065
|
A dictionary containing the Google Sheets API response with clear details
|
|
1067
|
-
|
|
1066
|
+
|
|
1068
1067
|
Raises:
|
|
1069
1068
|
HTTPError: When the API request fails due to invalid parameters or insufficient permissions
|
|
1070
1069
|
ValueError: When spreadsheet_id is empty or ranges is empty
|
|
1071
|
-
|
|
1070
|
+
|
|
1072
1071
|
Tags:
|
|
1073
1072
|
clear, batch, values, spreadsheet
|
|
1074
1073
|
"""
|
|
@@ -1094,8 +1093,8 @@ class GoogleSheetApp(APIApplication):
|
|
|
1094
1093
|
date_time_render_option: str | None = None,
|
|
1095
1094
|
) -> dict[str, Any]:
|
|
1096
1095
|
"""
|
|
1097
|
-
|
|
1098
|
-
|
|
1096
|
+
Retrieves values from spreadsheet ranges matching a list of data filters. This method provides dynamic, criteria-based selection using A1 notation or grid coordinates, unlike `batch_get_values` which uses a simple list of range strings. It is ideal for fetching multiple, specific datasets in one request.
|
|
1097
|
+
|
|
1099
1098
|
Args:
|
|
1100
1099
|
spreadsheet_id: The ID of the spreadsheet to retrieve data from. Example: "1q2w3e4r5t6y7u8i9o0p"
|
|
1101
1100
|
data_filters: The data filters used to match the ranges of values to retrieve. Ranges that match any of the specified data filters are included in the response. Each filter can contain:
|
|
@@ -1104,14 +1103,14 @@ class GoogleSheetApp(APIApplication):
|
|
|
1104
1103
|
major_dimension: The major dimension that results should use. For example, if the spreadsheet data is: A1=1,B1=2,A2=3,B2=4, then a request that selects that range and sets majorDimension=ROWS returns [[1,2],[3,4]], whereas a request that sets majorDimension=COLUMNS returns [[1,3],[2,4]]. Options: "ROWS" or "COLUMNS". Example: "ROWS"
|
|
1105
1104
|
value_render_option: How values should be represented in the output. The default render option is FORMATTED_VALUE. Options: "FORMATTED_VALUE", "UNFORMATTED_VALUE", or "FORMULA". Example: "FORMATTED_VALUE"
|
|
1106
1105
|
date_time_render_option: How dates, times, and durations should be represented in the output. This is ignored if valueRenderOption is FORMATTED_VALUE. The default dateTime render option is SERIAL_NUMBER. Options: "SERIAL_NUMBER" or "FORMATTED_STRING". Example: "SERIAL_NUMBER"
|
|
1107
|
-
|
|
1106
|
+
|
|
1108
1107
|
Returns:
|
|
1109
1108
|
A dictionary containing the filtered values that match the specified data filters
|
|
1110
|
-
|
|
1109
|
+
|
|
1111
1110
|
Raises:
|
|
1112
1111
|
HTTPError: When the API request fails due to invalid parameters or insufficient permissions
|
|
1113
1112
|
ValueError: When spreadsheet_id is empty or data_filters is empty
|
|
1114
|
-
|
|
1113
|
+
|
|
1115
1114
|
Tags:
|
|
1116
1115
|
get, batch, data-filter, values, spreadsheet
|
|
1117
1116
|
"""
|
|
@@ -1162,28 +1161,28 @@ class GoogleSheetApp(APIApplication):
|
|
|
1162
1161
|
response = self._post(url, data=request_body)
|
|
1163
1162
|
return self._handle_response(response)
|
|
1164
1163
|
|
|
1165
|
-
def
|
|
1164
|
+
def copy_sheet_to_spreadsheet(
|
|
1166
1165
|
self,
|
|
1167
1166
|
spreadsheet_id: str,
|
|
1168
1167
|
sheet_id: int,
|
|
1169
1168
|
destination_spreadsheet_id: str,
|
|
1170
1169
|
) -> dict[str, Any]:
|
|
1171
1170
|
"""
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1171
|
+
Copies a specific sheet, including all its data and formatting, from a source spreadsheet to a different destination spreadsheet. This action duplicates an entire worksheet into another workbook, returning the properties of the newly created sheet in the API response.
|
|
1172
|
+
|
|
1173
|
+
|
|
1175
1174
|
Args:
|
|
1176
1175
|
spreadsheet_id: The ID of the spreadsheet containing the sheet to copy. Example: "1qZ_..."
|
|
1177
1176
|
sheet_id: The ID of the sheet to copy. Example: 0
|
|
1178
1177
|
destination_spreadsheet_id: The ID of the spreadsheet to copy the sheet to. Example: "2rY_..."
|
|
1179
|
-
|
|
1178
|
+
|
|
1180
1179
|
Returns:
|
|
1181
1180
|
A dictionary containing the Google Sheets API response with copy details
|
|
1182
|
-
|
|
1181
|
+
|
|
1183
1182
|
Raises:
|
|
1184
1183
|
HTTPError: When the API request fails due to invalid parameters or insufficient permissions
|
|
1185
1184
|
ValueError: When any required parameter is empty or invalid
|
|
1186
|
-
|
|
1185
|
+
|
|
1187
1186
|
Tags:
|
|
1188
1187
|
copy, sheet, spreadsheet, duplicate
|
|
1189
1188
|
"""
|
|
@@ -1203,7 +1202,7 @@ class GoogleSheetApp(APIApplication):
|
|
|
1203
1202
|
response = self._post(url, data=request_body)
|
|
1204
1203
|
return self._handle_response(response)
|
|
1205
1204
|
|
|
1206
|
-
def
|
|
1205
|
+
def write_values_to_sheet(
|
|
1207
1206
|
self,
|
|
1208
1207
|
spreadsheet_id: str,
|
|
1209
1208
|
sheet_name: str,
|
|
@@ -1213,9 +1212,8 @@ class GoogleSheetApp(APIApplication):
|
|
|
1213
1212
|
include_values_in_response: bool = False,
|
|
1214
1213
|
) -> dict[str, Any]:
|
|
1215
1214
|
"""
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1215
|
+
Writes a 2D list of values to a sheet, overwriting existing data. Data is written starting from a specified cell, or defaults to cell A1 if no location is provided. This differs from `append_values`, which adds new rows after existing data.
|
|
1216
|
+
|
|
1219
1217
|
Args:
|
|
1220
1218
|
spreadsheet_id: The unique identifier of the Google Sheets spreadsheet to be updated. Example: "1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms"
|
|
1221
1219
|
sheet_name: The name of the specific sheet within the spreadsheet to update. Example: "Sheet1"
|
|
@@ -1223,14 +1221,14 @@ class GoogleSheetApp(APIApplication):
|
|
|
1223
1221
|
first_cell_location: The starting cell for the update range, specified in A1 notation (e.g., 'A1', 'B2'). The update will extend from this cell to the right and down, based on the provided values. If omitted, values are appended to the end of the sheet. Example: "A1"
|
|
1224
1222
|
value_input_option: How input data is interpreted. 'USER_ENTERED': Values parsed as if typed by a user (e.g., strings may become numbers/dates, formulas are calculated); recommended for formulas. 'RAW': Values stored as-is without parsing (e.g., '123' stays string, '=SUM(A1:B1)' stays string). Defaults to 'USER_ENTERED'. Example: "USER_ENTERED"
|
|
1225
1223
|
include_values_in_response: If set to True, the response will include the updated values from the spreadsheet. Defaults to False. Example: True
|
|
1226
|
-
|
|
1224
|
+
|
|
1227
1225
|
Returns:
|
|
1228
1226
|
A dictionary containing the Google Sheets API response with update details
|
|
1229
|
-
|
|
1227
|
+
|
|
1230
1228
|
Raises:
|
|
1231
1229
|
HTTPError: When the API request fails due to invalid parameters or insufficient permissions
|
|
1232
1230
|
ValueError: When spreadsheet_id is empty, sheet_name is empty, or values is empty
|
|
1233
|
-
|
|
1231
|
+
|
|
1234
1232
|
Tags:
|
|
1235
1233
|
batch, update, write, sheets, api, important, data-modification, google-sheets
|
|
1236
1234
|
"""
|
|
@@ -1280,9 +1278,8 @@ class GoogleSheetApp(APIApplication):
|
|
|
1280
1278
|
response_date_time_render_option: str | None = None,
|
|
1281
1279
|
) -> dict[str, Any]:
|
|
1282
1280
|
"""
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1281
|
+
Appends rows of data after a table within a specified range. Unlike `batch_update`, this function can optionally insert new rows, shifting existing data down. This provides more granular control for adding data to a sheet without overwriting existing cells below the target table.
|
|
1282
|
+
|
|
1286
1283
|
Args:
|
|
1287
1284
|
spreadsheet_id: The ID of the spreadsheet to update. Example: "1q0gLhLdGXYZblahblahblah"
|
|
1288
1285
|
range: The A1 notation of a range to search for a logical table of data. Values are appended after the last row of the table. Example: "Sheet1!A1:B2"
|
|
@@ -1292,14 +1289,14 @@ class GoogleSheetApp(APIApplication):
|
|
|
1292
1289
|
include_values_in_response: Determines if the update response should include the values of the cells that were appended. By default, responses do not include the updated values. Example: True
|
|
1293
1290
|
response_value_render_option: Determines how values in the response should be rendered. The default render option is FORMATTED_VALUE. Options: "FORMATTED_VALUE", "UNFORMATTED_VALUE", or "FORMULA". Example: "FORMATTED_VALUE"
|
|
1294
1291
|
response_date_time_render_option: Determines how dates, times, and durations in the response should be rendered. This is ignored if responseValueRenderOption is FORMATTED_VALUE. The default dateTime render option is SERIAL_NUMBER. Options: "SERIAL_NUMBER" or "FORMATTED_STRING". Example: "SERIAL_NUMBER"
|
|
1295
|
-
|
|
1292
|
+
|
|
1296
1293
|
Returns:
|
|
1297
1294
|
A dictionary containing the Google Sheets API response with append details
|
|
1298
|
-
|
|
1295
|
+
|
|
1299
1296
|
Raises:
|
|
1300
1297
|
HTTPError: When the API request fails due to invalid parameters or insufficient permissions
|
|
1301
1298
|
ValueError: When required parameters are empty or invalid
|
|
1302
|
-
|
|
1299
|
+
|
|
1303
1300
|
Tags:
|
|
1304
1301
|
append, values, spreadsheet, data, important
|
|
1305
1302
|
"""
|
|
@@ -1374,19 +1371,19 @@ class GoogleSheetApp(APIApplication):
|
|
|
1374
1371
|
sheet_id: int,
|
|
1375
1372
|
) -> dict[str, Any]:
|
|
1376
1373
|
"""
|
|
1377
|
-
|
|
1378
|
-
|
|
1374
|
+
Removes the basic filter from a specified sheet within a Google Spreadsheet. This action clears any active sorting or filtering criteria, restoring the default data view. It is the direct counterpart to the `set_basic_filter` function.
|
|
1375
|
+
|
|
1379
1376
|
Args:
|
|
1380
1377
|
spreadsheet_id: The ID of the spreadsheet. Example: "abc123xyz789"
|
|
1381
1378
|
sheet_id: The ID of the sheet on which the basic filter should be cleared. Example: 0
|
|
1382
|
-
|
|
1379
|
+
|
|
1383
1380
|
Returns:
|
|
1384
1381
|
A dictionary containing the Google Sheets API response with update details
|
|
1385
|
-
|
|
1382
|
+
|
|
1386
1383
|
Raises:
|
|
1387
1384
|
HTTPError: When the API request fails due to invalid parameters or insufficient permissions
|
|
1388
1385
|
ValueError: When spreadsheet_id is empty or sheet_id is negative
|
|
1389
|
-
|
|
1386
|
+
|
|
1390
1387
|
Tags:
|
|
1391
1388
|
clear, filter, basic-filter, spreadsheet
|
|
1392
1389
|
"""
|
|
@@ -1409,19 +1406,19 @@ class GoogleSheetApp(APIApplication):
|
|
|
1409
1406
|
sheet_id: int,
|
|
1410
1407
|
) -> dict[str, Any]:
|
|
1411
1408
|
"""
|
|
1412
|
-
|
|
1413
|
-
|
|
1409
|
+
Permanently deletes a specific sheet (worksheet) from a Google Spreadsheet using its sheet ID. This operation removes the target sheet and all its contents, acting as the direct counterpart to the `add_sheet` function which creates new sheets within a spreadsheet.
|
|
1410
|
+
|
|
1414
1411
|
Args:
|
|
1415
1412
|
spreadsheet_id: The ID of the spreadsheet from which to delete the sheet. Example: "abc123xyz789"
|
|
1416
1413
|
sheet_id: The ID of the sheet to delete. If the sheet is of DATA_SOURCE type, the associated DataSource is also deleted. Example: 123456789
|
|
1417
|
-
|
|
1414
|
+
|
|
1418
1415
|
Returns:
|
|
1419
1416
|
A dictionary containing the Google Sheets API response with update details
|
|
1420
|
-
|
|
1417
|
+
|
|
1421
1418
|
Raises:
|
|
1422
1419
|
HTTPError: When the API request fails due to invalid parameters or insufficient permissions
|
|
1423
1420
|
ValueError: When spreadsheet_id is empty or sheet_id is negative
|
|
1424
|
-
|
|
1421
|
+
|
|
1425
1422
|
Tags:
|
|
1426
1423
|
delete, sheet, spreadsheet, worksheet
|
|
1427
1424
|
"""
|
|
@@ -1438,7 +1435,7 @@ class GoogleSheetApp(APIApplication):
|
|
|
1438
1435
|
response = self._post(url, data=request_body)
|
|
1439
1436
|
return self._handle_response(response)
|
|
1440
1437
|
|
|
1441
|
-
def
|
|
1438
|
+
def discover_tables(
|
|
1442
1439
|
self,
|
|
1443
1440
|
spreadsheet_id: str,
|
|
1444
1441
|
min_rows: int = 2,
|
|
@@ -1446,21 +1443,21 @@ class GoogleSheetApp(APIApplication):
|
|
|
1446
1443
|
min_confidence: float = 0.5,
|
|
1447
1444
|
) -> dict[str, Any]:
|
|
1448
1445
|
"""
|
|
1449
|
-
|
|
1450
|
-
|
|
1446
|
+
Discovers and lists all table-like data structures within a Google Spreadsheet. It heuristically analyzes each sheet to identify headers and data boundaries, returning tables that meet specified size and confidence criteria. This is distinct from listing formally defined tables.
|
|
1447
|
+
|
|
1451
1448
|
Args:
|
|
1452
1449
|
spreadsheet_id: Google Sheets ID from the URL (e.g., '1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms'). Example: "1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms"
|
|
1453
1450
|
min_rows: Minimum number of data rows to consider a valid table. Example: 2
|
|
1454
1451
|
min_columns: Minimum number of columns to consider a valid table. Example: 1
|
|
1455
1452
|
min_confidence: Minimum confidence score (0.0-1.0) to consider a valid table. Example: 0.5
|
|
1456
|
-
|
|
1453
|
+
|
|
1457
1454
|
Returns:
|
|
1458
1455
|
A dictionary containing the list of discovered tables with their properties
|
|
1459
|
-
|
|
1456
|
+
|
|
1460
1457
|
Raises:
|
|
1461
1458
|
HTTPError: When the API request fails due to invalid parameters or insufficient permissions
|
|
1462
1459
|
ValueError: When spreadsheet_id is empty or parameters are invalid
|
|
1463
|
-
|
|
1460
|
+
|
|
1464
1461
|
Tags:
|
|
1465
1462
|
list, tables, discover, analyze, spreadsheet, important
|
|
1466
1463
|
"""
|
|
@@ -1509,7 +1506,7 @@ class GoogleSheetApp(APIApplication):
|
|
|
1509
1506
|
},
|
|
1510
1507
|
}
|
|
1511
1508
|
|
|
1512
|
-
def
|
|
1509
|
+
def analyze_table_schema(
|
|
1513
1510
|
self,
|
|
1514
1511
|
spreadsheet_id: str,
|
|
1515
1512
|
table_name: str,
|
|
@@ -1517,23 +1514,21 @@ class GoogleSheetApp(APIApplication):
|
|
|
1517
1514
|
sample_size: int = 50,
|
|
1518
1515
|
) -> dict[str, Any]:
|
|
1519
1516
|
"""
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
Call this action after calling the list tables action to get the schema of a table in a spreadsheet.
|
|
1523
|
-
|
|
1517
|
+
Infers the schema for a specific table within a Google Sheet by analyzing a sample of its data. After locating the table by name (as discovered by `list_tables`), it determines the most likely data type and properties for each column.
|
|
1518
|
+
|
|
1524
1519
|
Args:
|
|
1525
1520
|
spreadsheet_id: Google Sheets ID from the URL (e.g., '1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms')
|
|
1526
1521
|
table_name: Specific table name from LIST_TABLES response (e.g., 'Sales_Data', 'Employee_List'). Use 'auto' to analyze the largest/most prominent table
|
|
1527
1522
|
sheet_name: Sheet/tab name if table_name is ambiguous across multiple sheets
|
|
1528
1523
|
sample_size: Number of rows to sample for type inference (1-1000, default 50)
|
|
1529
|
-
|
|
1524
|
+
|
|
1530
1525
|
Returns:
|
|
1531
1526
|
A dictionary containing the table schema with column names, types, and constraints
|
|
1532
|
-
|
|
1527
|
+
|
|
1533
1528
|
Raises:
|
|
1534
1529
|
HTTPError: When the API request fails due to invalid parameters or insufficient permissions
|
|
1535
1530
|
ValueError: When spreadsheet_id is empty, table_name is empty, or sample_size is invalid
|
|
1536
|
-
|
|
1531
|
+
|
|
1537
1532
|
Tags:
|
|
1538
1533
|
schema, analyze, table, structure, types, columns
|
|
1539
1534
|
"""
|
|
@@ -1600,8 +1595,8 @@ class GoogleSheetApp(APIApplication):
|
|
|
1600
1595
|
filter: dict,
|
|
1601
1596
|
) -> dict[str, Any]:
|
|
1602
1597
|
"""
|
|
1603
|
-
|
|
1604
|
-
|
|
1598
|
+
Sets or updates a basic filter on a specified range within a sheet, enabling data sorting and filtering. The filter's target range and optional sort specifications are defined in a dictionary argument. It is the counterpart to `clear_basic_filter`, which removes an existing filter.
|
|
1599
|
+
|
|
1605
1600
|
Args:
|
|
1606
1601
|
spreadsheet_id: The ID of the spreadsheet. Example: "abc123xyz789"
|
|
1607
1602
|
filter: The filter to set. This parameter is required. Contains:
|
|
@@ -1614,14 +1609,14 @@ class GoogleSheetApp(APIApplication):
|
|
|
1614
1609
|
- sortSpecs: The sort specifications for the filter (optional)
|
|
1615
1610
|
- dimensionIndex: The dimension the sort should be applied to
|
|
1616
1611
|
- sortOrder: The order data should be sorted ("ASCENDING", "DESCENDING", "SORT_ORDER_UNSPECIFIED")
|
|
1617
|
-
|
|
1612
|
+
|
|
1618
1613
|
Returns:
|
|
1619
1614
|
A dictionary containing the Google Sheets API response with filter details
|
|
1620
|
-
|
|
1615
|
+
|
|
1621
1616
|
Raises:
|
|
1622
1617
|
HTTPError: When the API request fails due to invalid parameters or insufficient permissions
|
|
1623
1618
|
ValueError: When spreadsheet_id is empty or filter is missing required fields
|
|
1624
|
-
|
|
1619
|
+
|
|
1625
1620
|
Tags:
|
|
1626
1621
|
filter, basic-filter, spreadsheet, sort, important
|
|
1627
1622
|
"""
|
|
@@ -1686,10 +1681,8 @@ class GoogleSheetApp(APIApplication):
|
|
|
1686
1681
|
mergeCells: bool = False,
|
|
1687
1682
|
) -> dict[str, Any]:
|
|
1688
1683
|
"""
|
|
1689
|
-
Applies comprehensive
|
|
1690
|
-
|
|
1691
|
-
alignment, number formats, text wrapping, and cell merging.
|
|
1692
|
-
|
|
1684
|
+
Applies comprehensive formatting to a specified cell range in a worksheet. It modifies visual properties like text style, color, alignment, borders, and can merge cells, without altering the underlying cell values.
|
|
1685
|
+
|
|
1693
1686
|
Args:
|
|
1694
1687
|
spreadsheetId: Identifier of the Google Sheets spreadsheet. Example: "1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms"
|
|
1695
1688
|
worksheetId: ID (sheetId) of the worksheet. Use `get_spreadsheet` to find this ID. Example: 123456789
|
|
@@ -1697,44 +1690,44 @@ class GoogleSheetApp(APIApplication):
|
|
|
1697
1690
|
startColumnIndex: 0-based index of the first column in the range. Example: 0
|
|
1698
1691
|
endRowIndex: 0-based index of the row *after* the last row in the range (exclusive). Example: 1
|
|
1699
1692
|
endColumnIndex: 0-based index of the column *after* the last column in the range (exclusive). Example: 2
|
|
1700
|
-
|
|
1701
|
-
|
|
1693
|
+
|
|
1694
|
+
|
|
1702
1695
|
bold: Apply bold formatting. Example: True
|
|
1703
1696
|
italic: Apply italic formatting. Example: False
|
|
1704
1697
|
underline: Apply underline formatting. Example: False
|
|
1705
1698
|
strikethrough: Apply strikethrough formatting. Example: False
|
|
1706
1699
|
fontSize: Font size in points. Example: 12
|
|
1707
1700
|
fontFamily: Font family name. Example: "Arial", "Times New Roman"
|
|
1708
|
-
|
|
1701
|
+
|
|
1709
1702
|
backgroundRed: Red component of background color. Example: 0.9
|
|
1710
1703
|
backgroundGreen: Green component of background color. Example: 0.9
|
|
1711
1704
|
backgroundBlue: Blue component of background color. Example: 0.9
|
|
1712
|
-
|
|
1705
|
+
|
|
1713
1706
|
textRed: Red component of text color. Example: 0.0
|
|
1714
1707
|
textGreen: Green component of text color. Example: 0.0
|
|
1715
1708
|
textBlue: Blue component of text color. Example: 0.0
|
|
1716
|
-
|
|
1709
|
+
|
|
1717
1710
|
horizontalAlignment: "LEFT", "CENTER", or "RIGHT". Example: "CENTER"
|
|
1718
1711
|
verticalAlignment: "TOP", "MIDDLE", or "BOTTOM". Example: "MIDDLE"
|
|
1719
|
-
|
|
1712
|
+
|
|
1720
1713
|
wrapStrategy: "OVERFLOW_CELL", "LEGACY_WRAP", "CLIP", or "WRAP". Example: "WRAP"
|
|
1721
|
-
|
|
1714
|
+
|
|
1722
1715
|
numberFormat: Number format string. Example: "#,##0.00", "0.00%", "$#,##0.00"
|
|
1723
|
-
|
|
1716
|
+
|
|
1724
1717
|
borderTop: Top border settings. Example: {"style": "SOLID", "color": {"red": 0, "green": 0, "blue": 0}}
|
|
1725
1718
|
borderBottom: Bottom border settings. Example: {"style": "SOLID", "color": {"red": 0, "green": 0, "blue": 0}}
|
|
1726
1719
|
borderLeft: Left border settings. Example: {"style": "SOLID", "color": {"red": 0, "green": 0, "blue": 0}}
|
|
1727
1720
|
borderRight: Right border settings. Example: {"style": "SOLID", "color": {"red": 0, "green": 0, "blue": 0}}
|
|
1728
|
-
|
|
1721
|
+
|
|
1729
1722
|
mergeCells: Whether to merge the specified range into a single cell. Example: True
|
|
1730
|
-
|
|
1723
|
+
|
|
1731
1724
|
Returns:
|
|
1732
1725
|
A dictionary containing the Google Sheets API response with formatting details
|
|
1733
|
-
|
|
1726
|
+
|
|
1734
1727
|
Raises:
|
|
1735
1728
|
HTTPError: When the API request fails due to invalid parameters or insufficient permissions
|
|
1736
1729
|
ValueError: When spreadsheet_id is empty, indices are invalid, or color values are out of range
|
|
1737
|
-
|
|
1730
|
+
|
|
1738
1731
|
Tags:
|
|
1739
1732
|
format, cells, styling, text-formatting, background-color, borders, alignment, merge
|
|
1740
1733
|
"""
|
|
@@ -1915,28 +1908,28 @@ class GoogleSheetApp(APIApplication):
|
|
|
1915
1908
|
"""Returns a list of methods exposed as tools."""
|
|
1916
1909
|
return [
|
|
1917
1910
|
self.create_spreadsheet,
|
|
1918
|
-
self.
|
|
1919
|
-
self.
|
|
1911
|
+
self.get_spreadsheet_metadata,
|
|
1912
|
+
self.get_values,
|
|
1913
|
+
self.batch_get_values_by_range,
|
|
1920
1914
|
self.insert_dimensions,
|
|
1921
1915
|
self.append_dimensions,
|
|
1922
1916
|
self.delete_dimensions,
|
|
1923
1917
|
self.add_sheet,
|
|
1924
|
-
self.delete_sheet,
|
|
1925
1918
|
self.add_basic_chart,
|
|
1926
1919
|
self.add_pie_chart,
|
|
1927
1920
|
self.add_table,
|
|
1928
1921
|
self.update_table,
|
|
1929
1922
|
self.clear_values,
|
|
1930
1923
|
self.update_values,
|
|
1931
|
-
self.batch_update,
|
|
1932
|
-
self.clear_basic_filter,
|
|
1933
|
-
self.list_tables,
|
|
1934
|
-
self.get_values,
|
|
1935
|
-
self.get_table_schema,
|
|
1936
|
-
self.set_basic_filter,
|
|
1937
|
-
self.copy_to_sheet,
|
|
1938
|
-
self.append_values,
|
|
1939
1924
|
self.batch_clear_values,
|
|
1940
1925
|
self.batch_get_values_by_data_filter,
|
|
1926
|
+
self.copy_sheet_to_spreadsheet,
|
|
1927
|
+
self.write_values_to_sheet,
|
|
1928
|
+
self.append_values,
|
|
1929
|
+
self.clear_basic_filter,
|
|
1930
|
+
self.delete_sheet,
|
|
1931
|
+
self.discover_tables,
|
|
1932
|
+
self.analyze_table_schema,
|
|
1933
|
+
self.set_basic_filter,
|
|
1941
1934
|
self.format_cells,
|
|
1942
1935
|
]
|