set_data_validation
Applies list, number, decimal, text-length, or date validation rules to an Excel range, restricting cell entries and helping keep live spreadsheet data accurate.
Instructions
Set a data validation rule on a range. Supports list, wholeNumber, decimal, textLength, and date rules.
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": {
"range": "<range>",
"type": "<type>"
},
"name": "set_data_validation"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| list | No | List type: comma-separated values, e.g. "Low,Medium,High". | |
| type | Yes | Validation type. | |
| range | Yes | A1 range address. | |
| formula1 | No | Numeric/date/textLength: bound value or formula. | |
| formula2 | No | Second bound for Between/NotBetween. | |
| operator | No | Numeric/date/textLength: comparison operator. | |
| sheetName | No | Worksheet name. Defaults to the active worksheet. | |
| allowBlank | No | Allow blank cells. Default true. | |
| workbookId | No | Target workbook ID from list_workbooks. Optional when only one workbook is connected. |