import_csv_to_sheet
Creates a Google Spreadsheet from a local CSV file and resizes the sheet to fit all rows before writing data in batches.
Instructions
Create a new Google Spreadsheet populated from a local CSV file. Not available when the server runs with LOCAL_FILE_ACCESS=off.
Reads the CSV, creates the spreadsheet, expands the sheet's grid to fit the data (avoiding the default 1000-row/26-column limit), and writes every row in one or more batched value updates.
Row chunks write concurrently rather than one at a time (#183). If the
caller supplied a progressToken, a notifications/progress update is sent
as each chunk finishes (#355).
Args: local_path: Absolute path to the local .csv file. title: Title for the new spreadsheet. folder_id: Optional Google Drive folder ID where the spreadsheet should be created. If not provided, uses the configured default folder or creates in root. sheet_name: Name of the sheet the data is written to (default "Sheet1").
Returns: spreadsheetId, title, web_link, and rows_written on full success. Rows are written in row-range chunks that run concurrently; if one or more chunks fail, the spreadsheet (already created) may have some rows missing — not necessarily a clean prefix. In that case returns an 'error' summary plus spreadsheetId, title, web_link, rows_attempted, failed_ranges (start_row, end_row, error per failed chunk), and written_ranges (start_row, end_row per chunk that succeeded), so the missing rows can be retried precisely.
Note: Requires OAuth or ADC auth. Service accounts cannot create files in personal Drive (no storage quota). Works on Shared Drives regardless of auth method. Check server://auth-status for your current auth method.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"local_path": "<local_path>",
"title": "<title>"
},
"name": "import_csv_to_sheet"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | Yes | ||
| folder_id | No | ||
| local_path | Yes | ||
| sheet_name | No | Sheet1 |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||