Skip to content

Commit 68fbc87

Browse files
authored
fix: update Node ID regex to support additional formats in download i… (#227)
* fix: Update Node ID regex to support additional formats, e.g. multiple nodes.
1 parent 33fc392 commit 68fbc87

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/twelve-plums-sell.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"figma-developer-mcp": patch
3+
---
4+
5+
Update Node ID regex to support additional formats, e.g. multiple nodes.

src/mcp/tools/download-figma-images-tool.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const parameters = {
1111
.object({
1212
nodeId: z
1313
.string()
14-
.regex(/^\d+:\d+$/, "Node ID must be in the format of 'number:number'")
14+
.regex(/^I?\d+:\d+(?:;\d+:\d+)*$/, "Node ID must be like '1234:5678' or 'I5666:180910;1:10515;1:10336'")
1515
.describe("The ID of the Figma image node to fetch, formatted as 1234:5678"),
1616
imageRef: z
1717
.string()

0 commit comments

Comments
 (0)