MCP
data:insertPivot
Inserts a pivot table summarizing a range.
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. |
Returns
| Name | Type | Required | Description |
|---|---|---|---|
range | { from: string; to: string } | yes | An inclusive rectangle. from/to may be equal, a single cell. |
destSheet | string | yes | The newly-created destination sheet's name. |
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"
}
},
"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"
]
}
}
}Response payload, as JSON Schema:
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Output",
"type": "object",
"properties": {
"range": {
"$ref": "#/$defs/CellRange"
},
"destSheet": {
"description": "The newly-created destination sheet's name.",
"type": "string"
}
},
"required": [
"range",
"destSheet"
],
"$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"
]
}
}
}