Skip to main content
Glama

Update a design

update_design

Change an OpenSCAD design by exact text replacements or full code, validate it, and save the result as a new version while earlier versions stay available. Returns a rendered preview when the code is valid.

Instructions

OpenSCAD: changes a design and saves the result as a new version, either with edits (exact text replacements, the rest of the code stays untouched) or with the complete new code. Validates like create_design and returns an image of the rendered model when the code is valid. Earlier versions stay available.

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": {
      "name": "<name>"
    },
    "name": "update_design"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeNoComplete new source. Use this or `edits`.
nameYesDesign name, e.g. "broom-holder-28mm". Stored as lower-case letters, digits and dashes.
noteNoWhat changed, for the version history.
editsNoTargeted replacements, applied in order. Use this or `code`.
previewNoAttach an isometric image of the model when the code is valid. Default: true (server setting).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare non-read-only, non-destructive, non-idempotent, so the description needn't restate safety, and it adds real context instead: validation behaves like create_design, the rendered image is returned only when code is valid, and earlier versions stay available, which explains the non-idempotent hint. The one gap is what happens on invalid code — whether a version is still written or the call fails cleanly.

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

Conciseness5/5

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

A single front-loaded sentence: purpose and versioning first, then the two input modes, then validation and return behavior. Nothing is repeated from the schema and no sentence is filler.

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 five-parameter mutation tool with no output schema, the description covers the mode fork, validation, the returned image, and version retention — enough to call it correctly. It leaves open the failure path for invalid code and whether the design name must already exist, which an agent would want before retrying.

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

Parameters3/5

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

Schema coverage is 100%, so the baseline is 3; the schema already documents mutual exclusivity of `code` and `edits`, the exact-match nature of `old_string`, and the preview default. The description reinforces the key semantic that edits leave the remaining code untouched, but adds no syntax, ordering, or conflict-resolution detail beyond what the schema supplies.

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?

Names a specific verb (changes a design), the resource (design), and the persistence semantics (saves as a new version), then spells out the two mutually exclusive input modes: targeted `edits` versus complete `code`. An agent can tell this apart from create_design and from restore_version without opening the schema.

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

Usage Guidelines4/5

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

The description makes the mode-selection decision explicit (edits with the rest of the code untouched vs. full `code` replacement) and signals that prior versions remain, which implicitly points to restore_version as the recovery path. It stops short of stating when to prefer update_design over create_design, so it is clear context rather than full when/when-not guidance.

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