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 type 'infographic', provide a plain-English description instead (the system designs the AntV infographic spec). |
caption | string | — | 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 | — | 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.
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 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 signalsHigh parameter count (11 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 11 parameters: x, y, fit, align, width, height, source, caption, documentId, diagramType, updateElementId. 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