Skip to main content
Glama
Lumitorus

FreeCAD MCP Next

by Lumitorus

execute_code

Execute arbitrary Python code in FreeCAD and get printed output, with an optional screenshot to inspect model changes.

Instructions

Execute arbitrary Python code in FreeCAD.

Args:
    code: The Python code to execute.
    include_screenshot: Whether to return a screenshot of the model (default True).
        Set to False to save tokens when the code does not change the model's
        appearance, e.g. analytical or computational scripts whose result is
        printed output, or intermediate steps in a longer sequence of changes.
    view_name: The view orientation of the returned screenshot (default "Isometric").
        Pick the view that best shows the change being made.

Returns:
    A message indicating the success or failure of the code execution, the output of the code execution, and a screenshot of the object.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYes
view_nameNoIsometric
include_screenshotNo
Behavior4/5

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

No annotations are provided, so the description carries the burden. It clearly states the tool executes arbitrary Python code recognition of side effects and describes the return structure (message, output, screenshot). It also gives practical guidance on include_screenshot to save tokens when appearance doesn't change. However, it does not mention potential side effects like persistent changes to the model or security implications, but it's reasonable.

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

Conciseness5/5

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

Well-structured with Args and Returns sections. Every sentence adds value. No fluff.

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 a code execution tool, it covers purpose, parameters, and return values, and even gives usage guidance for include_screenshot. However, it doesn't differentiate from execute_code_async or mention potential restrictions. Given the complexity, it's fairly complete but could add a note about async or side effects.

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 coverage is 0% (no parameter descriptions in schema), so description must compensate. It does: explains code, include_screenshot with guidance, and view_name with suggestion to pick best view. This adds meaning beyond the schema, which only has types and enums.

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 purpose with a specific verb (execute) and resource (arbitrary Python code in FreeCAD). This distinguishes it from siblings like create_object and delete_object, and implicitly from execute_code_async via the 'arbitrary' qualifier.

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

Usage Guidelines2/5

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

The description does not explicitly state when to use this tool vs alternatives like execute_code_async, nor does it mention when not to use it. It only provides guidance for the include_screenshot parameter (e.g., set False for non-visual changes). No exclusions or alternatives are mentioned, so usage context is lacking.

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/Lumitorus/freecad-mcp-next'

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