Skip to content

Commit f1d7770

Browse files
committed
Add convertColors option to shape creation tools
1 parent 21a6afa commit f1d7770

File tree

4 files changed

+21
-3
lines changed

4 files changed

+21
-3
lines changed

build/index.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ server.tool("create_frame", "Create a frame shape in Frame0. Must add a new page
8181
height: frameSize.height + frameHeaderHeight,
8282
fillColor,
8383
},
84+
convertColors: true,
8485
});
8586
await command(apiPort, "view:fit-to-screen");
8687
const data = await command(apiPort, "shape:get-shape", {
@@ -142,6 +143,7 @@ server.tool("create_rectangle", `Create a rectangle shape in Frame0.`, {
142143
corners,
143144
},
144145
parentId,
146+
convertColors: true,
145147
});
146148
const data = await command(apiPort, "shape:get-shape", {
147149
shapeId,
@@ -191,6 +193,7 @@ server.tool("create_ellipse", `Create an ellipse shape in Frame0.`, {
191193
strokeColor,
192194
},
193195
parentId,
196+
convertColors: true,
194197
});
195198
const data = await command(apiPort, "shape:get-shape", {
196199
shapeId,
@@ -246,6 +249,7 @@ server.tool("create_text", "Create a text shape in Frame0.", {
246249
wordWrap: type === "paragraph",
247250
},
248251
parentId,
252+
convertColors: true,
249253
});
250254
const data = await command(apiPort, "shape:get-shape", {
251255
shapeId,
@@ -289,6 +293,7 @@ server.tool("create_line", "Create a line shape in Frame0.", {
289293
lineType: "straight",
290294
},
291295
parentId,
296+
convertColors: true,
292297
});
293298
const data = await command(apiPort, "shape:get-shape", {
294299
shapeId,
@@ -346,6 +351,7 @@ server.tool("create_polygon", "Create a polygon or polyline shape in Frame0.", {
346351
lineType: "straight",
347352
},
348353
parentId,
354+
convertColors: true,
349355
});
350356
const data = await command(apiPort, "shape:get-shape", {
351357
shapeId,
@@ -392,6 +398,7 @@ server.tool("create_connector", "Create a connector shape in Frame0.", {
392398
strokeColor,
393399
},
394400
parentId,
401+
convertColors: true,
395402
});
396403
const data = await command(apiPort, "shape:get-shape", {
397404
shapeId,
@@ -443,6 +450,7 @@ server.tool("create_icon", "Create an icon shape in Frame0.", {
443450
strokeColor,
444451
},
445452
parentId,
453+
convertColors: true,
446454
});
447455
const data = await command(apiPort, "shape:get-shape", {
448456
shapeId,
@@ -534,6 +542,7 @@ server.tool("update_shape", "Update properties of a shape in Frame0.", {
534542
corners,
535543
text,
536544
},
545+
convertColors: true,
537546
});
538547
const data = await command(apiPort, "shape:get-shape", {
539548
shapeId: updatedId,

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "frame0-mcp-server",
3-
"version": "0.11.2",
3+
"version": "0.11.3",
44
"type": "module",
55
"description": "",
66
"bin": {

src/index.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ server.tool(
9898
height: frameSize.height + frameHeaderHeight,
9999
fillColor,
100100
},
101+
convertColors: true,
101102
}
102103
);
103104
await command(apiPort, "view:fit-to-screen");
@@ -186,6 +187,7 @@ server.tool(
186187
corners,
187188
},
188189
parentId,
190+
convertColors: true,
189191
});
190192
const data = await command(apiPort, "shape:get-shape", {
191193
shapeId,
@@ -258,6 +260,7 @@ server.tool(
258260
strokeColor,
259261
},
260262
parentId,
263+
convertColors: true,
261264
});
262265
const data = await command(apiPort, "shape:get-shape", {
263266
shapeId,
@@ -343,6 +346,7 @@ server.tool(
343346
wordWrap: type === "paragraph",
344347
},
345348
parentId,
349+
convertColors: true,
346350
});
347351
const data = await command(apiPort, "shape:get-shape", {
348352
shapeId,
@@ -398,6 +402,7 @@ server.tool(
398402
lineType: "straight",
399403
},
400404
parentId,
405+
convertColors: true,
401406
});
402407
const data = await command(apiPort, "shape:get-shape", {
403408
shapeId,
@@ -471,6 +476,7 @@ server.tool(
471476
lineType: "straight",
472477
},
473478
parentId,
479+
convertColors: true,
474480
});
475481
const data = await command(apiPort, "shape:get-shape", {
476482
shapeId,
@@ -535,6 +541,7 @@ server.tool(
535541
strokeColor,
536542
},
537543
parentId,
544+
convertColors: true,
538545
});
539546
const data = await command(apiPort, "shape:get-shape", {
540547
shapeId,
@@ -604,6 +611,7 @@ server.tool(
604611
strokeColor,
605612
},
606613
parentId,
614+
convertColors: true,
607615
});
608616
const data = await command(apiPort, "shape:get-shape", {
609617
shapeId,
@@ -734,6 +742,7 @@ server.tool(
734742
corners,
735743
text,
736744
},
745+
convertColors: true,
737746
});
738747
const data = await command(apiPort, "shape:get-shape", {
739748
shapeId: updatedId,

0 commit comments

Comments
 (0)