Skip to main content
Glama
pzfreo

build123d-mcp

execute_file

Runs a build123d script in a clean namespace and promotes the resulting shape for further CAD work; restores the previous model if the script errors, times out, or produces no shape.

Instructions

Execute a canonical build123d .py file in a clean namespace and atomically promote its result. The prior active model is restored if the source has a syntax/runtime error, times out, produces no shape, or does not produce result_name. Assign a Shape to result or call show(); optionally set result_name to require/register a specific Shape or BuildPart variable. snapshot saves the promoted geometry checkpoint. Returns source SHA-256 provenance plus captured output. The source must be UTF-8, under an allowed read root, and no larger than BUILD123D_MAX_SCRIPT_BYTES (default 2 MiB). Use this for substantial generation revisions: edit model.py, execute_file(), then validate/measure/render/export through MCP.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
snapshotNo
result_nameNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.3.90

TDQS

A4.5/5.0
Behavior5/5

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

Beyond the minimal annotations, the description richly discloses behavior: atomic promotion, restoration of the prior active model on failure, required result assignment, timeout/size/root constraints, snapshot behavior, and provenance output. This is far more than the annotations alone provide.

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 dense and on the longer side, but it is logically organized and every clause adds operational value. The core purpose is front-loaded, followed by failure semantics, parameters, constraints, and workflow guidance.

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 complexity, the description covers execution semantics, error conditions, parameter behavior, safety constraints, return value, and recommended workflow. An output schema exists, so detailed return-value documentation is not required.

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

Parameters5/5

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

Schema description coverage is 0%, but the description compensates thoroughly. It explains that path points to a UTF-8 .py file under an allowed read root, that result_name requires/registers a specific Shape or BuildPart variable, and that snapshot saves the promoted geometry checkpoint.

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

Purpose4/5

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

The description clearly states the verb and resource: execute a canonical build123d .py file and atomically promote its result. It is specific enough to be distinguished from most siblings, though it does not explicitly contrast itself with the similarly named 'execute' sibling.

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?

It gives an explicit usage context: 'Use this for substantial generation revisions: edit model.py, execute_file(), then validate/measure/render/export through MCP.' This tells the agent when to choose this tool, but it does not state when not to use it or name alternatives such as 'execute' or 'script'.

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