write_part
Replaces a part's build123d script with new code so you can define build(d), dimensions, and variants, then build and verify an FDM 3D-printable part. Confirm dimensions with the user before writing.
Instructions
Replace the whole part script with code (create the part with new_part first).
The script must define build(d) (+ Dims, VARIANTS). If you haven't, call read_guide first;
confirm the dimensions with the user before writing the script. Then call build_part.
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": {
"name": "<name>",
"code": "<code>"
},
"name": "write_part"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | ||
| name | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |