Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ jobs:
git add -N content/docs/api/rest
git diff --exit-code -- content/docs/api/rest

- name: gen-mcp-docs drift check
run: |
node scripts/gen-mcp-docs.mjs
git add -N content/docs/api/mcp
git diff --exit-code -- content/docs/api/mcp

- name: test-docs (Learn examples)
run: node scripts/test-docs.mjs

Expand Down
129 changes: 129 additions & 0 deletions content/docs/api/mcp/chart-insert.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
---
title: "chart:insert"
description: "Inserts a chart."
---

{/* GENERATED by scripts/gen-mcp-docs.mjs from scripts/mcp-source/tool-schemas.json — do not edit. */}

## 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:

```json
{
"$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:

```json
{
"$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"
]
}
}
}
```

63 changes: 63 additions & 0 deletions content/docs/api/mcp/chart-remove.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
---
title: "chart:remove"
description: "Removes a chart."
---

{/* GENERATED by scripts/gen-mcp-docs.mjs from scripts/mcp-source/tool-schemas.json — do not edit. */}

## Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `chartId` | `string` | yes | The chart to remove. |

## Returns

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `chartId` | `string` | yes | — |
| `removed` | `boolean` | yes | — |

## Schema

Request payload, as JSON Schema:

```json
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Payload",
"type": "object",
"properties": {
"chartId": {
"description": "The chart to remove.",
"type": "string"
}
},
"required": [
"chartId"
]
}
```

Response payload, as JSON Schema:

```json
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Output",
"type": "object",
"properties": {
"chartId": {
"type": "string"
},
"removed": {
"type": "boolean"
}
},
"required": [
"chartId",
"removed"
]
}
```

83 changes: 83 additions & 0 deletions content/docs/api/mcp/chart-update.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
---
title: "chart:update"
description: "Updates a chart."
---

{/* GENERATED by scripts/gen-mcp-docs.mjs from scripts/mcp-source/tool-schemas.json — do not edit. */}

## Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `chartId` | `string` | yes | The chart to patch. |
| `chartType` | `string or null` | no | The new chart form, or omitted to leave it unchanged. Defaults to `null`. |
| `options` | `object or null` | no | Replaces the chart's options wholesale, or omitted to leave them unchanged. Defaults to `null`. |

## Returns

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `chartId` | `string` | yes | — |
| `chartType` | `string` | yes | The EFFECTIVE, post-patch chart form, the patch's own value if it supplied one, else the chart's unchanged existing type. |

## Schema

Request payload, as JSON Schema:

```json
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Payload",
"type": "object",
"properties": {
"chartId": {
"description": "The chart to patch.",
"type": "string"
},
"chartType": {
"description": "The new chart form, or omitted to leave it unchanged.",
"type": [
"string",
"null"
],
"default": null
},
"options": {
"description": "Replaces the chart's options wholesale, or omitted to leave them unchanged.",
"type": [
"object",
"null"
],
"additionalProperties": true,
"default": null
}
},
"required": [
"chartId"
]
}
```

Response payload, as JSON Schema:

```json
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Output",
"type": "object",
"properties": {
"chartId": {
"type": "string"
},
"chartType": {
"description": "The EFFECTIVE, post-patch chart form, the patch's own value if it supplied one, else the chart's unchanged existing type.",
"type": "string"
}
},
"required": [
"chartId",
"chartType"
]
}
```

61 changes: 61 additions & 0 deletions content/docs/api/mcp/clipboard-paste.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
---
title: "clipboard:paste"
description: "Pastes previously copied or cut cells into a range."
---

{/* GENERATED by scripts/gen-mcp-docs.mjs from scripts/mcp-source/tool-schemas.json — do not edit. */}

## Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `sheet` | `string` | yes | — |
| `source` | `string` | yes | The cell the clipboard content was copied/cut FROM, e.g. `"A1"`. |
| `raw` | `string` | yes | The clipboard contents AT COPY/CUT TIME, a literal, a formula, leading `=`, or `""`. |
| `target` | `string` | yes | The cell being pasted INTO, e.g. `"B2"`. |
| `cut` | `boolean` | no | `false` = copy, the default, `true` = cut, move. |

## Returns

Nothing beyond the standard MCP success envelope.

## Schema

Request payload, as JSON Schema:

```json
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Payload",
"type": "object",
"properties": {
"sheet": {
"type": "string"
},
"source": {
"description": "The cell the clipboard content was copied/cut FROM, e.g. `\"A1\"`.",
"type": "string"
},
"raw": {
"description": "The clipboard contents AT COPY/CUT TIME, a literal, a formula, leading `=`, or `\"\"`.",
"type": "string"
},
"target": {
"description": "The cell being pasted INTO, e.g. `\"B2\"`.",
"type": "string"
},
"cut": {
"description": "`false` = copy, the default, `true` = cut, move.",
"type": "boolean",
"default": false
}
},
"required": [
"sheet",
"source",
"raw",
"target"
]
}
```

Loading
Loading