Skip to main content
Glama
neka-nat
by neka-nat

execute_code

Run Python code directly in FreeCAD to control its functionality. Returns execution status, output, and object screenshots for integration and automation tasks.

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
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses that the tool executes arbitrary Python code, which implies mutation and potential side effects, but doesn't specify permissions needed, safety warnings (e.g., code could crash FreeCAD), or rate limits. The description adds some context by mentioning a screenshot output, but behavioral details are limited.

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, starting with the core purpose. The Args and Returns sections are structured but slightly verbose; every sentence adds value, such as specifying the return includes a screenshot. Minor improvements could make it more concise, but it's efficient overall.

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?

Given the tool's complexity (executing arbitrary code) and no annotations, the description is reasonably complete. It explains the parameter, return values (success/failure message, output, screenshot), and has an output schema. However, it lacks details on error handling or execution environment, which could enhance completeness for such a powerful tool.

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 significant meaning beyond the input schema, which has 0% description coverage. It explains that the 'code' parameter is 'The Python code to execute,' clarifying its purpose and format. With only one parameter and no schema descriptions, this compensates well, though it could detail constraints like code length or allowed modules.

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'), though it doesn't explicitly differentiate from sibling tools like 'edit_object' or 'create_object' that might also involve code execution in FreeCAD. The purpose is specific but lacks sibling distinction.

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, such as needing an active FreeCAD document, or compare it to siblings like 'edit_object' for modifying objects. Usage is implied only by the purpose statement, with no explicit when/when-not instructions.

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

Related 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/neka-nat/freecad-mcp'

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