MCP
data:setValidation
Sets the validation.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
sheet | string | yes | — |
range | { from: string; to: string } | yes | An inclusive rectangle. from/to may be equal, a single cell. |
rule | { values: array of string; kind: "list" } or null | no | Some(_) sets a rule. Required on the wire, as literal null to clear. |
Returns
| Name | Type | Required | Description |
|---|---|---|---|
range | { from: string; to: string } | yes | An inclusive rectangle. from/to may be equal, a single cell. |
rule | { values: array of string; kind: "list" } or null | no | — |
Schema
Request payload, as JSON Schema:
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Payload",
"type": "object",
"properties": {
"sheet": {
"type": "string"
},
"range": {
"$ref": "#/$defs/CellRange"
},
"rule": {
"description": "`Some(_)` sets a rule. Required on the wire, as literal `null` to clear.",
"anyOf": [
{
"$ref": "#/$defs/WireRule"
},
{
"type": "null"
}
]
}
},
"required": [
"sheet",
"range"
],
"$defs": {
"CellRange": {
"description": "An inclusive rectangle. `from`/`to` may be equal, a single cell.",
"type": "object",
"properties": {
"from": {
"description": "Top-left cell, e.g. `\"A1\"`.",
"type": "string"
},
"to": {
"description": "Bottom-right cell, e.g. `\"B3\"`.",
"type": "string"
}
},
"required": [
"from",
"to"
]
},
"WireRule": {
"description": "The one rule kind on the wire today. because the tag is checked at deserialize time.",
"oneOf": [
{
"type": "object",
"properties": {
"values": {
"type": "array",
"items": {
"type": "string"
}
},
"kind": {
"type": "string",
"const": "list"
}
},
"required": [
"kind",
"values"
]
}
]
}
}
}Response payload, as JSON Schema:
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Output",
"description": "**Echoes `payload.range`/`payload.rule` verbatim**.",
"type": "object",
"properties": {
"range": {
"$ref": "#/$defs/CellRange"
},
"rule": {
"anyOf": [
{
"$ref": "#/$defs/WireRule"
},
{
"type": "null"
}
]
}
},
"required": [
"range"
],
"$defs": {
"CellRange": {
"description": "An inclusive rectangle. `from`/`to` may be equal, a single cell.",
"type": "object",
"properties": {
"from": {
"description": "Top-left cell, e.g. `\"A1\"`.",
"type": "string"
},
"to": {
"description": "Bottom-right cell, e.g. `\"B3\"`.",
"type": "string"
}
},
"required": [
"from",
"to"
]
},
"WireRule": {
"description": "The one rule kind on the wire today. because the tag is checked at deserialize time.",
"oneOf": [
{
"type": "object",
"properties": {
"values": {
"type": "array",
"items": {
"type": "string"
}
},
"kind": {
"type": "string",
"const": "list"
}
},
"required": [
"kind",
"values"
]
}
]
}
}
}