sheets__set_data_validation
Access
Requires a project integration connection for sheets.
Call type: Can change resources.
Arguments
Example request
Send this JSON-RPC request through an initialized MCP client. Replace sample identifiers and values before calling the tool. See MCP client setup.
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "sheets__set_data_validation",
"arguments": {
"spreadsheetId": "example",
"requests": [
{
"setDataValidation": {
"range": {
"sheetId": 0
}
}
}
]
}
}
}Result
No output schema is published for this tool. The input contract does not define its return fields. Inspect the MCP response content and isError; do not assume a fixed object shape. See the sheets integration reference for provider setup and tool context.
Full schemas
{
"type": "object",
"properties": {
"spreadsheetId": {
"type": "string",
"description": "Google Sheets spreadsheet ID"
},
"requests": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"required": [
"setDataValidation"
],
"properties": {
"setDataValidation": {
"type": "object",
"required": [
"range"
],
"properties": {
"range": {
"type": "object",
"description": "Grid range with the actual sheet ID from spreadsheet metadata and zero-based, end-exclusive indexes.",
"required": [
"sheetId"
],
"properties": {
"sheetId": {
"type": "integer",
"minimum": 0,
"description": "Provide the sheet id."
},
"startRowIndex": {
"type": "integer",
"minimum": 0,
"description": "Provide the start row index."
},
"endRowIndex": {
"type": "integer",
"minimum": 0,
"description": "Provide the end row index."
},
"startColumnIndex": {
"type": "integer",
"minimum": 0,
"description": "Provide the start column index."
},
"endColumnIndex": {
"type": "integer",
"minimum": 0,
"description": "Provide the end column index."
}
},
"additionalProperties": false
},
"rule": {
"type": "object",
"description": "Omit rule to remove validation.",
"required": [
"condition"
],
"properties": {
"condition": {
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"enum": [
"NUMBER_GREATER",
"NUMBER_GREATER_THAN_EQ",
"NUMBER_LESS",
"NUMBER_LESS_THAN_EQ",
"NUMBER_EQ",
"NUMBER_NOT_EQ",
"NUMBER_BETWEEN",
"NUMBER_NOT_BETWEEN",
"TEXT_CONTAINS",
"TEXT_NOT_CONTAINS",
"TEXT_EQ",
"TEXT_IS_EMAIL",
"TEXT_IS_URL",
"DATE_EQ",
"DATE_BEFORE",
"DATE_AFTER",
"DATE_ON_OR_BEFORE",
"DATE_ON_OR_AFTER",
"DATE_BETWEEN",
"DATE_NOT_BETWEEN",
"DATE_IS_VALID",
"ONE_OF_RANGE",
"ONE_OF_LIST",
"CUSTOM_FORMULA",
"BOOLEAN"
],
"description": "Provide the type."
},
"values": {
"type": "array",
"items": {
"type": "object",
"required": [
"userEnteredValue"
],
"properties": {
"userEnteredValue": {
"type": "string",
"description": "Provide the user entered value."
}
},
"additionalProperties": false,
"description": "One value item supplied to the tool."
},
"description": "ONE_OF_RANGE uses an A1 range; CUSTOM_FORMULA starts with = or +; ONE_OF_LIST uses literal values. Google validates syntax."
}
},
"additionalProperties": false,
"oneOf": [
{
"type": "object",
"required": [
"values"
],
"properties": {
"type": {
"type": "string",
"enum": [
"NUMBER_GREATER",
"NUMBER_GREATER_THAN_EQ",
"NUMBER_LESS",
"NUMBER_LESS_THAN_EQ",
"NUMBER_EQ",
"NUMBER_NOT_EQ",
"TEXT_CONTAINS",
"TEXT_NOT_CONTAINS",
"TEXT_EQ",
"DATE_EQ",
"DATE_BEFORE",
"DATE_AFTER",
"DATE_ON_OR_BEFORE",
"DATE_ON_OR_AFTER",
"ONE_OF_RANGE",
"CUSTOM_FORMULA"
],
"description": "Provide the type."
},
"values": {
"type": "array",
"items": {
"type": "object",
"required": [
"userEnteredValue"
],
"properties": {
"userEnteredValue": {
"type": "string",
"description": "Provide the user entered value."
}
},
"additionalProperties": false,
"description": "One value item supplied to the tool."
},
"minItems": 1,
"maxItems": 1,
"description": "ONE_OF_RANGE uses an A1 range; CUSTOM_FORMULA starts with = or +; ONE_OF_LIST uses literal values. Google validates syntax."
}
},
"description": "Structured condition details used by the tool."
},
{
"type": "object",
"required": [
"values"
],
"properties": {
"type": {
"type": "string",
"enum": [
"NUMBER_BETWEEN",
"NUMBER_NOT_BETWEEN",
"DATE_BETWEEN",
"DATE_NOT_BETWEEN"
],
"description": "Provide the type."
},
"values": {
"type": "array",
"items": {
"type": "object",
"required": [
"userEnteredValue"
],
"properties": {
"userEnteredValue": {
"type": "string",
"description": "Provide the user entered value."
}
},
"additionalProperties": false,
"description": "One value item supplied to the tool."
},
"minItems": 2,
"maxItems": 2,
"description": "Structured values submitted to the tool."
}
},
"description": "Structured condition details used by the tool."
},
{
"type": "object",
"required": [],
"properties": {
"type": {
"type": "string",
"enum": [
"TEXT_IS_EMAIL",
"TEXT_IS_URL",
"DATE_IS_VALID"
],
"description": "Provide the type."
},
"values": {
"type": "array",
"items": {
"type": "object",
"required": [
"userEnteredValue"
],
"properties": {
"userEnteredValue": {
"type": "string",
"description": "Provide the user entered value."
}
},
"additionalProperties": false,
"description": "One value item supplied to the tool."
},
"maxItems": 0,
"description": "Structured values submitted to the tool."
}
},
"description": "Structured condition details used by the tool."
},
{
"type": "object",
"required": [],
"properties": {
"type": {
"type": "string",
"const": "BOOLEAN",
"description": "Provide the type."
},
"values": {
"type": "array",
"items": {
"type": "object",
"required": [
"userEnteredValue"
],
"properties": {
"userEnteredValue": {
"type": "string",
"description": "Provide the user entered value."
}
},
"additionalProperties": false,
"description": "One value item supplied to the tool."
},
"maxItems": 2,
"description": "Structured values submitted to the tool."
}
},
"description": "Structured condition details used by the tool."
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "ONE_OF_LIST",
"description": "Provide the type."
},
"values": {
"type": "array",
"items": {
"type": "object",
"required": [
"userEnteredValue"
],
"properties": {
"userEnteredValue": {
"type": "string",
"description": "Provide the user entered value."
}
},
"additionalProperties": false,
"description": "One value item supplied to the tool."
},
"description": "Structured values submitted to the tool."
}
},
"description": "Structured condition details used by the tool."
}
],
"description": "Structured condition details used by the tool."
},
"inputMessage": {
"type": "string",
"description": "Provide the input message."
},
"strict": {
"type": "boolean",
"description": "Provide the strict."
},
"showCustomUi": {
"type": "boolean",
"description": "Provide the show custom ui."
}
},
"additionalProperties": false
},
"filteredRowsIncluded": {
"type": "boolean",
"description": "Provide the filtered rows included."
}
},
"additionalProperties": false,
"description": "Structured set data validation details used by the tool."
}
},
"additionalProperties": false,
"description": "One request item supplied to the tool."
},
"description": "Provide one or more request values."
}
},
"required": [
"spreadsheetId",
"requests"
],
"description": "Arguments for the sheets__set_data_validation tool."
}