save_drawing_annotations
Save drawing annotation metadata to a sidecar .dims.json file so label strings from build123d dimensions and leaders can be restored when inspecting an SVG later.
Instructions
DEPRECATED (#465) — moved to draftwright; off by default in 0.4.0, removed in 0.5.0. Calling it explains the replacement. Write a .dims.json sidecar file alongside an SVG with label metadata.
build123d renders Text as filled glyph paths, not <text> SVG elements, so
label strings are irrecoverable from a finished SVG. Call this tool after
completing a drawing (annotate all dims/leaders with annotate()) and before
or after exporting the SVG. The sidecar is read automatically by
inspect_drawing(svg_path=...) to restore annotation content.
Workflow:
1. Build your drawing with Dimension / Leader / annotate()
2. Export SVG: execute("exporter.write('drawing.svg')")
3. Save metadata: save_drawing_annotations("drawing.svg")
4. Inspect later: inspect_drawing(svg_path="drawing.svg")
→ includes full annotations dict from the sidecar
Args:
svg_path: path to the SVG file (sidecar written as <svg_path>.dims.json).
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": {
"svg_path": "<svg_path>"
},
"name": "save_drawing_annotations"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| svg_path | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |