Skip to main content
Glama
pzfreo

build123d-mcp

save_drawing_annotations

Preserve label metadata from build123d drawings by saving annotations as a sidecar JSON file alongside the SVG, enabling later inspection and restoration of text content.

Instructions

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).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
svg_pathYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It discloses the sidecar file naming convention (<svg_path>.dims.json) and that inspect_drawing reads it automatically. It does not mention if existing files are overwritten, but overall behavior is well-explained.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with a brief introduction, a numbered workflow, and an args section. It is suitably detailed without being excessively verbose, front-loading the core purpose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (one parameter, no output schema), the description is complete. It covers purpose, workflow, parameter semantics, and ties into sibling tools (inspect_drawing). An agent has all necessary information to use it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so description must compensate. It explains the sole parameter 'svg_path' as 'path to the SVG file (sidecar written as <svg_path>.dims.json).' This adds meaning beyond the raw type, clarifying usage and naming.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Write a .dims.json sidecar file alongside an SVG with label metadata.' It explains the problem it solves (build123d renders Text as glyphs, not recoverable) and distinguishes itself from siblings like inspect_drawing, which reads the sidecar.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides a clear workflow: build drawing, export SVG, save annotations, inspect later. It specifies when to call the tool ('after completing a drawing... before or after exporting the SVG'). It lacks explicit when-not-to-use instructions, but the context is sufficient.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/pzfreo/build123d-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server