MCP
chart:insert
Inserts a chart.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
sheet | string | yes | The sheet range is relative to. |
range | { from: string; to: string } | yes | The rectangle to bind the chart to, as A1 corners. |
chartType | string | yes | The chart form to draw, a closed wire vocabulary. |
options | object | no | Renderer-specific knobs, opaque here on purpose, defaults to {}. |
Returns
| Name | Type | Required | Description |
|---|---|---|---|
chartId | string | yes | The new chart's id. |
range | { from: string; to: string } | yes | Canonicalized top-left/bottom-right corners. |
chartType | string | yes | — |
Schema
Request payload, as JSON Schema:
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Payload",
"type": "object",
"properties": {
"sheet": {
"description": "The sheet `range` is relative to.",
"type": "string"
},
"range": {
"description": "The rectangle to bind the chart to, as A1 corners.",
"$ref": "#/$defs/CellRange"
},
"chartType": {
"description": "The chart form to draw, a closed wire vocabulary.",
"type": "string"
},
"options": {
"description": "Renderer-specific knobs, opaque here on purpose, defaults to `{}`.",
"type": "object",
"additionalProperties": true,
"default": {}
}
},
"required": [
"sheet",
"range",
"chartType"
],
"$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": {
"chartId": {
"description": "The new chart's id.",
"type": "string"
},
"range": {
"description": "Canonicalized top-left/bottom-right corners.",
"$ref": "#/$defs/CellRange"
},
"chartType": {
"type": "string"
}
},
"required": [
"chartId",
"range",
"chartType"
],
"$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"
]
}
}
}