get_multiple_sheet_data
Fetch data from multiple Google Sheets ranges in one request, using concurrent queries and optional local file output to avoid response-size limits.
Instructions
Get data from multiple specific ranges in Google Spreadsheets.
Queries fetch concurrently rather than one at a time. If the caller supplied
a progressToken, a notifications/progress update is sent as each query
finishes (#355).
Args: queries: A list of dictionaries, each specifying a query. Each dictionary must have 'spreadsheet_id' and 'sheet' keys. 'range' is optional; omitting it returns the entire sheet. Example: [{'spreadsheet_id': 'abc', 'sheet': 'Sheet1', 'range': 'A1:B5'}, {'spreadsheet_id': 'xyz', 'sheet': 'Data'}] local_path: Optional local filesystem path (file or directory) to write the result to instead of returning it inline. Bypasses the response-size cap. A path ending in '/' is a directory, created if missing. A file in place of a parent directory, or at a path ending in '/', raises ValueError; an existing file at a plain file path is replaced. Same caveat as download_file/download_folder: this path is resolved on the server's filesystem, not the caller's.
Returns: A list of dictionaries, each containing the original query parameters and the fetched 'data' or an 'error'. Raises ValueError if the response exceeds a safety cap (see MAX_TOOL_RESPONSE_CHARS in docs/configuration.md for the configured default) and local_path is not set — split into fewer queries per call, or pass local_path. If local_path is set, returns {local_path, query_count, bytes_written} instead.
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": {
"queries": "<queries>"
},
"name": "get_multiple_sheet_data"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| queries | Yes | ||
| local_path | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |