Parameter | Type | Default | Description |
---|---|---|---|
scopes | Optional[List[str]] | None | Custom OAuth scopes. If None, uses write scope by default. |
spreadsheet_id | Optional[str] | None | ID of the target spreadsheet. |
spreadsheet_range | Optional[str] | None | Range within the spreadsheet. |
creds | Optional[Credentials] | None | Pre-existing credentials. |
creds_path | Optional[str] | None | Path to credentials file. |
token_path | Optional[str] | None | Path to token file. |
oauth_port | int | 0 | Port to use for OAuth authentication. |
enable_read_sheet | bool | True | Enable reading from a sheet. |
enable_create_sheet | bool | False | Enable creating a sheet. |
enable_update_sheet | bool | False | Enable updating a sheet. |
enable_create_duplicate_sheet | bool | False | Enable creating a duplicate sheet. |
all | bool | False | Enable all tools. |
Function | Description |
---|---|
read_sheet | Read values from a Google Sheet. Parameters include spreadsheet_id (Optional[str]) for fallback spreadsheet ID and spreadsheet_range (Optional[str]) for fallback range. Returns JSON of list of rows. |
create_sheet | Create a new Google Sheet. Parameters include title (str) for the title of the Google Sheet. Returns the ID of the created Google Sheet. |
update_sheet | Update data in a Google Sheet. Parameters include data (List[List[Any]]) for the data to update, spreadsheet_id (Optional[str]) for the ID of the Google Sheet, and range_name (Optional[str]) for the range to update. Returns success or failure message. |
create_duplicate_sheet | Create a duplicate of an existing Google Sheet. Parameters include source_id (str) for the ID of the source spreadsheet, new_title (Optional[str]) for new title, and copy_permissions (bool, default=True) for whether to copy permissions. Returns link to duplicated spreadsheet. |