xd_export_component
Export a single component master from an .xd file in the same format as artboard exports, with options for page, depth, assets folder, and semantic layer names.
Instructions
Export one component master (see xd_list_components) in the same format as xd_export_artboard.
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": "<file>",
"component": "<component>"
},
"name": "xd_export_component"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | Absolute path to a .xd file | |
| page | No | Page of a large export (see pageCount / hasMore in the result). | |
| depth | No | Max nesting depth (default: everything). Layers below the limit are marked truncated:true; nothing is ever cut silently. | |
| assetsDir | No | Optional absolute folder (inside the allowed roots). Referenced images are saved there as <imageRef>.<ext>. | |
| component | Yes | symbolId or component name | |
| semanticNames | No | Add suggestedName to every layer (numeric suffixes stripped, text-based names). |