Modify Sheet Values
modify_sheet_valuesWrites, updates, clears, copies, or inserts Smart Chips in a specified Google Sheets range, enabling cell value changes from an MCP client.
Instructions
Modifies values in a specific range of a Google Sheet - can write, update, or clear values, insert Smart Chips (Drive files/folders or People), or copy another range into it.
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": {
"user_google_email": "<user_google_email>",
"spreadsheet_id": "<spreadsheet_id>",
"range_name": "<range_name>"
},
"name": "modify_sheet_values"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chips | No | Smart chip(s) to insert instead of values: - A single URL or email string for a single cell (e.g., "https://drive.google.com/drive/folders/123", "user@example.com"). - A list of URLs or emails for a single cell (multiple chips) or across cells (e.g., ["https://...", "https://..."]). - A 2D list of URLs/emails matching a grid range. For a single-row or single-column range, each inner list is instead the chips for one cell (e.g., [["a@x.com", "b@x.com"]] puts both chips in the first cell of "A1:C1"). - A dict or list of dicts with explicit properties (e.g., {"type": "drive", "uri": "..."}, {"type": "person", "email": "..."}). - A JSON-encoded string representing any of the above formats. | |
| values | No | 2D array of values to write/update. Can be a JSON string or Python list. Required unless clear_values=True or chips or source_range is provided. | |
| chip_type | No | Explicit chip type if passing raw strings in chips: "drive" (default for URLs/IDs) or "person" (default for emails). | |
| file_path | No | Local .csv or .tsv file (UTF-8) whose rows are written instead of values, with value_input_option applied. range_name may be just the top-left cell (e.g., "Sheet1!A2" to load below a header row). Use instead of values, chips, source_range, or clear_values. | |
| paste_type | No | What source_range pastes: "PASTE_NORMAL" (values, formulas, formatting), "PASTE_VALUES", "PASTE_FORMAT", "PASTE_NO_BORDERS", "PASTE_FORMULA", "PASTE_DATA_VALIDATION", or "PASTE_CONDITIONAL_FORMATTING". Defaults to "PASTE_NORMAL". | PASTE_NORMAL |
| range_name | Yes | The range to modify (e.g., "Sheet1!A1:D10", "A1:D10"). Required. | |
| clear_values | No | If True, clears the range instead of writing values. Defaults to False. | |
| source_range | No | A1 range in the same spreadsheet to copy into range_name, like the UI copy and paste: relative formula references shift and formatting comes along. Both ranges must be A1 notation (not named ranges); one without a sheet name uses the first sheet. range_name may be just the top-left cell (e.g., copy "Sheet1!A29:AO29" to "Sheet1!A30"). Use instead of values, chips, or clear_values. | |
| spreadsheet_id | Yes | The ID of the spreadsheet. Required. | |
| user_google_email | Yes | The user's Google email address. Required. | |
| value_input_option | No | How to interpret input values ("RAW" or "USER_ENTERED"). Defaults to "USER_ENTERED". | USER_ENTERED |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |