save_component
Deterministically writes component code to the exact path, removes Figma node IDs, and auto-updates the index.ts barrel export.
Instructions
Deterministic write op: strip data-node-id, write to the exact path, and auto-update the index.ts barrel export.
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": {
"code": "<code>",
"componentName": "<componentName>",
"projectRoot": "<projectRoot>"
},
"name": "save_component"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | ||
| featureDir | No | ||
| projectRoot | Yes | ||
| componentName | Yes |