download_layer_asset
Downloads a layer's visual asset (SVG, PNG, PDF, JPG) from Zeplin and saves it to a local path. Use when an asset is missing from the codebase.
Instructions
Downloads a specific visual asset (e.g., SVG icon, PNG image) for a given layer from Zeplin and saves it to a local path. Use this tool when an asset referenced in the design (obtained from get_screen or get_component) is missing from the codebase and needs to be fetched directly from Zeplin.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| layerSourceId | Yes | The unique source ID of the layer for which the asset should be downloaded. This ID is obtained from the `layers` array in the response of `get_screen` or `get_component` calls, from a `sourceId` or similar field associated with a specific layer that has exportable assets | |
| localPath | Yes | The absolute path to the directory where images/assets are stored in the project. If the directory does not exist, it will be created. The format of this path should respect the directory format of the operating system you are running on. Don't use any special character escaping in the path name either. | |
| assetType | Yes | The desired format of the asset to download. Must be one of 'svg', 'png', 'jpg', or 'pdf'. Choose the format most suitable for the project's needs or as indicated by design specifications. If unsure, 'svg' is often preferred for vector graphics and 'png' for bitmaps. |