script
Assemble all executed code blocks into a single Python script and optionally save it to a file, enabling reproducible CAD model exports.
Instructions
Return a single Python script assembled from all successfully executed code blocks in this session. Prepends 'from build123d import *' if not already present. If save_to is given, writes the script to that path and returns {script_path, blocks}; otherwise returns {script, blocks}. Useful for exporting a reproducible script after an interactive session.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "script"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| save_to | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |