Skip to main content
Glama

run_script

Run custom FreeCAD Python on a document when no dedicated CAD tool fits; save changes, return printed output and a result dict, and add generated geometry via add_shape.

Instructions

Escape hatch: run arbitrary FreeCAD Python in the worker on doc (saved afterwards). Predefined: App (=FreeCAD), Part, V (Vector), doc, result (a dict you can fill; it is returned), add_shape(doc, name, shape, material=None). print() output is returned. Use only when no dedicated tool fits; geometry made here should go in via add_shape so other tools see it.

Input Schema

NameRequiredDescriptionDefault
docYes
codeYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses the side effect ('doc' is saved afterwards), the injected namespace (App, Part, V, doc, result, add_shape), and that print() output is returned. It omits irreversibility/undo implications of executing arbitrary code, which is the one behavioral gap.

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?

Front-loaded with the essential framing ('Escape hatch'), then namespace, then routing guidance — every clause earns its place. The parenthetical stacking makes it dense, but nothing is wasted or redundant.

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

Completeness4/5

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

For an arbitrary-code-execution tool with no annotations, the definition covers side effects, the scripting environment, and output channels (print plus result dict), and an output schema exists so return values need no further explanation. Only the risk/undo profile is left implicit.

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 coverage is 0%, so the description must compensate and largely does: `code` is defined by the available namespace and the `result` dict contract, and `doc` by the note that it is the document acted on and saved. Neither is exhaustively specified (e.g. accepted doc identifier format), but the semantics are clear.

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?

Names a specific verb+resource ('run arbitrary FreeCAD Python in the worker on `doc`') and frames itself explicitly as an 'Escape hatch', which no sibling claims. Against 40+ dedicated modeling siblings, the boundary is unambiguous.

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?

Explicit exclusion: 'Use only when no dedicated tool fits', plus a positive routing rule that geometry should go in via add_shape so other tools see it. It does not name which siblings to prefer for common tasks, but the fallback-of-last-resort rule is clearly stated.

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