# insertWhiteboardDiagram

Insert (or re-render in place) a real DIAGRAM (BPMN, Diagrams-as-Code / any DSL: mermaid, d2, plantuml, graphviz, …) on a whiteboard as an editable SB diagram element. Provide documentId, diagramType (call listDiagramTypes / getDiagramTypeGuide), and source (the DSL). The diagram is rendered to an image stored like a pasted image, and its editable source is kept in a sidecar so it stays a live, re-openable diagram (double-click on the canvas opens the BPMN / code / AI editor). Options: caption (label beneath it), width/height to size it (auto width caps at 480px; an explicit width may go up to 1200px), and x/y or align ('left'|'center'|'right') to place it (defaults to the right of existing content). Pass updateElementId to UPDATE an existing embedded diagram in place — re-render + replace its image and DSL while keeping the same element id and board position (used to live-edit a diagram as it evolves); if that id is not on the board yet it is created carrying that id. After inserting, call getWhiteboardImage to see it and verify it rendered correctly (fix the source and re-insert if it is wrong). For a plain picture (not a diagram) use insertWhiteboardImage; to generate a diagram image WITHOUT inserting use renderDiagram.

Agent View of the PolicyLayer registry record for `insertWhiteboardDiagram`. HTML page: https://policylayer.com/tools/io-stablebaseline-sb/insertwhiteboarddiagram

## Facts

- Tool: `insertWhiteboardDiagram`
- Server: Stable Baseline (`https://api.stablebaseline.io/functions/v1/cloud-serve/mcp`) — https://policylayer.com/tools/io-stablebaseline-sb.md
- Homepage: https://github.com/stablebaseline/mcp
- Risk category: Write (Medium risk)
- Registry record: grade F, identity unverified
- Server auth posture: open
- Server CORS policy: https://app.stablebaseline.io
- Server rate-limited: no
- Parameters: 11 (3 required)
- Recommended policy verdict: Rate-limited

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `x` | number | no | Top-left x on the canvas. Omit to auto-place (or to keep the existing position when updateElementId is given). |
| `y` | number | no | Top-left y on the canvas. Omit to auto-place (or to keep the existing position when updateElementId is given). |
| `fit` | string | no | When 'contain' AND both width and height are given, treat width/height as a BOUNDING BOX: the diagram is scaled to its natural aspect ratio to fit inside the bo |
| `align` | string | no | Horizontal alignment relative to existing content (placed below it). Ignored if x/y given. |
| `width` | number | no | Display width in px (aspect ratio preserved). Auto-size caps at 480px; an explicit width is honoured up to 1200px. |
| `height` | number | no | Display height in px (defaults from width + aspect). |
| `source` | string | yes | The diagram DSL / code. For type 'infographic', provide a plain-English description instead (the system designs the AntV infographic spec). |
| `caption` | string | no | Optional caption shown beneath the diagram. |
| `documentId` | string | yes | The whiteboard's documentId. |
| `diagramType` | string | yes | Diagram language, e.g. 'bpmn', 'mermaid', 'd2', 'plantuml', 'graphviz'. See listDiagramTypes. |
| `updateElementId` | string | no | Element id of an EXISTING embedded diagram to re-render and replace in place (keeps the element id + board position). Omit for a fresh insert. If the id is not |

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": "insertWhiteboardDiagram",
    "arguments": {
      "source": "<source>",
      "documentId": "<documentId>",
      "diagramType": "<diagramType>"
    }
  }
}
```

## Why insertWhiteboardDiagram is rated Medium

This tool creates and modifies whiteboard diagrams reversibly. It inserts new diagram elements or updates existing ones ('re-render in place'), which are data modification operations. The effects are reversible (diagrams can be deleted or changed). This does not retrieve data (Read), execute arbitrary code (Execute), irreversibly delete (Destructive), or involve financial transactions (Financial).

From the tool's own definition: "Tool description states it will 'Insert (or re-render in place)' a diagram on a whiteboard and 'stores' the rendered image and source code. The verb 'insert' and mention of storing content indicates creation/modification of data."

Risk signals: High parameter count (11 properties)

## Use case

AI agents use insertWhiteboardDiagram to create or update resources in Stable Baseline, usually the action step of a workflow, after the agent has gathered context. Every call changes real data in your Stable Baseline environment.

## Recommended policy (PolicyLayer)

Verdict: **Rate-limited**. Enforced by the PolicyLayer MCP gateway (https://policylayer.com/mcp-gateway) before a call reaches Stable Baseline:

```json
{
  "version": "1",
  "default": "deny",
  "tools": {
    "insertWhiteboardDiagram": {
      "limits": [
        {
          "counter": "insertwhiteboarddiagram_rate",
          "window": "minute",
          "max": 30,
          "scope": "grant"
        }
      ]
    }
  }
}
```

## Other tools on Stable Baseline (195)

- `cancelAllKgInScope` — Destructive — https://policylayer.com/tools/io-stablebaseline-sb/cancelallkginscope.md
- `cancelKgBuildBatch` — Destructive — https://policylayer.com/tools/io-stablebaseline-sb/cancelkgbuildbatch.md
- `deleteDiagramInDocument` — Destructive — https://policylayer.com/tools/io-stablebaseline-sb/deletediagramindocument.md
- `deleteDocument` — Destructive — https://policylayer.com/tools/io-stablebaseline-sb/deletedocument.md
- `deleteFolder` — Destructive — https://policylayer.com/tools/io-stablebaseline-sb/deletefolder.md
- `deleteImageInDocument` — Destructive — https://policylayer.com/tools/io-stablebaseline-sb/deleteimageindocument.md
- `deleteImprovement` — Destructive — https://policylayer.com/tools/io-stablebaseline-sb/deleteimprovement.md
- `deleteImprovementCategory` — Destructive — https://policylayer.com/tools/io-stablebaseline-sb/deleteimprovementcategory.md
- `deleteImprovementComment` — Destructive — https://policylayer.com/tools/io-stablebaseline-sb/deleteimprovementcomment.md
- `deletePlan` — Destructive — https://policylayer.com/tools/io-stablebaseline-sb/deleteplan.md
- `deletePlanComment` — Destructive — https://policylayer.com/tools/io-stablebaseline-sb/deleteplancomment.md
- `deletePlanPhase` — Destructive — https://policylayer.com/tools/io-stablebaseline-sb/deleteplanphase.md
- `deleteResourcePermission` — Destructive — https://policylayer.com/tools/io-stablebaseline-sb/deleteresourcepermission.md
- `deleteTaskDependency` — Destructive — https://policylayer.com/tools/io-stablebaseline-sb/deletetaskdependency.md
- `deleteTeam` — Destructive — https://policylayer.com/tools/io-stablebaseline-sb/deleteteam.md
- `deleteVegaDataFile` — Destructive — https://policylayer.com/tools/io-stablebaseline-sb/deletevegadatafile.md
- `deleteWhiteboard` — Destructive — https://policylayer.com/tools/io-stablebaseline-sb/deletewhiteboard.md
- `removeMember` — Destructive — https://policylayer.com/tools/io-stablebaseline-sb/removemember.md
- `removeTeamMember` — Destructive — https://policylayer.com/tools/io-stablebaseline-sb/removeteammember.md
- `removeWorkspaceMember` — Destructive — https://policylayer.com/tools/io-stablebaseline-sb/removeworkspacemember.md
- `resetDocumentInBrain` — Destructive — https://policylayer.com/tools/io-stablebaseline-sb/resetdocumentinbrain.md
- `revokeTeamWorkspaceAccess` — Destructive — https://policylayer.com/tools/io-stablebaseline-sb/revoketeamworkspaceaccess.md
- `autoDesignWhiteboard` — Execute — https://policylayer.com/tools/io-stablebaseline-sb/autodesignwhiteboard.md
- `renderDiagram` — Execute — https://policylayer.com/tools/io-stablebaseline-sb/renderdiagram.md
- `startMeetingScribe` — Execute — https://policylayer.com/tools/io-stablebaseline-sb/startmeetingscribe.md
- `stopMeetingScribe` — Execute — https://policylayer.com/tools/io-stablebaseline-sb/stopmeetingscribe.md
- `triggerKgRebuild` — Execute — https://policylayer.com/tools/io-stablebaseline-sb/triggerkgrebuild.md
- `applySubscriptionChange` — Financial — https://policylayer.com/tools/io-stablebaseline-sb/applysubscriptionchange.md
- `cancelSubscription` — Financial — https://policylayer.com/tools/io-stablebaseline-sb/cancelsubscription.md
- `getCustomerPortalLink` — Financial — https://policylayer.com/tools/io-stablebaseline-sb/getcustomerportallink.md
- …and 165 more: https://policylayer.com/tools/io-stablebaseline-sb.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=io-stablebaseline-sb · API: https://policylayer.com/registry/api · Policy library: https://policylayer.com/policies/io-stablebaseline-sb
