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 a...
This record as markdown: /tools/io-stablebaseline-sb/insertwhiteboarddiagram.md
What insertWhiteboardDiagram does on Stable Baseline
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.
| Parameter | Type | Required | Description |
|---|---|---|---|
x | number | — | Top-left x on the canvas. Omit to auto-place (or to keep the existing position when updateElementId is given). |
y | number | — | Top-left y on the canvas. Omit to auto-place (or to keep the existing position when updateElementId is given). |
fit | string | — | 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 | — | Horizontal alignment relative to existing content (placed below it). Ignored if x/y given. |
width | number | — | Display width in px (aspect ratio preserved). Auto-size caps at 480px; an explicit width is honoured up to 1200px. |
height | number | — | Display height in px (defaults from width + aspect). |
source | string | Yes | The diagram DSL / code. For 'default', provide MDP JSON with stable IDs and omit entity x/y for automatic layout; fully positioned manual sources remain valid; |
caption | string | — | Optional caption shown beneath the diagram. |
brandKitId | string | — | Optional brand kit UUID (see listBrandKits) to theme with instead of the cascade default. Must belong to your organisation. |
documentId | string | Yes | The whiteboard's documentId. |
diagramType | string | Yes | Diagram language, e.g. 'default', 'bpmn', 'mermaid', 'd2', 'plantuml', 'graphviz'. For a diagram family, use its defaultRenderer from listDiagramTypes. |
applyBrandTheme | boolean | — | Brand theming is ON BY DEFAULT: the board's effective BRAND KIT (colours only — typefaces are never injected) is baked into the diagram before it is rendered an |
Parameters from the server's own tool schema.
Why insertWhiteboardDiagram is rated Medium
An AI agent can call insertWhiteboardDiagram faster than any human can review: one bad instruction and it creates or modifies resources in Stable Baseline by the hundred, each call as confident as the last.
Risk signalsHigh parameter count (13 properties)
Attacks that exploit this kind of access
The rule that runs insertWhiteboardDiagram safely
PolicyLayer is an MCP gateway: it sits between your AI agents and Stable Baseline, and checks every tool call against a rule you set before the call runs. Nothing changes on the server itself. For insertWhiteboardDiagram, this is the rule to start with:
insertWhiteboardDiagram stays usable, but capped: an agent stuck in a loop can't make hundreds of changes a minute. Everything else on the server is denied unless you say otherwise.
The button opens the PolicyLayer dashboard: create your workspace, connect Stable Baseline, apply this rule, and every insertWhiteboardDiagram call is checked against it from then on.
Questions about 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. It is categorised as a Write tool in the Stable Baseline MCP Server, which means it can create or modify data. Consider rate limits to prevent runaway writes.
insertWhiteboardDiagram accepts 12 parameters: x, y, fit, align, width, height, source, caption, brandKitId, documentId, diagramType, applyBrandTheme. Required: source, documentId, diagramType. The full parameter table on this page comes from the server's own tool schema.
Register the Stable Baseline MCP server in PolicyLayer and add a rule for insertWhiteboardDiagram: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Stable Baseline. Nothing to install.
insertWhiteboardDiagram is a Write tool with medium risk. Write tools should be rate-limited to prevent accidental bulk modifications.
Yes. Add a rate_limit block to the insertWhiteboardDiagram rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for insertWhiteboardDiagram. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
insertWhiteboardDiagram is provided by the Stable Baseline MCP server (https://api.stablebaseline.io/functions/v1/cloud-serve/mcp). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
More on Stable Baseline, and thousands of servers like it.
This server
Across the catalogue