feat: add get_node_screenshot tool for Figma integration#279
feat: add get_node_screenshot tool for Figma integration#279yinvoke wants to merge 1 commit intoGLips:mainfrom
Conversation
|
Thanks for the contribution — this is a clean implementation and the approach (base64 I'm going to close this for now, but I want to explain why and see if we can collaborate on a better solution. Why not a separate toolThe server is intentionally designed around a minimal tool surface: one tool to get structured design data, one to download images. Adding a screenshot tool changes the decision model for LLMs — they now have to decide when to pull a screenshot, and in practice many models will default to doing it on every request, burning context and Figma API calls for unclear benefit. I want to keep the tool surface simple. Where screenshots would be valuableThere's one case where I think visual data fills a real gap. The server collapses frames whose entire subtree is vector nodes (rectangles, lines, paths, etc.) into a single node — this keeps the output small, but it means full illustrations, icons, and vector-based background art get reduced to just a name, size, and position. If that top-level frame is named something like "Frame 47," the model has no idea what it's looking at. A screenshot of those specific nodes would genuinely help. But rather than a separate tool that the model calls ad hoc, the better design is probably to embed that information into the What were you solving for?Looking at your screenshot, it looks like there may be a vector illustration in the center of the design. Was the collapsed-SVG problem what you were running into? Or was there a different case where the structured data wasn't giving the model enough to work with? I'd love to understand the specific pain point — if we can nail down the problem, I think we can find a solution that's baked into the data itself rather than adding a new tool. |
|
To enhance the AI's visual output, I will provide additional screenshots in the following two scenarios:
|
I have incorporated a tool named "get_node_screenshot" to enhance the visual effects of design mockups. This tool aids the model in more precisely rendering pages and improves the fidelity of mockup restoration, particularly in cases where r third-party components are utilized or automatic layout is unavailable.
example:
