setDropdownValidation
Adds or removes dropdown validation on a Google Sheets cell range: supply allowed values to restrict input, or omit values to clear existing dropdowns.
Instructions
Adds or removes a dropdown list on a range of cells. Provide values to create a dropdown restricting input to those options. Omit values to remove dropdown validation from the range. On modern runtimes, first call readCellFormat for the exact bounded range.
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": {
"spreadsheetId": "<spreadsheetId>",
"range": "<range>"
},
"name": "setDropdownValidation"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| range | Yes | A1 notation range to apply the dropdown to (e.g., "Sheet1!B2:B100" or "C2:C50"). | |
| strict | No | If true, reject input that does not match one of the dropdown values. | |
| values | No | The allowed dropdown options (e.g., ["Open", "In Progress", "Done"]). Omit to remove existing dropdown validation from the range. | |
| readHandle | No | Capability returned by the corresponding read tool. Required on the modern MCP runtime, including modern stdio. | |
| inputMessage | No | Help text shown when a cell with the dropdown is selected. | |
| spreadsheetId | Yes | The spreadsheet ID — the long string between /d/ and /edit in a Google Sheets URL. |