Skip to main content
Glama
maximedns5

freecad-mcp

by maximedns5

create_object

Create a new FreeCAD object by specifying its type, name, and properties. Get success feedback, a screenshot, and an automatically resolved object name to avoid collisions.

Instructions

Create a new object in FreeCAD. Object type is starts with "Part::" or "Draft::" or "PartDesign::" or "Fem::".

For sketch-based solids (a body you'll pad/pocket/fillet/pattern), prefer
create_sketch + add_rectangle/add_circle/add_polygon + pad/pocket instead
— those tools verify the result (volume, isValid, fullyConstrained)
instead of only reporting whether the FreeCAD call raised.

Args:
    doc_name: The name of the document to create the object in.
    obj_type: The type of the object to create (e.g. 'Part::Box', 'Part::Cylinder', 'Draft::Circle', 'PartDesign::Body', etc.).
    obj_name: The name of the object to create.
    obj_properties: The properties of the object to create.

Returns:
    A message indicating the success or failure of the object creation and a screenshot of the object.
    The response's object_name is the name FreeCAD actually assigned,
    which can differ from the obj_name you requested: a FreeCAD document
    is one flat namespace, so a name collision (e.g. two components both
    naming a pad "leg_pad") is silently resolved by FreeCAD appending a
    suffix ("leg_pad001"). Always use the returned object_name in later
    calls, not the name you requested.

Examples:
    If you want to create a cylinder with a height of 30 and a radius of 10, you can use the following data.
    ```json
    {
        "doc_name": "MyCylinder",
        "obj_name": "Cylinder",
        "obj_type": "Part::Cylinder",
        "obj_properties": {
            "Height": 30,
            "Radius": 10,
            "Placement": {
                "Base": {
                    "x": 10,
                    "y": 10,
                    "z": 0
                },
                "Rotation": {
                    "Axis": {
                        "x": 0,
                        "y": 0,
                        "z": 1
                    },
                    "Angle": 45
                }
            },
            "ViewObject": {
                "ShapeColor": [0.5, 0.5, 0.5, 1.0]
            }
        }
    }
    ```

    If you want to create a circle with a radius of 10, you can use the following data.
    ```json
    {
        "doc_name": "MyCircle",
        "obj_name": "Circle",
        "obj_type": "Draft::Circle",
    }
    ```

    If you want to create a FEM analysis, you can use the following data.
    ```json
    {
        "doc_name": "MyFEMAnalysis",
        "obj_name": "FemAnalysis",
        "obj_type": "Fem::AnalysisPython",
    }
    ```

    If you want to create a FEM constraint, you can use the following data.
    ```json
    {
        "doc_name": "MyFEMConstraint",
        "obj_name": "FemConstraint",
        "obj_type": "Fem::ConstraintFixed",
        "analysis_name": "MyFEMAnalysis",
        "obj_properties": {
            "References": [
                {
                    "object_name": "MyObject",
                    "face": "Face1"
                }
            ]
        }
    }
    ```

    If you want to create a FEM mechanical material, you can use the following data.
    ```json
    {
        "doc_name": "MyFEMAnalysis",
        "obj_name": "FemMechanicalMaterial",
        "obj_type": "Fem::MaterialCommon",
        "analysis_name": "MyFEMAnalysis",
        "obj_properties": {
            "Material": {
                "Name": "MyMaterial",
                "Density": "7900 kg/m^3",
                "YoungModulus": "210 GPa",
                "PoissonRatio": 0.3
            }
        }
    }
    ```

    If you want to create a FEM mesh, you can use the following data.
    The `Shape` property is required (legacy `Part` is also accepted).
    On FreeCAD 1.x the size limits are `CharacteristicLengthMax/Min`;
    the legacy `ElementSizeMax/Min` keys are also accepted.
    ```json
    {
        "doc_name": "MyFEMMesh",
        "obj_name": "FemMesh",
        "obj_type": "Fem::FemMeshGmsh",
        "analysis_name": "MyFEMAnalysis",
        "obj_properties": {
            "Shape": "MyObject",
            "CharacteristicLengthMax": 10,
            "CharacteristicLengthMin": 0.1
        }
    }
    ```

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
doc_nameYes
obj_nameYes
obj_typeYes
analysis_nameNo
obj_propertiesNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

With no annotations, the description fully explains critical behavioral nuances: name collisions are silently resolved by appending a suffix, return object_name may differ from the requested name, and this tool only reports whether the FreeCAD call raised rather than verifying volume/isValid/fullyConstrained. This goes well beyond the structured schema.

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 lengthy due to five JSON examples, but each example demonstrates distinct object types and property schemas, which are highly valuable. The narrative is dense and front-loaded; while it could be trimmed, the length is justified by the tool's complexity.

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 schema lacks descriptions for 5 parameters and has nested objects, the description compensates thoroughly: it covers type prefixes, when to avoid this tool, naming collision behavior, FEM-specific property keys (CharacteristicLengthMax/Min vs legacy), and return semantics. It is exceptionally complete for a tool of this complexity.

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 Args section explicitly describes doc_name, obj_type, obj_name, and obj_properties, and examples show detailed property structures (e.g., Placement for cylinders, References for FEM constraints). However, analysis_name is only introduced in examples and not described in Args, leaving a minor gap for one parameter.

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 states 'Create a new object in FreeCAD' and clarifies the allowed object type prefixes. It explicitly contrasts with sketch-based workflows (create_sketch/pad/pocket), distinguishing this generic creation tool from its siblings like create_sketch.

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

Usage Guidelines5/5

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

It provides explicit guidance: 'For sketch-based solids... prefer create_sketch + add_rectangle/add_circle/add_polygon + pad/pocket instead', with a reason (those tools verify results), and it includes examples for FEM objects. This clearly tells the agent when to use this tool vs alternatives.

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

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