# superdoc_table

Create and modify table structure, content, and styling. Find table/row/cell nodeIds via superdoc_get_content({action:"blocks"}) or superdoc_search. ACTIONS: • Structure: delete, insert_row, delete_row, insert_column, delete_column, merge_cells, unmerge_cells. • Cell content: set_cell_text (text). set_cell (vAlign / wrap / fit / preferred width). • Row / column: set_row (height + rule), set_row_options (repeat-header, allow-break), set_column (widthPt). • Table styling: set_borders, set_shading, set_style_options (headerRow / bandedRows / firstColumn / lastColumn / lastRow / bandedColumns), set_layout (autofit / alignment / direction / preferredWidth), set_options (default cell margins + cell spacing). LOCATORS (the shapes ops accept): • insert_row append shorthand: { nodeId: "<tableId>" } with no rowIndex/position appends at the end. Three other forms: target a row + position, table + rowIndex + position, or any of the above with count:N for multiple. • insert_column shorthand: position:"first"|"last" with no columnIndex. Otherwise columnIndex + position:"left"|"right". • merge_cells: table target + start:{rowIndex, columnIndex} + end:{rowIndex, columnIndex}. • set_cell_text: table target + rowIndex + columnIndex (preferred) OR cell target. • set_cell: cell target only. Does NOT accept table+rowIndex+columnIndex. • set_borders / set_shading: table OR cell target. NOT a row target. COLOR FORMAT: Hex strings accept #RRGGBB, RRGGBB, #RGB, or 3-digit RGB; also "auto"; also null to clear (where supported). Stored canonically as uppercase RRGGBB. Always pass a concrete color when one is implied. Never call set_borders with auto for a "make it look [X]" ask. STYLING (TWO MODES): A. STRUCTURAL CHANGE → re-apply the existing styling. Triggers: insert_row / insert_column / delete_row / delete_column / merge_cells / unmerge_cells. (NOT set_cell_text or set_cell: those don't disturb borders/shading.) Recipe: read the current borders/shading/cnf flags via superdoc_get_content({action:"blocks"}) before the change, then re-apply the SAME values after with set_borders + set_shading + set_style_options. The goal is consistency, not a redesign. Skip on a freshly created table. A new table starts un-styled. B. STYLE-CHANGE REQUEST ("make it look [X]" / "style the whole table") → apply the FULL set with concrete colors. Touch every axis: borders, shading, text alignment, font color/weight, cnf flags, spacing. A single set_borders call without shading and font tweaks always looks half-finished. That's the #1 cause of "no visual change" complaints. Color palette: discover the document's palette by reading superdoc_get_content({action:"blocks"}) and reusing the colors on existing tables/headings. When no palette is obvious, default to corporate blue "1F3864" or dark grey "444444" for accents and "F2F2F2" / "E7E6E6" for banding. Recipe (call ALL of these): 1. set_borders applyTo:"all" with an explicit color and weight. 2. set_shading on the header row cells with the accent color. Add banding on alternate body rows if appropriate. 3. set_style_options { headerRow: true, bandedRows?: true } so cnf regions are recognized. 4. Cell-text alignment via superdoc_format action:"set_alignment". Center the header, left-align body, right-align numeric columns. Paragraph-level: target the paragraph inside each cell. 5. Font color + weight via superdoc_format action:"inline". Header gets a contrasting color (white on dark fill, accent on light fill) plus bold:true. 6. set_options if the user asks for tighter or looser spacing. Steps 4–5 cross to superdoc_format. Use superdoc_mutations to batch many format.apply steps in one call. AFTER set_cell_text, match the new cell to its siblings: set_cell_text writes plain text with the document's default font/size/color and no weight. Always follow up with one superdoc_format inline call copying fontFamily/fontSize/color/bold from a sibling cell (or any non-empty body paragraph if the table is fresh and has no sibling content). If sibling cells show a bold-prefix pattern like "Label: value", replicate it on the new cell via superdoc_search + superdoc_format inline (or one superdoc_mutations batch with format.apply steps). LIST-TO-TABLE: (1) superdoc_create action:"table" with the desired rows/columns. (2) Populate cells with set_cell_text using rowIndex/columnIndex (one call per cell). (3) DELETE THE WHOLE LIST in one call: superdoc_list({action:"delete", target:{kind:"block", nodeType:"listItem", nodeId:"<any-item-id>"}}). The op walks the contiguous list and removes all items. Wrong paths for list deletion (all leave bullets/empty paragraphs behind): text.delete, superdoc_edit action:"delete" on text refs, lists.detach, lists.convertToText. EXAMPLES: 1. {"action":"insert_row","nodeId":"<tableNodeId>"} 2. {"action":"insert_column","nodeId":"<tableNodeId>","position":"last"} 3. {"action":"merge_cells","nodeId":"<tableNodeId>","start":{"rowIndex":0,"columnIndex":0},"end":{"rowIndex":1,"columnIndex":1}} 4. {"action":"set_cell_text","nodeId":"<tableNodeId>","rowIndex":0,"columnIndex":0,"text":"Q1 Revenue"} 5. {"action":"set_row","nodeId":"<tableNodeId>","rowIndex":0,"heightPt":24,"rule":"atLeast"} 6. {"action":"set_borders","nodeId":"<tableNodeId>","mode":"applyTo","applyTo":"all","border":{"lineStyle":"single","lineWeightPt":1,"color":"#000000"}} 7. {"action":"set_shading","target":{"kind":"block","nodeType":"tableCell","nodeId":"<cellNodeId>"},"color":"#E3F2FD"} 8. {"action":"set_style_options","nodeId":"<tableNodeId>","styleOptions":{"headerRow":true,"bandedRows":true}}

Agent View of the PolicyLayer registry record for `superdoc_table`. HTML page: https://policylayer.com/tools/superdoc-mcp/superdoc-table

## Facts

- Tool: `superdoc_table`
- Server: Superdoc (`@superdoc/mcp`) — https://policylayer.com/tools/superdoc-mcp.md
- Install: `npx -y @superdoc/mcp`
- Homepage: https://www.npmjs.com/package/@superdoc/mcp
- Risk category: Destructive (Critical risk)
- Registry record: grade F, identity unverified
- Server rate-limited: no
- Parameters: 12 (1 required)
- Recommended policy verdict: Hidden

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `end` | object | no | Required for action 'merge_cells'. |
| `mode` | object | no | Required for action 'set_borders'. |
| `rule` | string | no | Only for action 'set_row'. Omit for other actions. |
| `text` | string | no | Required for action 'set_cell_text'. |
| `color` | object | no | Required for action 'set_shading'. |
| `count` | integer | no | Only for actions 'insert_row', 'insert_column'. Omit for other actions. |
| `edges` | object | no | Only for action 'set_borders'. Omit for other actions. |
| `force` | boolean | no | Bypass confirmation checks. |
| `start` | object | no | Required for action 'merge_cells'. |
| `action` | string | yes | The action to perform. One of: delete, delete_column, delete_row, insert_column, insert_row, merge_cells, move_column, move_row, set_borders, set_cell, set_cell |
| `border` | object | no | Only for action 'set_borders'. Omit for other actions. |
| `dryRun` | boolean | no | Preview the result without applying changes. |

Parameters from the server's own tool schema.

## Example call (MCP tools/call, JSON-RPC 2.0)

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "superdoc_table",
    "arguments": {
      "action": "<action>"
    }
  }
}
```

## Why superdoc_table is rated Critical

An AI agent that decides to call superdoc_table doesn't hesitate, doesn't double-check, and doesn't stop at one. Whatever it removes from Superdoc is gone. There is no undo for destructive operations.

Risk signals: Accepts file system path (destination) · High parameter count (68 properties)

## Use case

AI agents call superdoc_table to permanently remove resources in Superdoc, typically in cleanup and lifecycle workflows. It does its job in a single call, and there is no undo.

## Recommended policy (PolicyLayer)

Verdict: **Hidden**. Enforced by the PolicyLayer MCP gateway (https://policylayer.com/mcp-gateway) before a call reaches Superdoc:

```json
{
  "version": "1",
  "default": "deny",
  "hide": [
    "superdoc_table"
  ]
}
```

## Other tools on Superdoc (12)

- `superdoc_mutations` — Destructive — https://policylayer.com/tools/superdoc-mcp/superdoc-mutations.md
- `superdoc_track_changes` — Destructive — https://policylayer.com/tools/superdoc-mcp/superdoc-track-changes.md
- `superdoc_format` — Execute — https://policylayer.com/tools/superdoc-mcp/superdoc-format.md
- `superdoc_get_content` — Read — https://policylayer.com/tools/superdoc-mcp/superdoc-get-content.md
- `superdoc_list` — Read — https://policylayer.com/tools/superdoc-mcp/superdoc-list.md
- `superdoc_search` — Read — https://policylayer.com/tools/superdoc-mcp/superdoc-search.md
- `superdoc_close` — Write — https://policylayer.com/tools/superdoc-mcp/superdoc-close.md
- `superdoc_comment` — Write — https://policylayer.com/tools/superdoc-mcp/superdoc-comment.md
- `superdoc_create` — Write — https://policylayer.com/tools/superdoc-mcp/superdoc-create.md
- `superdoc_edit` — Write — https://policylayer.com/tools/superdoc-mcp/superdoc-edit.md
- `superdoc_open` — Write — https://policylayer.com/tools/superdoc-mcp/superdoc-open.md
- `superdoc_save` — Write — https://policylayer.com/tools/superdoc-mcp/superdoc-save.md

## For agents

This record is a snapshot. Live verdicts and the full registry:

- Check every server in your MCP config at once: `npx -y policylayer stack`
- Vet a server before you add it: install the mcp-precheck skill — `npx skills add https://policylayer.com` (skill text: https://policylayer.com/skill.md)
- Query the registry over MCP: endpoint `https://api.policylayer.com/mcp` — tools `check_mcp_server`, `check_mcp_stack`, `check_tool`, `search_registry`, `get_change_events`

---

Source: the PolicyLayer MCP registry — one continuously verified record per MCP server. Full record: https://policylayer.com/registry?q=superdoc-mcp · API: https://policylayer.com/registry/api · Policy library: https://policylayer.com/policies/superdoc-mcp
