Update one block
update_blockEdit a single workspace block in place by sending only the fields to change; all other blocks, links, files, and layout stay untouched.
Instructions
Changes ONE block in place. THIS is how you fix a block — do NOT re-send the whole workspace with set_workspace_content to edit one field, and do NOT append a 'v2' block next to a broken one. Send only the fields you're changing: everything else on the block, all other blocks, the links, the code files, the camera and the hand-placed layout are untouched. Send "" to clear a field. Get the blockId from get_workspace_content. Returns the block as it now stands.
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>",
"blockId": "<blockId>"
},
"name": "update_block"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| i | No | Grid column. Omit to leave the block where it is. | |
| j | No | Grid row. | |
| code | No | JavaScript for a Process block. | |
| type | No | Block type. Changing to/from "SignalR" is rejected — replace the content instead. | |
| color | No | ||
| label | No | ||
| blockId | Yes | The block's id, as returned by get_workspace_content. | |
| rawData | No | Static JSON/text for a Raw data / API Endpoint block. | |
| staticFile | No | For an API Endpoint block: a workspace code file served verbatim, no JS executed. | |
| handlerCode | No | For a "SignalR" block: the C# handler body. | |
| workspaceId | Yes | ||
| endpointPath | No |