Skip to main content
Glama

Set workspace content

set_workspace_content

Replaces 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

NameRequiredDescriptionDefault
seoNoHow 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.
filesNoReusable code files (import "x.js"). Omit=keep, []=clear.
linksNo
zonesNoCanvas areas. Omit=keep the workspace's zones, []=clear them.
blocksYes
workspaceIdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.53.0

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden and does so well: replacement semantics, id assignment by the server, auto-layout when positions are 0, and the omit-vs-empty-array distinction for files and zones. It also states the return value ("the canonical stored content"). It stops short of auth/permission requirements and failure behavior for concurrent edits, which keeps it from a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Dense but front-loaded: the replace warning and the prerequisite lead. Minor waste from restating the omit=keep/[]=replace rule for files in both prose and adjacent clauses, and the parenthetical re-explanation of it.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a destructive, multi-parameter write tool with no annotations and no output schema, it covers the critical hazards and workflow steps. Remaining gaps are the undocumented `links`/`seo` arguments and any statement about what happens on invalid block types.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

At 50% schema coverage, the description adds real meaning beyond the schema for blocks, files and zones, including the lossless round-trip contract and the `import "utils.js"` use case. However, `links` and `seo` are never mentioned in the description, leaving two top-level parameters explained only by schema text.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource and emphasizes the destructive REPLACE semantics in capitals up front ("REPLACES a workspace's blocks and links (it is not an append)"). It explicitly distinguishes itself from the additive path by naming get_workspace_content and get_block_model, so an agent can route correctly without opening a schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives concrete preconditions ("Call get_block_model first") and an explicit procedure for the alternative path (fetch existing content, merge new blocks+links, reuse ids/signalRGuid/handlerCode). It also flags the failure mode ("so you don't wipe the user's existing flows"), which is exactly the when/when-not guidance an agent needs.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.