Set workspace content
set_workspace_contentReplaces a workspace's blocks, links, and optional files or zones to build or update its content. Fetch existing content first so additions preserve current flows instead of overwriting them.
Instructions
REPLACES a workspace's blocks and links (it is not an append). This is how you build it. Call get_block_model first. To ADD to a workspace that already has content, you MUST first get_workspace_content, then send back the existing blocks+links PLUS your new ones (re-use the existing ids and signalRGuid/handlerCode it returns — they round-trip losslessly) so you don't wipe the user's existing flows. Omit block ids to have the server assign them; leave positions at 0 for auto-layout. Returns the canonical stored content. files are workspace code files a Process block can import "utils.js"; — OMIT to keep existing files, send an array (even []) to REPLACE them (get_workspace_content returns them for a lossless round-trip). zones are the named areas drawn behind the blocks; same rule (omit=keep, []=clear). See ZONES in get_block_model.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"workspaceId": "<workspaceId>",
"blocks": "<blocks>"
},
"name": "set_workspace_content"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| seo | No | How much to report about the HTML pages being written: "full" (default) everything, "minimal" only what an indexed page cannot do without, "none" to say nothing. Never blocks the write; a page with <meta name="robots" content="noindex"> is exempt either way. | |
| files | No | Reusable code files (import "x.js"). Omit=keep, []=clear. | |
| links | No | ||
| zones | No | Canvas areas. Omit=keep the workspace's zones, []=clear them. | |
| blocks | Yes | ||
| workspaceId | Yes |