Skip to main content
Glama

execute_code

Execute Python code within FreeCAD to create, edit, or manage 3D objects and documents, with results including output and screenshots.

Instructions

Execute arbitrary Python code in FreeCAD.

Args:
    code: The Python code to execute.

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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior2/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 that execution returns success/failure, output, and a screenshot, which adds value beyond the input schema. However, it lacks critical behavioral details: it doesn't specify security implications (e.g., arbitrary code execution risks), side effects (e.g., modifying FreeCAD state), or error handling (e.g., exceptions). For a tool with no annotations and high-stakes behavior, this is a significant 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?

The description is appropriately sized and front-loaded: the first sentence states the purpose clearly, followed by structured Args and Returns sections. Every sentence adds value (e.g., explaining the return components). It could be slightly more concise by integrating the Args/Returns into a single paragraph, but it's efficient overall.

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

Completeness3/5

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

Given the tool's complexity (executing arbitrary code) and the presence of an output schema (which covers return values), the description is moderately complete. It explains the purpose and return components, but lacks context on safety, dependencies, or integration with sibling tools (e.g., how code execution relates to document/object operations). With no annotations and high stakes, it should do more to guide safe usage.

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?

The description adds meaningful context for the single parameter: 'code: The Python code to execute.' With 0% schema description coverage and only one parameter, this compensates well by clarifying the parameter's role. It doesn't detail syntax or constraints (e.g., valid Python versions), but for a single parameter, this is adequate to earn a high score.

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 tool's purpose: 'Execute arbitrary Python code in FreeCAD.' It specifies the verb ('execute') and resource ('Python code'), and distinguishes it from siblings like create_object or edit_object by focusing on code execution rather than object manipulation. However, it doesn't explicitly differentiate from potential code-related siblings (none listed), keeping it from a perfect 5.

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 provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing an active document), exclusions, or compare it to other tools like edit_object for scripting. The agent must infer usage from the purpose alone, which is insufficient for informed selection.

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/lzy-hhhh/freeCAD'

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