fetch_frame
Export a Figma frame to local files: render its PNG, node JSON, and image-fill map with verification hashes. Use to capture frame assets and metadata while preserving unrelated files.
Instructions
Read one Figma frame and transactionally write frame.png, node.json, and a normalized imageRef-to-URL fills.json map under the output directory. Returns upstream request proof plus local size, SHA-256, PNG structure/dimensions, and JSON read-back proof. Existing unrelated files are preserved.
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": {
"file_key": "<file_key>",
"node_id": "<node_id>",
"out_dir": "<out_dir>"
},
"name": "fetch_frame"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scale | No | PNG scale from 0.01 through 4; default 1. | |
| node_id | Yes | Exact frame node ID, normally colon-form such as 2968:811. | |
| out_dir | Yes | Output directory for this frame. Relative paths resolve below the output root (default ./figma-output), which is created on first use; absolute paths must stay below it. | |
| file_key | Yes | File key parsed from the Figma URL. |