updateDiagramInDocument

Update a diagram's code, description, or properties. Call getDiagramTypeGuide for DSL syntax. New diagramCode is COMPILE-CHECKED BY RENDERING at write time — broken DSL is rejected with the renderer's error — and a valid change is re-rendered + re-thumbnailed immediately (response diagram.renderS...

SERVERStable Baseline SOURCEhttps://api.stablebaseline.io/functions/v1/cloud-serve/mcp
Medium RISK CLASS
Category Write
Parameters 91 required
Recommended Rate-limitedsee the rule below
Registry record Grade F, identity unverified Pull the record →

This record as markdown: /tools/io-stablebaseline-sb/updatediagramindocument.md

What updateDiagramInDocument does on Stable Baseline

AI agents use updateDiagramInDocument 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.

ParameterTypeRequiredDescription
align string Alignment.
prompt string New short description (metadata only — does NOT change the rendered diagram).
caption string New caption.
colorPlan object BPMN only. Updated color plan. Set to null to remove.
diagramId string Yes Diagram ID from DIAGRAM_OMITTED markers.
diagramCode string New diagram DSL source code. REQUIRED to change what the diagram visually renders. Call getDiagramTypeGuide for syntax. Must provide the COMPLETE updated DSL, n
nlDescription string New extended description (metadata only — does NOT change the rendered diagram).
diagramVersionTimestamp number Diagram-level optimistic lock: versionTimestamp of THIS diagram (from getDiagramInDocument, getDocument with includeDiagramDsl:true, or a previous write's respo
documentVersionTimestamp number Document-level optimistic lock: versionTimestamp from getDocument(). Locks the whole document. Provide this OR diagramVersionTimestamp (at least one is required

Parameters from the server's own tool schema.

Why updateDiagramInDocument is rated Medium

An AI agent can call updateDiagramInDocument 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 (10 properties)

Questions about updateDiagramInDocument

What does the updateDiagramInDocument tool do? +

Update a diagram's code, description, or properties. Call getDiagramTypeGuide for DSL syntax. New diagramCode is COMPILE-CHECKED BY RENDERING at write time — broken DSL is rejected with the renderer's error — and a valid change is re-rendered + re-thumbnailed immediately (response diagram.renderStatus tells you the outcome). Provide a version lock: diagramVersionTimestamp (from getDiagramInDocument, getDocument with includeDiagramDsl:true, or any diagram write's response — PREFERRED: locks just this diagram, so concurrent edits elsewhere in the document don't conflict; bare versionTimestamp is accepted as an alias) OR documentVersionTimestamp (locks the whole document). The response returns BOTH fresh tokens for chaining. Documents carrying a legacy marker (no embedded diagramId) are upgraded automatically on update. IMPORTANT: to change what the diagram visually shows you MUST provide diagramCode with the full updated DSL source — prompt/nlDescription are metadata only. After updating, view it with getDiagramImage and keep prompt/nlDescription in step with what the diagram now shows. 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.

What parameters does updateDiagramInDocument accept? +

updateDiagramInDocument accepts 9 parameters: align, prompt, caption, colorPlan, diagramId, diagramCode, nlDescription, diagramVersionTimestamp, documentVersionTimestamp. Required: diagramId. The full parameter table on this page comes from the server's own tool schema.

How do I enforce a policy on updateDiagramInDocument? +

Register the Stable Baseline MCP server in PolicyLayer and add a rule for updateDiagramInDocument: 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.

What risk level is updateDiagramInDocument? +

updateDiagramInDocument is a Write tool with medium risk. Write tools should be rate-limited to prevent accidental bulk modifications.

Can I rate-limit updateDiagramInDocument? +

Yes. Add a rate_limit block to the updateDiagramInDocument 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.

How do I block updateDiagramInDocument completely? +

Set action: deny in the PolicyLayer policy for updateDiagramInDocument. 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.

What MCP server provides updateDiagramInDocument? +

updateDiagramInDocument 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.

Across the catalogue

// THE MCP REGISTRY

PolicyLayer tracks 44,603 MCP servers and 515,000+ tools.

Every server has a live record: who publishes it, whether it answers without auth, its risk grade, every tool classified, the recommended policy. This page is one line of Stable Baseline's. Pull the full record:

Teams ship this data inside their own products. See what a licence covers →

// GET IN TOUCH

Have a question or want to learn more? Send us a message.

Message sent.

We'll get back to you soon.