From 141847585e79c629cd8734759baa8defa1c4bce3 Mon Sep 17 00:00:00 2001 From: Dominik Jain Date: Sat, 14 Feb 2026 01:58:22 +0100 Subject: [PATCH] :construction: Temporary workaround for fills/strokes being read-only Add instructions to make the limintations. Once #8357 is resolved, this can be reverted. --- mcp/packages/server/data/initial_instructions.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mcp/packages/server/data/initial_instructions.md b/mcp/packages/server/data/initial_instructions.md index 720a34eee5..eedb5f3804 100644 --- a/mcp/packages/server/data/initial_instructions.md +++ b/mcp/packages/server/data/initial_instructions.md @@ -48,6 +48,8 @@ Actual low-level shape types are `Rectangle`, `Path`, `Text`, `Ellipse`, `Image` **Other Writable Properties**: * `name` - Shape name * `fills`, `strokes` - Styling properties + IMPORTANT: The contents of the arrays are read-only. You cannot modify individual fills/strokes; you need to replace the entire array to change them, e.g. + `shape.fills = [{ fillColor: "#FF0000", fillOpacity: 1 }]` to set a single red fill. * `rotation`, `opacity`, `blocked`, `hidden`, `visible` **Z-Order**: