set_data_validation
Apply data validation rules to spreadsheet cells, such as dropdown lists, number ranges, and text constraints. Define criteria to restrict input and ensure data consistency.
Instructions
Set data validation rules for cells (e.g., dropdown lists, number ranges)
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": {
"spreadsheet_id": "<spreadsheet_id>",
"sheet_id": "<sheet_id>",
"start_row": "<start_row>",
"end_row": "<end_row>",
"start_column": "<start_column>",
"end_column": "<end_column>",
"validation_type": "<validation_type>"
},
"name": "set_data_validation"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| strict | No | Whether to reject invalid input | |
| values | No | List of valid values (for ONE_OF_LIST) | |
| end_row | Yes | Ending row index (exclusive) | |
| sheet_id | Yes | The ID of the sheet | |
| max_value | No | Maximum value (for NUMBER_LESS, NUMBER_BETWEEN, DATE_BETWEEN) | |
| min_value | No | Minimum value (for NUMBER_GREATER, NUMBER_BETWEEN, DATE_BETWEEN) | |
| start_row | Yes | Starting row index (0-based) | |
| end_column | Yes | Ending column index (exclusive) | |
| start_column | Yes | Starting column index (0-based) | |
| show_dropdown | No | Whether to show dropdown for list validation | |
| spreadsheet_id | Yes | The ID of the spreadsheet | |
| validation_type | Yes | Type of validation |