MCP ScannerCustom audit
All servers

spkane/freecad-addon-robust-mcp-server

The FreeCAD Robust MCP server and MCP Bridge Workbench/Addon

Publisherspkane community
MCP Registrynot listed
Scanned2026-11-25
Scannerv1.3.0
Methodologyv1.2
Stars 270Forks 64Last push 2026-11-15
Python 100.0%by source files the scanner reads
Code safetypartly tracedExposure9.8Prompts10.0Supply chain7.0Secrets10.0Transparency10.0
Analysis confidence90%
How much of the server the scanner could read: tools analyzed, files parsed, limits hit.
Code Safetypartly traced—

Paths from tool input into commands, SQL, files and URLs

Capability Exposure9.8/10Good

How much power the tools give an agent over the machine

Prompt Integritynothing published yet10.0/10

Hidden instructions and poisoning in text for the model

Supply Chain7.0/10Fair

Known vulnerabilities in the packages the server uses

Secrets & Credentialsnothing published yet10.0/10

How the server reads credentials and where they can go

Behavior Transparencynothing published yet10.0/10

Whether the tools do only what their descriptions say

How far the analysis went

The scanner traces each tool from its input to the operations its code performs, and here it could not follow every path. Code Safety is shown as partly traced instead of a score: no finding there is not a clean result. The score of Capability Exposure counts only what it could follow.

  • In 127 places a tool's input is handed to a function whose name matches several definitions in the code; the scanner could not tell which one runs, so it stopped there
  • 2 of 182 tools, prompts and resources could not be followed through the code
  • 11 tools, prompts and resources registered only in the repository's tests are not counted on this page

Top risks in plain words

  • INFONo published risk: no tool declared to run commands, files, addresses or queries of the caller's choice, no known vulnerability in a production package, no advisory. Not every path through the code could be followed. Code findings appear here only after a person has verified them.

How to use it safely

Practical steps from what we found in this server. They lower the risk; they do not replace a review of the code.

  • Give it a narrowly scoped token

    Its code reads credentials or environment variables. Use a key limited to what this server needs, not your main one.

  • Keep confirmations on

    Leave your MCP client's confirmation prompt on for tools that change files, run commands or send data.

What its tools can do on your machine

The server offers 146 tools, 13 resources, 12 prompts. When an AI agent calls them, this is what their code can do on the machine where the server runs, as traced in the source. Tools that call code the scanner could not follow may do more.

Read or write filesopen, create, change or delete files
close_document
1 of 171
Read environment variablesoften where API keys are kept
get_mcp_server_environment
1 of 171

No tool was seen to: start other programs on the machine; connect to the internet or other hosts; read passwords, tokens or keys; touch sensitive locations.

Where its requests and secrets go

Read from the names along each tool's calls, not from a run: what the code says, not every address it may reach at run time.

Hosts written in the code

The literal addresses the tools' requests name.

  • None: no request names a fixed host.
Addresses from settings

Constants or settings that start an address; the value comes from configuration.

  • None seen.
Secrets it reads

Credential-like environment variables. Give the server a key with the least access it needs.

  • None: no credential-like variable is read by the tools.

Text it brings in from outside

Text that reaches the model from outside: an instruction hidden in it can steer the agent (prompt injection). Treat what these tools return as data, not as orders.

  • files1 tool · close_document
Reads private data1 tool
Takes text from outside0 tools
Can send data out0 tools

Not all three are present in the tools the scanner traced.

Tool annotations

No tool declares MCP annotations (readOnlyHint, destructiveHint and the rest). Clients use them to decide what to confirm; directories such as Anthropic's and OpenAI's ask for them.

Tools, prompts and resources (171: 146 tools, 13 resources, 12 prompts)

Open a row for its full description. Chips show what its code can reach, and which risky capability its own description declares.

analyze_shapeprompt Guide for analyzing shape geometry and properties.
Guide for analyzing shape geometry and properties.

        Returns:
            Shape analysis guidance.
boolean_operations_guideprompt Guide for performing boolean operations on shapes.
Guide for performing boolean operations on shapes.

        Returns:
            Boolean operations guidance.
create_sketch_guideprompt Guide for creating 2D sketches for part design.
Guide for creating 2D sketches for part design.

        Args:
            shape_type: Type of shape (rectangle, circle, polygon).
            plane: Sketch plane (XY, XZ, YZ).

        Returns:
            Sketch creation guidance.
debug_modelprompt Guide for debugging FreeCAD model issues.
Guide for debugging FreeCAD model issues.

        Returns:
            Model debugging guidance.
design_partprompt Generate a guided workflow for designing a parametric part.
Generate a guided workflow for designing a parametric part.

        Use this prompt when a user wants to create a new part from scratch.
        It provides step-by-step guidance for the PartDesign workflow.

        Args:
            description: Natural language description of the desired part.
            units: Unit system to use (mm, cm, m, in).

        Returns:
            Structured prompt guiding through part design.
export_guideprompt Guide for exporting FreeCAD models to various formats.
Guide for exporting FreeCAD models to various formats.

        Args:
            target_format: Target export format (STEP, STL, OBJ, IGES).

        Returns:
            Export guidance for the specified format.
freecad_guidanceprompt Get AI guidance for specific FreeCAD task types.
Get AI guidance for specific FreeCAD task types.

        This prompt provides targeted best practices and reminders
        for different types of FreeCAD operations. Use at the start
        of a task to get relevant guidance.

        Args:
            task_type: Type of task - one of:
                - "general": Overall best practices
                - "partdesign": Parametric part creation
                - "sketching": 2D sketch creation
                - "boolean": Boolean operations
                - "export": File export operations
                - "cam": CAM jobs, toolpaths and G-code
                - "debugging": Troubleshooting issues
                - "validation": Checking model health

        Returns:
            Targeted guidance for the task type.

        Example:
            Get PartDesign workflow guidance::

                guidance = await freecad_guidance(task_type="partdesign")
freecad_startupprompt Essential startup guidance for AI assistants.
Essential startup guidance for AI assistants.

        **RECOMMENDED**: Configure your MCP client to automatically invoke
        this prompt when connecting to the FreeCAD MCP server. This provides
        critical context for reliable FreeCAD operations.

        This prompt provides:
        - Session initialization checklist
        - Critical patterns to follow
        - Version compatibility notes
        - Quick reference for common operations

        Returns:
            Essential startup guidance for FreeCAD MCP sessions.

        Example:
            Invoke via MCP prompt mechanism::

                # In an MCP client
                guidance = await mcp.get_prompt("freecad_startup")
                print(guidance)  # Displays session initialization checklist
import_guideprompt Guide for importing models into FreeCAD.
Guide for importing models into FreeCAD.

        Args:
            source_format: Source file format (STEP, STL).

        Returns:
            Import guidance for the specified format.
macro_developmentprompt Guide for developing FreeCAD macros.
Guide for developing FreeCAD macros.

        Returns:
            Macro development guidance.
python_api_referenceprompt Quick reference for common FreeCAD Python API operations.
Quick reference for common FreeCAD Python API operations.

        Returns:
            Python API reference.
troubleshootingprompt General troubleshooting guide for FreeCAD Robust MCP.
General troubleshooting guide for FreeCAD Robust MCP.

        Returns:
            Troubleshooting guidance.
resource_active_documentresource Get the currently active document.
Get the currently active document.

        Returns:
            JSON string containing active document info or null.
resource_active_workbenchresource Get the currently active workbench.
Get the currently active workbench.

        Returns:
            JSON string containing active workbench info or null.
resource_best_practicesresource Get FreeCAD best practices and AI guidance.
Get FreeCAD best practices and AI guidance.

        This resource provides comprehensive guidance for AI assistants
        working with FreeCAD, covering API patterns, version compatibility,
        validation workflows, and common pitfalls.

        Use this resource at the start of a FreeCAD session to understand
        best practices for reliable CAD operations.

        Returns:
            JSON string containing best practices and guidance.

        Example:
            Read via MCP resource mechanism::

                # In an MCP client
                best_practices = await mcp.read_resource("freecad://best-practices")
                data = json.loads(best_practices)
                print(data["critical_patterns"])  # Shows validation_first, partdesign_workflow
resource_capabilitiesresource Get comprehensive list of all MCP capabilities.
Get comprehensive list of all MCP capabilities.

        This resource provides a complete catalog of all available tools,
        resources, and prompts. Use this to discover what functionality
        is available when working with the FreeCAD Robust MCP Server.

        Returns:
            JSON string containing:
                - tools: Dict of tool categories with tool definitions
                - resources: List of available resource URIs
                - prompts: List of available prompt names
                - examples: Common usage patterns
resource_consoleresource Get recent FreeCAD console output.
Get recent FreeCAD console output.

        Returns:
            JSON string containing:
                - lines: List of console output lines
                - count: Number of lines
                - error: Description when console history is unavailable
resource_documentresource Get detailed information about a specific document.
Get detailed information about a specific document.

        Args:
            name: Document name to query.

        Returns:
            JSON string containing:
                - name: Internal document name
                - label: Display label
                - path: File path (null if unsaved)
                - objects: List of object names
                - is_modified: Has unsaved changes
                - active_object: Currently selected object
resource_document_objectsresource Get list of objects in a specific document.
Get list of objects in a specific document.

        Args:
            name: Document name to query.

        Returns:
            JSON string containing list of objects, each with:
                - name: Object name
                - label: Display label
                - type_id: FreeCAD type identifier
                - visibility: Whether object is visible
resource_documentsresource Get list of all open FreeCAD documents.
Get list of all open FreeCAD documents.

        Returns:
            JSON string containing list of documents, each with:
                - name: Internal document name
                - label: Display label
                - path: File path (null if unsaved)
                - object_count: Number of objects
                - is_modified: Has unsaved changes
                - active_object: Currently selected object
resource_macrosresource Get list of available FreeCAD macros.
Get list of available FreeCAD macros.

        Returns:
            JSON string containing list of macros, each with:
                - name: Macro name (without extension)
                - path: Full file path
                - description: Macro description
                - is_system: Whether it's a system macro
resource_objectresource Get detailed information about a specific object.
Get detailed information about a specific object.

        Args:
            doc_name: Document containing the object.
            obj_name: Object name to query.

        Returns:
            JSON string containing:
                - name: Object name
                - label: Display label
                - type_id: FreeCAD type identifier
                - properties: Dictionary of property values
                - shape_info: Shape geometry (if applicable)
                - children: Dependent object names
                - parents: Parent object names
                - visibility: Display visibility
resource_statusresource Get current FreeCAD connection and runtime status.
Get current FreeCAD connection and runtime status.

        Returns:
            JSON string containing:
                - connected: Connection state
                - mode: Bridge mode (embedded, xmlrpc, socket)
                - freecad_version: Version string
                - gui_available: GUI availability
                - last_ping_ms: Connection latency
                - error: Any error message
resource_versionresource Get FreeCAD version and build information.
Get FreeCAD version and build information.

        Returns:
            JSON string containing:
                - version: FreeCAD version string
                - build_date: Build timestamp
                - python_version: Python interpreter version
                - gui_available: Whether GUI mode is active
resource_workbenchesresource Get list of available FreeCAD workbenches.
Get list of available FreeCAD workbenches.

        Returns:
            JSON string containing list of workbenches, each with:
                - name: Workbench internal name
                - label: Display label
                - is_active: Whether currently active
activate_workbenchtool Activate a FreeCAD workbench.
Activate a FreeCAD workbench.

        Args:
            workbench_name: Internal name of the workbench to activate.
                Common workbenches:
                - "PartWorkbench" - Part modeling
                - "PartDesignWorkbench" - Parametric part design
                - "SketcherWorkbench" - 2D sketching
                - "DraftWorkbench" - 2D drafting
                - "MeshWorkbench" - Mesh operations
                - "SpreadsheetWorkbench" - Spreadsheet

        Returns:
            Dictionary with result:
                - success: Whether activation was successful
add_external_geometrytool Add external geometry reference to a sketch.
Add external geometry reference to a sketch.

        External geometry allows referencing edges/faces from other
        objects for construction and constraints.

        Args:
            sketch_name: Name of the sketch.
            object_name: Name of the object to reference.
            element: Element to reference (e.g., "Edge1", "Face1").
            doc_name: Document containing the sketch. Uses active document if None.

        Returns:
            Dictionary with result:
                - success: Whether the operation succeeded
                - external_geometry_count: Number of external geometry elements
add_sketch_arctool Add an arc to a sketch.
Add an arc to a sketch.

        Args:
            sketch_name: Name of the sketch to add arc to.
            center_x: X coordinate of center.
            center_y: Y coordinate of center.
            radius: Arc radius.
            start_angle: Start angle in degrees.
            end_angle: End angle in degrees.
            doc_name: Document containing the sketch. Uses active document if None.

        Returns:
            Dictionary with geometry info:
                - geometry_index: Index of the added arc
                - geometry_count: Total geometry elements
add_sketch_bsplinetool Add a B-spline curve to a sketch.
Add a B-spline curve to a sketch.

        Args:
            sketch_name: Name of the sketch to add B-spline to.
            points: List of control points, each as [x, y].
            closed: Whether to close the spline. Defaults to False.
            doc_name: Document containing the sketch. Uses active document if None.

        Returns:
            Dictionary with geometry info:
                - geometry_index: Index of the added B-spline
                - geometry_count: Total geometry elements
add_sketch_circletool Add a circle to a sketch.
Add a circle to a sketch.

        Args:
            sketch_name: Name of the sketch to add circle to.
            center_x: X coordinate of center.
            center_y: Y coordinate of center.
            radius: Circle radius.
            doc_name: Document containing the sketch. Uses active document if None.

        Returns:
            Dictionary with geometry info:
                - geometry_index: Index of the added circle
                - geometry_count: Total geometry elements
add_sketch_constrainttool Add a constraint to a sketch.
Add a constraint to a sketch.

        This is a general-purpose constraint tool. For common constraints,
        use the specific constraint tools (constrain_horizontal, etc.).

        Args:
            sketch_name: Name of the sketch.
            constraint_type: Type of constraint. Options:
                - Geometric: "Coincident", "Horizontal", "Vertical", "Parallel",
                  "Perpendicular", "Tangent", "Equal", "Symmetric", "Block"
                - Dimensional: "Distance", "DistanceX", "DistanceY", "Radius",
                  "Diameter", "Angle"
            geometry1: Index of first geometry element.
            point1: Point index on first geometry (1=start, 2=end, 3=center).
                    Use -1 for edge itself.
            geometry2: Index of second geometry element. Use -2 for external.
            point2: Point index on second geometry.
            value: Value for dimensional constraints (distance, angle, etc.).
            doc_name: Document containing the sketch. Uses active document if None.

        Returns:
            Dictionary with constraint info:
                - constraint_index: Index of the added constraint
                - constraint_count: Total constraint count
add_sketch_ellipsetool Add an ellipse to a sketch.
Add an ellipse to a sketch.

        Args:
            sketch_name: Name of the sketch to add ellipse to.
            center_x: X coordinate of center.
            center_y: Y coordinate of center.
            major_radius: Semi-major axis radius.
            minor_radius: Semi-minor axis radius.
            doc_name: Document containing the sketch. Uses active document if None.

        Returns:
            Dictionary with geometry info:
                - geometry_index: Index of the added ellipse
                - geometry_count: Total geometry elements
add_sketch_linetool Add a line to a sketch.
Add a line to a sketch.

        Args:
            sketch_name: Name of the sketch to add line to.
            x1: X coordinate of start point.
            y1: Y coordinate of start point.
            x2: X coordinate of end point.
            y2: Y coordinate of end point.
            construction: Whether this is a construction line. Defaults to False.
            doc_name: Document containing the sketch. Uses active document if None.

        Returns:
            Dictionary with geometry info:
                - geometry_index: Index of the added line
                - geometry_count: Total geometry elements
add_sketch_pointtool Add a point to a sketch.
Add a point to a sketch.

        Points are useful for defining hole centers and reference locations.

        Args:
            sketch_name: Name of the sketch to add point to.
            x: X coordinate.
            y: Y coordinate.
            doc_name: Document containing the sketch. Uses active document if None.

        Returns:
            Dictionary with geometry info:
                - geometry_index: Index of the added point
                - geometry_count: Total geometry elements
add_sketch_polygontool Add a regular polygon to a sketch.
Add a regular polygon to a sketch.

        Args:
            sketch_name: Name of the sketch to add polygon to.
            center_x: X coordinate of center.
            center_y: Y coordinate of center.
            radius: Circumscribed circle radius.
            sides: Number of sides (3 for triangle, 6 for hexagon, etc.).
            doc_name: Document containing the sketch. Uses active document if None.

        Returns:
            Dictionary with geometry info:
                - first_line_index: Index of the first line
                - geometry_count: Total geometry elements
add_sketch_rectangletool Add a rectangle to a sketch.
Add a rectangle to a sketch.

        Args:
            sketch_name: Name of the sketch to add rectangle to.
            x: X coordinate of bottom-left corner.
            y: Y coordinate of bottom-left corner.
            width: Rectangle width.
            height: Rectangle height.
            doc_name: Document containing the sketch. Uses active document if None.

        Returns:
            Dictionary with geometry info:
                - constraint_count: Number of constraints in sketch
                - geometry_count: Number of geometry elements
add_sketch_slottool Add a slot (obround/stadium shape) to a sketch.
Add a slot (obround/stadium shape) to a sketch.

        A slot is two semicircles connected by parallel lines.

        Args:
            sketch_name: Name of the sketch to add slot to.
            center1_x: X coordinate of first arc center.
            center1_y: Y coordinate of first arc center.
            center2_x: X coordinate of second arc center.
            center2_y: Y coordinate of second arc center.
            radius: Radius of the semicircular ends.
            doc_name: Document containing the sketch. Uses active document if None.

        Returns:
            Dictionary with geometry info:
                - first_geometry_index: Index of first geometry element
                - geometry_count: Total geometry elements
boolean_operationtool Perform a boolean operation on two FreeCAD objects.
Perform a boolean operation on two FreeCAD objects.

        Args:
            operation: Boolean operation type: "fuse" (union), "cut" (subtract),
                      or "common" (intersection).
            object1_name: Name of the first object.
            object2_name: Name of the second object.
            result_name: Name for the result object. Auto-generated if None.
            doc_name: Document containing the objects. Uses active document if None.

        Returns:
            Dictionary with result object information:
                - name: Result object name
                - label: Result object label
                - type_id: Result object type
cam_add_dressuptool Add a dressup to an operation (or to another dressup).
Add a dressup to an operation (or to another dressup).

        The dressup replaces the operation in the job. If the connected FreeCAD
        has the known bug where the base operation stays in the job (it would
        be cut twice), the call fails and is undone instead of working around
        it; see ``cam_get_capabilities`` known_freecad_issues.

        Args:
            dressup_type: "Tags", "Boundary", "Dogbone", "Array", "LeadInOut",
                "RampEntry", "Dragknife", "AxisMap", "ZCorrect", and on
                FreeCAD 26.3+ "Boundary2", "Mirror", "PlungeMilling". All but
                the first four need the FreeCAD GUI.
            base_operation: Operation or dressup to dress (name or label).
            properties: Property values, e.g. {"Width": 6, "Height": 1.5}.
            expressions: Property expressions.
            tag_count: Tags only: number of holding tags to generate.
            label: Display label.
            doc_name: Document. Uses the active document if None.

        Returns:
            Dictionary with name, label, type, base, what was set and a path
            summary.
cam_add_operationtool Add any CAM operation to a job.
Add any CAM operation to a job.

        Use ``cam_get_capabilities`` for the types and ``cam_describe_type``
        for every option of a type. Depth properties are expressions by
        default; giving a value replaces the expression.

        Args:
            op_type: Operation type, e.g. "Profile", "Pocket", "PocketShape",
                "Adaptive", "MillFace", "MillFacing", "Helix", "Drilling",
                "Tapping", "ThreadMilling", "Engrave", "Vcarve", "Deburr",
                "Slot", "Surface", "Waterline", "PlanarSurface",
                "RotarySurface", "Flute", "Probe", "Custom"; or one that works
                on other operations or the program flow: "Comment" (property
                Comment), "Stop" (property Stop: "Mandatory" M0 / "Optional"
                M1), "Copy" (linked copy of one operation), "Array" (linear,
                polar or point array of operations with one tool controller,
                coolant None), "SimpleCopy" (fixed G-code copy). These take no
                tool_controller or base and are appended at the end of the
                job; reorder with cam_set_operation_order.
            job_name: Job. Optional if the document has exactly one job.
            tool_controller: Tool controller (name or label). Required when
                the job has more than one.
            base: Features to machine, [{"object": "<model>", "subelements":
                ["Face3", "Edge7"]}]. Original model names are mapped to the
                job's clones. None keeps FreeCAD's default (e.g. Drilling picks
                all holes, Profile the model outline); [] clears it.
            properties: Property values, e.g. {"Side": "Outside",
                "FinalDepth": -5, "StepDown": "1.5 mm"}.
            expressions: Property expressions; None as value removes one.
            name: Internal object name. The type if None.
            label: Display label.
            doc_name: Document. Uses the active document if None.
            source_operations: Copy, Array, SimpleCopy only: the operations to
                copy or array (names or labels), top-level in the job.

        Returns:
            Dictionary with name, label, type, what was set, and a path summary
            (commands, cut bound box, feeds, cycle time, warnings, notes).
cam_analyze_modeltool List a model's faces and drillable holes, to choose operation Base faces.
List a model's faces and drillable holes, to choose operation Base faces.

        Args:
            object_name: Model object (name or unique label).
            doc_name: Document. Uses the active document if None.
            face_types: Only list these surface types, e.g. ["Plane", "Cylinder"].

        Returns:
            Dictionary with bound_box, volume, valid, faces (face name, surface
            type, area, z range, normal for planes, radius/center/axis for
            cylinders) and drillable_holes (element, diameter, center).
cam_describe_typetool List every option of an operation or dressup type with its defaults.
List every option of an operation or dressup type with its defaults.

        Builds the type on a placeholder model in a hidden temporary document,
        reads its properties and closes the document again.

        Args:
            type_name: Operation or dressup type (see cam_get_capabilities).
            kind: "operation" or "dressup".
            groups: Only these property groups, e.g. ["Depth", "Operation"].
            include_hidden: Include properties FreeCAD hides in the editor.

        Returns:
            Dictionary with kind, type and properties (name, type, group,
            default, doc, enum values, expression, read_only).
cam_feeds_speedstool Compare tool controllers with FreeCAD's feeds & speeds lookup.
Compare tool controllers with FreeCAD's feeds & speeds lookup.

        Runs what the "Feeds and Speeds Wizard" of a tool controller runs
        (FreeCAD 26.3+): presets on the tool bit, matched against the job's
        stock material (cam_set_stock material). Use it to check a job's
        speeds and feeds, or with apply=True to set them.

        Args:
            job_name: Job. Optional if the document has exactly one job.
            doc_name: Document. Uses the active document if None.
            tool_controllers: Tool controllers (names or unique labels). All
                of the job if None.
            mode: "preset" (only curated presets of the tool) or "resolver"
                (also the material's generic surface speed and the tool's
                default chipload).
            op_type: "profile", "pocket", "slot", "drill", "adaptive" or
                "surface_finish"; None matches any.
            apply: Write the suggestion to the tool controller.

        Returns:
            Dictionary with job, material, material_uuid and per tool
            controller: current values and suggestion (source, confidence,
            spindle_speed, horiz_feed_mm_min, vert_feed_mm_min,
            surface_speed_m_min, chipload_mm, warnings, applied, or a note).
cam_get_capabilitiestool List what the CAM workbench offers in the connected FreeCAD.
List what the CAM workbench offers in the connected FreeCAD.

        Use this first. It reports every operation and dressup type with its
        availability, the enabled post processors, job templates (job_*.json),
        the tool asset path, and known FreeCAD CAM issues the tools detect.

        Returns:
            Dictionary with freecad_version, gui, operations, dressups,
            stock_kinds, post_processors (Job.PostProcessor choices; legacy
            ones on 26.3+), machine_post_processors and machines (26.3+, a
            job uses them through its Machine property), job_templates,
            default_job_template, asset_path, tool_system ("assets" on FreeCAD
            1.1+, "legacy" tool bit files on 1.0), freecad_home,
            known_freecad_issues, stock_materials (26.3+: materials with
            FreeCAD's Machinability model, i.e. the ones CAM offers as stock
            material; name, uuid, library, folder and their generic surface
            speeds, if any).
cam_get_propertiestool Read all properties of a CAM object with their metadata.
Read all properties of a CAM object with their metadata.

        Works for jobs, stock, setup sheets, tool controllers, operations and
        dressups.

        Args:
            object_name: Object (name or unique label).
            groups: Only these property groups.
            include_hidden: Include properties FreeCAD hides in the editor.
            doc_name: Document. Uses the active document if None.

        Returns:
            Dictionary with name, label, kind, type and properties (name, type,
            group, value, doc, enum values, expression, read_only).
cam_inspect_jobtool Describe a job: models, stock, tool controllers, operations, post.
Describe a job: models, stock, tool controllers, operations, post.

        Every operation includes a path summary with plausibility warnings
        (no cutting moves, feed 0, rapid moves below the stock top, cuts
        outside the stock) and notes (e.g. cuts below the stock bottom).

        Args:
            job_name: Job. Optional if the document has exactly one job.
            doc_name: Document. Uses the active document if None.

        Returns:
            Dictionary with models, stock, tool_controllers, operations,
            setup_sheet, post processor settings, fixtures and cycle_time.
cam_inspect_pathtool Summarize the toolpath of one operation or dressup.
Summarize the toolpath of one operation or dressup.

        Args:
            object_name: Operation or dressup (name or unique label).
            gcode_lines: Also return up to this many lines of its path as
                G-code (FreeCAD internal units: mm, mm/s). 0 returns none.
            doc_name: Document. Uses the active document if None.

        Returns:
            Dictionary with commands, by_command, feeds_mm_per_min, cycle_time,
            cut_bound_box, warnings, notes and optionally gcode.
cam_list_tool_librarytool List FreeCAD's tool libraries, their tool bits and the tool shapes.
List FreeCAD's tool libraries, their tool bits and the tool shapes.

        Tool bits from a library can be used in ``cam_add_tool_controller``
        with ``tool={"library_bit": "<id>"}``. Shapes (endmill, drill, v-bit,
        ...) can be used to define a new bit with ``tool={"shape": ...}``.

        Args:
            library: Only list this library (id or label). All if None.

        Returns:
            Dictionary with libraries (id, label, bits with number, id, label,
            shape, parameters, attributes) and shapes.
cam_place_modeltool Turn and move the part in a job, e.g. flipped for the second side.
Turn and move the part in a job, e.g. flipped for the second side.

        Works on the job's model clones like FreeCAD's Job dialog (the
        original objects stay where they are). For a second setup, create a
        second job for the same model and place it here. Operations are
        recomputed. A stock "from base" is re-created with the same margins;
        a box or cylinder stock is turned and moved with the part.

        Args:
            job_name: Job. Optional if the document has exactly one job.
            rotate: {"axis": "x"|"y"|"z" or [x, y, z], "angle": degrees},
                around the center of the part's bounding box. Flip:
                {"axis": "x", "angle": 180}.
            face_up: {"object": "<model>", "face": "Face3"}: turn the part so
                this face points up (+Z). Not together with rotate.
            origin: Put the part's bounding box at the origin afterwards:
                {"x": "min"|"max"|"center"|"keep", "y": ...,
                 "z": "top"|"bottom"|"center"|"keep"}; e.g. {"x": "min",
                "y": "min", "z": "top"} for X0 Y0 at the lower left, Z0 on top.
            move: [x, y, z] shift in mm, applied together with origin.
            doc_name: Document. Uses the active document if None.

        Returns:
            Dictionary with rotation, move, model_bound_box, stock_bound_box,
            how the stock was handled and the recomputed operations.
cam_remove_tool_controllertool Remove a tool controller (and its tool bit) that no operation uses.
Remove a tool controller (and its tool bit) that no operation uses.

        Args:
            tool_controller: Tool controller (name or unique label).
            doc_name: Document. Uses the active document if None.

        Returns:
            Dictionary with removed (label) and remaining tool controllers.
cam_set_operation_ordertool Reorder the operations of a job (this is the G-code order).
Reorder the operations of a job (this is the G-code order).

        Args:
            order: Every top-level operation/dressup of the job, in the new order.
            job_name: Job. Optional if the document has exactly one job.
            doc_name: Document. Uses the active document if None.

        Returns:
            Dictionary with the new order (labels).
cam_set_propertiestool Set properties of any CAM object, with validation.
Set properties of any CAM object, with validation.

        Enumeration values are checked against the allowed list, read-only
        properties are refused, and a plain value replaces an expression.
        Quantities take units: "5 mm", "800 mm/min", "90 °".

        Args:
            object_name: Object (name or unique label).
            values: Property values. Link lists use [{"object", "subelements"}],
                links an object name, vectors [x, y, z].
            expressions: Property expressions; None as value removes one.
            recompute: Recompute the document afterwards.
            doc_name: Document. Uses the active document if None.

        Returns:
            Dictionary with what was set and, for operations and dressups, a
            path summary.
cam_set_stocktool Replace a job's stock and/or assign the stock material.
Replace a job's stock and/or assign the stock material.

        Args:
            kind: "from_base" (model bounding box plus margins), "box" or
                "cylinder". If None: only assign `material` to the existing
                stock, or "from_base" when no material is given.
            job_name: Job. Optional if the document has exactly one job.
            doc_name: Document. Uses the active document if None.
            extent_neg: from_base margins [x, y, z] on the negative sides (mm).
            extent_pos: from_base margins [x, y, z] on the positive sides (mm).
            size: box [length, width, height] (mm).
            radius: cylinder radius (mm).
            height: cylinder height (mm).
            placement: {"base": [x, y, z], "axis": [x, y, z], "angle": deg}.
            material: Stock material (FreeCAD 26.3+), name or UUID of a
                material from cam_get_capabilities' stock_materials. Feeds &
                speeds presets on tool bits are matched against it. A
                replaced stock keeps its material when this is None.

        Returns:
            Dictionary with stock name, kind, bound_box, material,
            material_uuid.
chamfer_edgestool Add chamfer (beveled edges) to an object.
Add chamfer (beveled edges) to an object.

        Args:
            object_name: Name of the object to chamfer.
            size: Chamfer size.
            edges: List of edge names to chamfer (e.g., ["Edge1", "Edge2"]).
                   Chamfers all edges if None.
            name: Chamfer feature name. Auto-generated if None.
            doc_name: Document containing the object. Uses active document if None.

        Returns:
            Dictionary with created chamfer information:
                - name: Chamfer name
                - label: Chamfer label
                - type_id: Object type
clear_selectiontool Clear the current selection in FreeCAD.
Clear the current selection in FreeCAD.

        Requires GUI mode.

        Returns:
            Dictionary with result:
                - success: Whether operation was successful
close_documenttool Close a FreeCAD document.Filesoutside text
Close a FreeCAD document.

        Args:
            doc_name: Name of document to close. Uses active document if None.
            save_changes: Whether to save changes before closing. Defaults to False.

        Returns:
            Dictionary with close result:
                - success: Whether close was successful
                - saved: Whether document was saved before closing
common_alltool Find the common (intersection) of multiple shapes.
Find the common (intersection) of multiple shapes.

        Args:
            object_names: List of object names to intersect.
            result_name: Name for result object. Auto-generated if None.
            doc_name: Document containing the objects. Uses active document if None.

        Returns:
            Dictionary with result object information:
                - name: Result object name
                - label: Result object label
                - type_id: Result object type
constrain_angletool Constrain angle of a line or between two lines.
Constrain angle of a line or between two lines.

        Args:
            sketch_name: Name of the sketch.
            geometry1: Index of first line.
            angle: Angle in degrees.
            geometry2: Index of second line (-2 for angle from horizontal).
            doc_name: Document containing the sketch. Uses active document if None.

        Returns:
            Dictionary with constraint info:
                - constraint_index: Index of the added constraint
constrain_coincidenttool Constrain two points to be coincident (same location).
Constrain two points to be coincident (same location).

        Args:
            sketch_name: Name of the sketch.
            geometry1: Index of first geometry element.
            point1: Point on first geometry (1=start, 2=end, 3=center).
            geometry2: Index of second geometry element.
            point2: Point on second geometry.
            doc_name: Document containing the sketch. Uses active document if None.

        Returns:
            Dictionary with constraint info:
                - constraint_index: Index of the added constraint
constrain_distancetool Add a distance constraint.
Add a distance constraint.

        Can constrain:
        - Line length (geometry1 only)
        - Point to point distance (geometry1+point1, geometry2+point2)
        - Point to line distance (geometry1+point1, geometry2 as line)

        Args:
            sketch_name: Name of the sketch.
            geometry1: Index of first geometry element.
            distance: The distance value.
            point1: Point on first geometry (1=start, 2=end). -1 for line length.
            geometry2: Index of second geometry element. -2 if not used.
            point2: Point on second geometry.
            doc_name: Document containing the sketch. Uses active document if None.

        Returns:
            Dictionary with constraint info:
                - constraint_index: Index of the added constraint
constrain_distance_xtool Constrain horizontal distance from origin or between points.
Constrain horizontal distance from origin or between points.

        Args:
            sketch_name: Name of the sketch.
            geometry: Index of geometry element.
            point: Point index (1=start, 2=end, 3=center).
            distance: The horizontal distance value.
            doc_name: Document containing the sketch. Uses active document if None.

        Returns:
            Dictionary with constraint info:
                - constraint_index: Index of the added constraint
constrain_distance_ytool Constrain vertical distance from origin or between points.
Constrain vertical distance from origin or between points.

        Args:
            sketch_name: Name of the sketch.
            geometry: Index of geometry element.
            point: Point index (1=start, 2=end, 3=center).
            distance: The vertical distance value.
            doc_name: Document containing the sketch. Uses active document if None.

        Returns:
            Dictionary with constraint info:
                - constraint_index: Index of the added constraint
constrain_equaltool Constrain two elements to have equal size (length or radius).
Constrain two elements to have equal size (length or radius).

        Args:
            sketch_name: Name of the sketch.
            geometry1: Index of first element.
            geometry2: Index of second element.
            doc_name: Document containing the sketch. Uses active document if None.

        Returns:
            Dictionary with constraint info:
                - constraint_index: Index of the added constraint
constrain_fixtool Fix (lock) a point or geometry in place.
Fix (lock) a point or geometry in place.

        Args:
            sketch_name: Name of the sketch.
            geometry_index: Index of the geometry element.
            point_index: Point to fix (1=start, 2=end, 3=center).
                        -1 to fix the entire element.
            doc_name: Document containing the sketch. Uses active document if None.

        Returns:
            Dictionary with constraint info:
                - constraint_index: Index of the added constraint
constrain_horizontaltool Constrain a line to be horizontal.
Constrain a line to be horizontal.

        Args:
            sketch_name: Name of the sketch.
            geometry_index: Index of the line geometry.
            doc_name: Document containing the sketch. Uses active document if None.

        Returns:
            Dictionary with constraint info:
                - constraint_index: Index of the added constraint
constrain_paralleltool Constrain two lines to be parallel.
Constrain two lines to be parallel.

        Args:
            sketch_name: Name of the sketch.
            geometry1: Index of first line.
            geometry2: Index of second line.
            doc_name: Document containing the sketch. Uses active document if None.

        Returns:
            Dictionary with constraint info:
                - constraint_index: Index of the added constraint
constrain_perpendiculartool Constrain two lines to be perpendicular.
Constrain two lines to be perpendicular.

        Args:
            sketch_name: Name of the sketch.
            geometry1: Index of first line.
            geometry2: Index of second line.
            doc_name: Document containing the sketch. Uses active document if None.

        Returns:
            Dictionary with constraint info:
                - constraint_index: Index of the added constraint
constrain_radiustool Constrain the radius of a circle or arc.
Constrain the radius of a circle or arc.

        Args:
            sketch_name: Name of the sketch.
            geometry_index: Index of the circle/arc geometry.
            radius: The radius value.
            doc_name: Document containing the sketch. Uses active document if None.

        Returns:
            Dictionary with constraint info:
                - constraint_index: Index of the added constraint
constrain_tangenttool Constrain two curves to be tangent.
Constrain two curves to be tangent.

        Args:
            sketch_name: Name of the sketch.
            geometry1: Index of first curve.
            geometry2: Index of second curve.
            doc_name: Document containing the sketch. Uses active document if None.

        Returns:
            Dictionary with constraint info:
                - constraint_index: Index of the added constraint
constrain_verticaltool Constrain a line to be vertical.
Constrain a line to be vertical.

        Args:
            sketch_name: Name of the sketch.
            geometry_index: Index of the line geometry.
            doc_name: Document containing the sketch. Uses active document if None.

        Returns:
            Dictionary with constraint info:
                - constraint_index: Index of the added constraint
copy_objecttool Create a copy of an object.
Create a copy of an object.

        Args:
            object_name: Name of the object to copy.
            new_name: Name for the copy. Auto-generated if None.
            offset: Position offset [x, y, z] for the copy. [0,0,0] if None.
            doc_name: Document containing the object. Uses active document if None.

        Returns:
            Dictionary with copy object information:
                - name: Copy object name
                - label: Copy object label
                - type_id: Copy object type
create_boxtool Create a Part Box primitive.
Create a Part Box primitive.

        Args:
            length: Box length (X dimension). Defaults to 10.0.
            width: Box width (Y dimension). Defaults to 10.0.
            height: Box height (Z dimension). Defaults to 10.0.
            name: Object name. Auto-generated if None.
            doc_name: Target document. Uses active document if None.

        Returns:
            Dictionary with created object information:
                - name: Object name
                - label: Object label
                - volume: Box volume
                - type_id: Object type
create_conetool Create a Part Cone primitive.
Create a Part Cone primitive.

        Args:
            radius1: Bottom radius. Defaults to 5.0.
            radius2: Top radius (0 for pointed cone). Defaults to 0.0.
            height: Cone height. Defaults to 10.0.
            angle: Sweep angle in degrees (for partial cone). Defaults to 360.
            name: Object name. Auto-generated if None.
            doc_name: Target document. Uses active document if None.

        Returns:
            Dictionary with created object information:
                - name: Object name
                - label: Object label
                - type_id: Object type
create_cylindertool Create a Part Cylinder primitive.
Create a Part Cylinder primitive.

        Args:
            radius: Cylinder radius. Defaults to 5.0.
            height: Cylinder height. Defaults to 10.0.
            angle: Sweep angle in degrees (for partial cylinder). Defaults to 360.
            name: Object name. Auto-generated if None.
            doc_name: Target document. Uses active document if None.

        Returns:
            Dictionary with created object information:
                - name: Object name
                - label: Object label
                - type_id: Object type
create_datum_linetool Create a datum line (axis) in a PartDesign body.
Create a datum line (axis) in a PartDesign body.

        Datum lines are reference axes used for patterns or measurements.

        Args:
            body_name: Name of the PartDesign body.
            base_axis: Base axis. Options: "X_Axis", "Y_Axis", "Z_Axis".
            name: Datum line name. Auto-generated if None.
            doc_name: Document containing the body. Uses active document if None.

        Returns:
            Dictionary with created datum information:
                - name: Datum name
                - label: Datum label
                - type_id: Object type
create_datum_planetool Create a datum plane in a PartDesign body.
Create a datum plane in a PartDesign body.

        Datum planes are reference planes used for sketching or measurements.

        Args:
            body_name: Name of the PartDesign body.
            offset: Offset distance from base plane. Defaults to 0.
            base_plane: Base plane to offset from. Options:
                - "XY_Plane" - Horizontal plane
                - "XZ_Plane" - Front vertical plane
                - "YZ_Plane" - Side vertical plane
            name: Datum plane name. Auto-generated if None.
            doc_name: Document containing the body. Uses active document if None.

        Returns:
            Dictionary with created datum information:
                - name: Datum name
                - label: Datum label
                - type_id: Object type
create_datum_pointtool Create a datum point in a PartDesign body.
Create a datum point in a PartDesign body.

        Datum points are reference points used for measurements or construction.

        Args:
            body_name: Name of the PartDesign body.
            position: Point position [x, y, z]. Uses origin if None.
            name: Datum point name. Auto-generated if None.
            doc_name: Document containing the body. Uses active document if None.

        Returns:
            Dictionary with created datum information:
                - name: Datum name
                - label: Datum label
                - type_id: Object type
create_documenttool Create a new FreeCAD document.
Create a new FreeCAD document.

        Args:
            name: Internal document name (no spaces allowed, will be sanitized).
            label: Display label (can contain spaces). Defaults to name.

        Returns:
            Dictionary with created document information:
                - name: Internal document name
                - label: Display label
                - path: File path (None for new document)
create_ellipsetool Create a Part Ellipse curve.
Create a Part Ellipse curve.

        Args:
            major_radius: Semi-major axis radius. Defaults to 10.0.
            minor_radius: Semi-minor axis radius. Defaults to 5.0.
            angle1: Start angle in degrees. Defaults to 0.
            angle2: End angle in degrees. Defaults to 360.
            name: Object name. Auto-generated if None.
            doc_name: Target document. Uses active document if None.

        Returns:
            Dictionary with created object information:
                - name: Object name
                - label: Object label
                - type_id: Object type
create_helixtool Create a Part Helix curve.
Create a Part Helix curve.

        A helix is a spiral curve, useful as a sweep path for threads and springs.

        Args:
            pitch: Distance between turns. Defaults to 5.0.
            height: Total helix height. Defaults to 20.0.
            radius: Helix radius. Defaults to 5.0.
            angle: Taper angle in degrees. Defaults to 0.0.
            left_handed: Whether helix is left-handed. Defaults to False.
            name: Object name. Auto-generated if None.
            doc_name: Target document. Uses active document if None.

        Returns:
            Dictionary with created object information:
                - name: Object name
                - label: Object label
                - type_id: Object type
create_holetool Create a Hole feature from a sketch containing point(s).
Create a Hole feature from a sketch containing point(s).

        Creates parametric holes with optional threading. The sketch should
        contain points defining hole center locations.

        Args:
            sketch_name: Name of the sketch with hole center point(s).
            diameter: Hole diameter (for non-threaded). Defaults to 6.0.
            depth: Hole depth. Defaults to 10.0.
            hole_type: Hole depth type. Options:
                - "Dimension" - Specific depth
                - "ThroughAll" - Through entire part
                - "UpToFirst" - Up to first face
            threaded: Whether hole is threaded. Defaults to False.
            thread_type: Thread standard. Options: "ISO", "UNC", "UNF".
            thread_size: Thread size (e.g., "M6", "M8", "#10", "1/4").
            name: Hole feature name. Auto-generated if None.
            doc_name: Document containing the sketch. Uses active document if None.

        Returns:
            Dictionary with created hole information:
                - name: Hole name
                - label: Hole label
                - type_id: Object type
create_linetool Create a Part Line (edge) between two points.
Create a Part Line (edge) between two points.

        Args:
            point1: Start point as [x, y, z].
            point2: End point as [x, y, z].
            name: Object name. Auto-generated if None.
            doc_name: Target document. Uses active document if None.

        Returns:
            Dictionary with created object information:
                - name: Object name
                - label: Object label
                - type_id: Object type
                - length: Line length
create_objecttool Create a new FreeCAD object.
Create a new FreeCAD object.

        Args:
            type_id: FreeCAD type ID for the object. Common types include:
                - "Part::Box" - Parametric box
                - "Part::Cylinder" - Parametric cylinder
                - "Part::Sphere" - Parametric sphere
                - "Part::Cone" - Parametric cone
                - "Part::Torus" - Parametric torus
                - "Part::Feature" - Generic Part feature
                - "Sketcher::SketchObject" - Sketch
                - "PartDesign::Body" - PartDesign body
            name: Object name. Auto-generated if None.
            properties: Initial property values to set.
            doc_name: Target document. Uses active document if None.

        Returns:
            Dictionary with created object information:
                - name: Object name
                - label: Object label
                - type_id: Object type
create_partdesign_bodytool Create a new PartDesign Body.
Create a new PartDesign Body.

        A PartDesign Body is a container for feature-based modeling that
        maintains a single solid shape through a sequence of operations.

        Args:
            name: Body name. Auto-generated if None.
            doc_name: Target document. Uses active document if None.

        Returns:
            Dictionary with created body information:
                - name: Body name
                - label: Body label
                - type_id: Object type
create_planetool Create a Part Plane (flat rectangular face).
Create a Part Plane (flat rectangular face).

        Args:
            length: Plane length (X direction). Defaults to 10.0.
            width: Plane width (Y direction). Defaults to 10.0.
            name: Object name. Auto-generated if None.
            doc_name: Target document. Uses active document if None.

        Returns:
            Dictionary with created object information:
                - name: Object name
                - label: Object label
                - type_id: Object type
create_prismtool Create a Part Prism (extruded regular polygon).
Create a Part Prism (extruded regular polygon).

        Args:
            polygon_sides: Number of sides (3 for triangle, 6 for hexagon, etc.).
                           Defaults to 6.
            circumradius: Radius of circumscribed circle. Defaults to 5.0.
            height: Prism height. Defaults to 10.0.
            name: Object name. Auto-generated if None.
            doc_name: Target document. Uses active document if None.

        Returns:
            Dictionary with created object information:
                - name: Object name
                - label: Object label
                - type_id: Object type
create_regular_polygontool Create a Part Regular Polygon (2D wire).
Create a Part Regular Polygon (2D wire).

        Args:
            polygon_sides: Number of sides (3 for triangle, 6 for hexagon, etc.).
                           Defaults to 6.
            circumradius: Radius of circumscribed circle. Defaults to 5.0.
            name: Object name. Auto-generated if None.
            doc_name: Target document. Uses active document if None.

        Returns:
            Dictionary with created object information:
                - name: Object name
                - label: Object label
                - type_id: Object type
create_sketchtool Create a new Sketch attached to a plane or body.
Create a new Sketch attached to a plane or body.

        Args:
            body_name: Name of PartDesign Body to attach to. Creates standalone if None.
            plane: Plane to attach sketch to. Options:
                - "XY_Plane" - Horizontal plane
                - "XZ_Plane" - Front vertical plane
                - "YZ_Plane" - Side vertical plane
                - Face name like "Face1" to attach to body face
            name: Sketch name. Auto-generated if None.
            doc_name: Target document. Uses active document if None.

        Returns:
            Dictionary with created sketch information:
                - name: Sketch name
                - label: Sketch label
                - type_id: Object type
                - support: What the sketch is attached to
create_spheretool Create a Part Sphere primitive.
Create a Part Sphere primitive.

        Args:
            radius: Sphere radius. Defaults to 5.0.
            name: Object name. Auto-generated if None.
            doc_name: Target document. Uses active document if None.

        Returns:
            Dictionary with created object information:
                - name: Object name
                - label: Object label
                - type_id: Object type
create_torustool Create a Part Torus (donut shape) primitive.
Create a Part Torus (donut shape) primitive.

        Args:
            radius1: Major radius (center to tube center). Defaults to 10.0.
            radius2: Minor radius (tube radius). Defaults to 2.0.
            angle1: Start angle for tube sweep. Defaults to -180.
            angle2: End angle for tube sweep. Defaults to 180.
            angle3: Rotation angle around axis. Defaults to 360.
            name: Object name. Auto-generated if None.
            doc_name: Target document. Uses active document if None.

        Returns:
            Dictionary with created object information:
                - name: Object name
                - label: Object label
                - type_id: Object type
create_wedgetool Create a Part Wedge primitive.
Create a Part Wedge primitive.

        A wedge is a tapered box shape useful for ramps and similar geometry.

        Args:
            xmin: Minimum X at base. Defaults to 0.0.
            ymin: Minimum Y (base position). Defaults to 0.0.
            zmin: Minimum Z at base. Defaults to 0.0.
            x2min: Minimum X at top. Defaults to 2.0.
            z2min: Minimum Z at top. Defaults to 2.0.
            xmax: Maximum X at base. Defaults to 10.0.
            ymax: Maximum Y (top position). Defaults to 10.0.
            zmax: Maximum Z at base. Defaults to 10.0.
            x2max: Maximum X at top. Defaults to 8.0.
            z2max: Maximum Z at top. Defaults to 8.0.
            name: Object name. Auto-generated if None.
            doc_name: Target document. Uses active document if None.

        Returns:
            Dictionary with created object information:
                - name: Object name
                - label: Object label
                - type_id: Object type
delete_objecttool Delete an object from a FreeCAD document.
Delete an object from a FreeCAD document.

        Args:
            object_name: Name of the object to delete.
            doc_name: Document containing the object. Uses active document if None.

        Returns:
            Dictionary with delete result:
                - success: Whether delete was successful
delete_sketch_constrainttool Delete a constraint from a sketch.
Delete a constraint from a sketch.

        Args:
            sketch_name: Name of the sketch.
            constraint_index: Index of the constraint to delete.
            doc_name: Document containing the sketch. Uses active document if None.

        Returns:
            Dictionary with result:
                - success: Whether the deletion succeeded
                - constraint_count: Remaining constraint count
delete_sketch_geometrytool Delete a geometry element from a sketch.
Delete a geometry element from a sketch.

        Args:
            sketch_name: Name of the sketch.
            geometry_index: Index of the geometry to delete.
            doc_name: Document containing the sketch. Uses active document if None.

        Returns:
            Dictionary with result:
                - success: Whether the deletion succeeded
                - geometry_count: Remaining geometry count
draft_extrude_shapestringtool Extrude a ShapeString to create a 3D solid text object.
Extrude a ShapeString to create a 3D solid text object.

        This directly extrudes the ShapeString faces into a 3D solid,
        useful for creating standalone 3D text objects.

        Args:
            shapestring_name: Name of the ShapeString object to extrude.
            height: Extrusion height in mm. Defaults to 10.0.
            direction: Extrusion direction as [x, y, z]. Defaults to [0, 0, 1] (up).
            name: Name for the extruded object. Auto-generated if None.
            doc_name: Document containing the ShapeString. Uses active if None.

        Returns:
            Dictionary with extruded object information:
                - name: Object name
                - label: Object label
                - type_id: Object type
                - volume: Solid volume
                - height: Extrusion height used
                - source: Name of source ShapeString

        Raises:
            ValueError: If direction has incorrect number of elements (not 3).
            ValueError: If direction is a zero vector.
            ValueError: If no document is found.
            ValueError: If the ShapeString object is not found.
            ValueError: If the ShapeString has no shape data.
            ValueError: If the ShapeString has no wires.
            ValueError: If no faces could be created from the wires.
            ValueError: If extrusion fails.

        Example:
            Create extruded 3D text::

                await draft_shapestring("FreeCAD", size=20)
                result = await draft_extrude_shapestring(
                    "ShapeString",
                    height=5.0
                )
draft_featuretool Add draft angle to faces of an object.
Add draft angle to faces of an object.

        Draft angles are used in manufacturing to allow parts to be
        released from molds.

        Args:
            object_name: Name of the object to draft.
            angle: Draft angle in degrees.
            plane: Neutral plane for draft direction: "XY", "XZ", "YZ".
            faces: List of face names to draft (e.g., ["Face1", "Face2"]).
                   Drafts all suitable faces if None.
            name: Draft feature name. Auto-generated if None.
            doc_name: Document containing the object. Uses active document if None.

        Returns:
            Dictionary with created draft information:
                - name: Draft name
                - label: Draft label
                - type_id: Object type
draft_list_fontstool List available font files on the system.
List available font files on the system.

        Searches common font directories for TrueType (.ttf), OpenType (.otf),
        and TrueType Collection (.ttc) fonts that can be used with ShapeString.

        Note: For .ttc files, FreeCAD only uses the first font in the collection.

        Args:
            None.

        Returns:
            Dictionary with font information:
                - fonts: List of dictionaries with font details:
                    - name: Font filename
                    - path: Full path to font file
                    - type: Font type ("ttf", "otf", or "ttc")
                - count: Total number of fonts found
                - directories: Directories that were searched

        Raises:
            ValueError: If the bridge fails to execute the font search.

        Example:
            List available fonts::

                result = await draft_list_fonts()
                for font in result["fonts"][:10]:  # First 10 fonts
                    print(f"{font['name']}: {font['path']}")
draft_shapestring_to_facetool Convert a ShapeString to a Face for direct use with Part operations.
Convert a ShapeString to a Face for direct use with Part operations.

        Creates a Part::Feature with a face from the ShapeString wires.
        This can be used directly with Part boolean operations or
        for creating solids.

        Args:
            shapestring_name: Name of the ShapeString object to convert.
            name: Name for the created face object. Auto-generated if None.
            doc_name: Document containing the ShapeString. Uses active if None.

        Returns:
            Dictionary with created face information:
                - name: Face object name
                - label: Face label
                - type_id: Object type
                - face_count: Number of faces created
                - area: Total face area
                - source: Name of source ShapeString

        Raises:
            ValueError: If no document is found.
            ValueError: If the ShapeString object is not found.
            ValueError: If the ShapeString has no shape data.
            ValueError: If the ShapeString has no wires.
            ValueError: If no faces could be created from the wires.
            ValueError: If conversion fails.

        Example:
            Convert ShapeString to face for boolean operations::

                await draft_shapestring("A", size=20)
                result = await draft_shapestring_to_face("ShapeString")
                # Now extrude or use with boolean operations
draft_shapestring_to_sketchtool Convert a ShapeString to a Sketch for use with PartDesign.
Convert a ShapeString to a Sketch for use with PartDesign.

        This converts the 3D wire geometry of a ShapeString into a
        Sketcher::SketchObject that can be used with Pad, Pocket, etc.

        Args:
            shapestring_name: Internal name or unambiguous label of the ShapeString.
            body_name: Name of PartDesign Body to add sketch to. Optional.
            plane: Plane used to orient the sketch relative to the source.
                Options: "XY_Plane", "XZ_Plane", "YZ_Plane".
            sketch_name: Name for the created sketch. Auto-generated if None.
            doc_name: Document containing the ShapeString. Uses active if None.

        Returns:
            Dictionary with created sketch information:
                - name: Sketch object name
                - label: Sketch label
                - type_id: Object type
                - wire_count: Number of wires added to sketch
                - source: Name of source ShapeString

        Raises:
            ValueError: If the document, source, body, or origin plane is missing;
                the label is ambiguous; the plane or shape is invalid; contours
                are open or contain loose edges; edge conversion, recompute,
                or contour preservation fails.

        Example:
            Convert ShapeString to sketch for extrusion::

                await draft_shapestring("Hello", size=10)
                result = await draft_shapestring_to_sketch(
                    "ShapeString",
                    body_name="Body"
                )
                # Now use pad_sketch to extrude the text
edit_objecttool Edit properties of an existing FreeCAD object.
Edit properties of an existing FreeCAD object.

        Args:
            object_name: Name of the object to edit.
            properties: Dictionary of property names and new values.
            doc_name: Document containing the object. Uses active document if None.

        Returns:
            Dictionary with updated object information:
                - name: Object name
                - label: Object label
                - type_id: Object type
explode_compoundtool Separate a compound into individual shape objects.
Separate a compound into individual shape objects.

        Args:
            object_name: Name of the compound object to explode.
            doc_name: Document containing the object. Uses active document if None.

        Returns:
            Dictionary with result:
                - success: Whether operation succeeded
                - created_objects: List of created object names
extrude_shapetool Extrude a wire or face along a direction vector.
Extrude a wire or face along a direction vector.

        Args:
            object_name: Name of the wire or face object to extrude.
            direction: Extrusion direction and length as [x, y, z].
            result_name: Name for result object. Auto-generated if None.
            doc_name: Document containing the object. Uses active document if None.

        Returns:
            Dictionary with result object information:
                - name: Result object name
                - label: Result object label
                - type_id: Result object type
fillet_edgestool Add fillet (rounded edges) to an object.
Add fillet (rounded edges) to an object.

        Args:
            object_name: Name of the object to fillet.
            radius: Fillet radius.
            edges: List of edge names to fillet (e.g., ["Edge1", "Edge2"]).
                   Fillets all edges if None.
            name: Fillet feature name. Auto-generated if None.
            doc_name: Document containing the object. Uses active document if None.

        Returns:
            Dictionary with created fillet information:
                - name: Fillet name
                - label: Fillet label
                - type_id: Object type
fit_alltool Fit all objects in the current view.
Fit all objects in the current view.

        Adjusts the camera to show all visible objects in the document.

        Args:
            doc_name: Document to fit view for. Uses active document if None.

        Returns:
            Dictionary with result:
                - success: Whether operation was successful
fuse_alltool Fuse (union) multiple shapes into a single solid.
Fuse (union) multiple shapes into a single solid.

        Unlike boolean_operation which works on two objects at a time,
        this fuses all specified objects at once.

        Args:
            object_names: List of object names to fuse.
            result_name: Name for result object. Auto-generated if None.
            doc_name: Document containing the objects. Uses active document if None.

        Returns:
            Dictionary with result object information:
                - name: Result object name
                - label: Result object label
                - type_id: Result object type
get_active_documenttool Get the currently active FreeCAD document.
Get the currently active FreeCAD document.

        Returns:
            Dictionary with document information, or None if no active document:
                - name: Internal document name
                - label: Display label
                - path: File path (None if not saved)
                - is_modified: Whether document has unsaved changes
                - objects: List of object names
                - active_object: Name of currently active object (None if none)
get_connection_statustool Get the current FreeCAD connection status.
Get the current FreeCAD connection status.

        Returns:
            Dictionary containing connection information:
                - connected: Whether bridge is connected
                - mode: Connection mode (embedded, xmlrpc, socket)
                - freecad_version: FreeCAD version string
                - gui_available: Whether GUI is available
                - last_ping_ms: Last ping latency in milliseconds
                - error: Error message if not connected
get_console_logtool Get recent console output from FreeCAD.
Get recent console output from FreeCAD.

        Args:
            lines: Maximum number of lines to return (1-1000). Defaults to 50.

        Returns:
            Dictionary with:
                - messages: List of console messages
                - warnings: List of warning messages
                - errors: List of error messages

        Raises:
            ValueError: The line limit is outside the supported range.
            RuntimeError: Console history is unavailable in this FreeCAD session.
get_console_outputtool Get recent FreeCAD console output.
Get recent FreeCAD console output.

        Args:
            lines: Maximum number of lines to return (1-1000). Defaults to 100.

        Returns:
            List of console output lines, most recent last.

        Raises:
            ValueError: The line limit is outside the supported range.
            RuntimeError: Console history is unavailable in this FreeCAD session.
get_freecad_versiontool Get FreeCAD version and build information.
Get FreeCAD version and build information.

        Returns:
            Dictionary containing version information:
                - version: Version string (e.g., "0.21.2")
                - version_tuple: Version as list of integers
                - build_date: Build date string
                - python_version: Embedded Python version
                - gui_available: Whether GUI is available
get_mcp_server_environmenttool Get environment info about the MCP Server and FreeCAD connection.Env vars
Get environment info about the MCP Server and FreeCAD connection.

        This tool returns information about the environment where the MCP Server
        is running and the FreeCAD connection state, which is useful for debugging,
        verifying which MCP Server instance you are connected to, and determining
        if GUI features are available.

        Returns:
            Dictionary containing environment information:
                - instance_id: Unique UUID for this server instance (generated at
                    startup). Use this to verify you're connected to the expected
                    server instance in tests and automation.
                - hostname: Machine hostname
                - os_name: Operating system name (Linux, Darwin, Windows)
                - os_version: Operating system version
                - platform: Platform identifier string
                - python_version: Python version running the MCP Server
                - freecad: FreeCAD connection information:
                    - connected: Whether bridge is connected to FreeCAD
                    - mode: Connection mode (embedded, xmlrpc, socket)
                    - version: FreeCAD version string
                    - gui_available: Whether FreeCAD GUI is available (False in
                        headless mode). Use this to skip GUI-only tests.
                    - is_headless: Convenience boolean, True when GUI is NOT
                        available (opposite of gui_available)
                - env_vars: Selected environment variables for debugging:
                    - FREECAD_MODE: Connection mode
                    - FREECAD_SOCKET_HOST: Socket host
                    - FREECAD_SOCKET_PORT: Socket port
                    - FREECAD_XMLRPC_PORT: XML-RPC port

        Example:
            Verify you're connected to the expected server instance::

                env = get_mcp_server_environment()
                expected_id = "abc123..."  # Captured from server startup output
                assert env["instance_id"] == expected_id

            Skip GUI-only tests in headless mode::

                env = get_mcp_server_environment()
                if env["freecad"]["is_headless"]:
                    pytest.skip("Test requires GUI mode")
get_screenshottool Capture a screenshot of the FreeCAD 3D view.
Capture a screenshot of the FreeCAD 3D view.

        Requires GUI mode - will return an error in headless mode.

        Args:
            view_angle: View angle to set before capture. Options:
                - "Isometric" - 3D isometric view (default)
                - "Front" - Front view (XZ plane)
                - "Back" - Back view
                - "Top" - Top view (XY plane)
                - "Bottom" - Bottom view
                - "Left" - Left view (YZ plane)
                - "Right" - Right view
                - "FitAll" - Fit all objects in view
            width: Image width in pixels. Defaults to 800.
            height: Image height in pixels. Defaults to 600.
            doc_name: Document to capture. Uses active document if None.

        Returns:
            Dictionary with screenshot result:
                - success: Whether capture was successful
                - data: Base64-encoded PNG image data (if success)
                - format: Image format ("png")
                - width: Actual image width
                - height: Actual image height
                - error: Error message (if not success)
get_selectiontool Get the current selection in FreeCAD.
Get the current selection in FreeCAD.

        Requires GUI mode.

        Args:
            doc_name: Document to check selection in. Uses active document if None.

        Returns:
            List of selected objects with:
                - name: Object name
                - label: Object label
                - type_id: Object type
                - sub_elements: List of selected sub-elements (e.g., ["Face1", "Edge2"])
get_sketch_infotool Get detailed information about a sketch.
Get detailed information about a sketch.

        Args:
            sketch_name: Name of the sketch.
            doc_name: Document containing the sketch. Uses active document if None.

        Returns:
            Dictionary with sketch information:
                - name: Sketch name
                - geometry_count: Number of geometry elements
                - constraint_count: Number of constraints
                - external_geometry_count: Number of external geometry references
                - fully_constrained: Whether sketch is fully constrained
                - dof: Degrees of freedom remaining, or None if unavailable; may be
                  stale if the sketch has not been recomputed
                - state: FreeCAD object state flags, including any error state
get_undo_redo_statustool Get the current undo/redo status.
Get the current undo/redo status.

        Args:
            doc_name: Document to check. Uses active document if None.

        Returns:
            Dictionary with status:
                - undo_count: Number of undoable operations
                - redo_count: Number of redoable operations
                - undo_names: List of undo operation names (if available)
groove_sketchtool Create a Groove (subtractive revolution) from a sketch.
Create a Groove (subtractive revolution) from a sketch.

        Revolves a sketch profile and subtracts it from existing material.

        Args:
            sketch_name: Name of the sketch to revolve.
            angle: Groove angle in degrees. Defaults to 360.
            axis: Axis to revolve around. Options:
                - "Base_X" - X axis
                - "Base_Y" - Y axis
                - "Base_Z" - Z axis
                - "Sketch_V" - Sketch vertical axis
                - "Sketch_H" - Sketch horizontal axis
            symmetric: Whether to revolve symmetrically. Defaults to False.
            reversed: Whether to reverse direction. Defaults to False.
            name: Groove feature name. Auto-generated if None.
            doc_name: Document containing the sketch. Uses active document if None.

        Returns:
            Dictionary with created groove information:
                - name: Groove name
                - label: Groove label
                - type_id: Object type
inspect_objecttool Get detailed information about a FreeCAD object.
Get detailed information about a FreeCAD object.

        Document-object links include their name, label, type ID, and document.
        Nested properties are bounded and may contain truncation or cycle markers.

        Args:
            object_name: Name of the object to inspect.
            doc_name: Document containing the object. Uses active document if None.
            include_properties: Whether to include property values.
            include_shape: Whether to include shape geometry details.

        Returns:
            Dictionary containing comprehensive object information:
                - name: Object name
                - label: Object label
                - type_id: FreeCAD type identifier
                - properties: Dictionary of property names and values (if requested)
                - shape_info: Shape details (if requested and object has shape)
                - children: List of child object names
                - parents: List of parent object names
                - visibility: Whether object is visible
linear_patterntool Create a Linear Pattern from a PartDesign feature.
Create a Linear Pattern from a PartDesign feature.

        Repeats a feature in a linear direction.

        Args:
            feature_name: Name of the feature to pattern.
            direction: Pattern direction. Options: "X", "Y", "Z".
            length: Total pattern length. Defaults to 50.0.
            occurrences: Number of pattern instances. Defaults to 3.
            name: Pattern feature name. Auto-generated if None.
            doc_name: Document containing the feature. Uses active document if None.

        Returns:
            Dictionary with created pattern information:
                - name: Pattern name
                - label: Pattern label
                - type_id: Object type
list_documentstool List all open FreeCAD documents.
List all open FreeCAD documents.

        Returns:
            List of dictionaries, each containing:
                - name: Internal document name
                - label: Display label
                - path: File path (None if not saved)
                - is_modified: Whether document has unsaved changes
                - object_count: Number of objects in document
                - active_object: Name of currently active object (None if none)
list_macrostool List all available FreeCAD macros.
List all available FreeCAD macros.

        Returns:
            List of dictionaries, each containing:
                - name: Macro name (without extension)
                - path: Full path to macro file
                - description: Macro description from comments
                - is_system: Whether it's a system macro
list_objectstool List all objects in a FreeCAD document.
List all objects in a FreeCAD document.

        Args:
            doc_name: Name of document. Uses active document if None.

        Returns:
            List of dictionaries, each containing:
                - name: Object name
                - label: Display label
                - type_id: FreeCAD type identifier (e.g., "Part::Box")
                - visibility: Whether object is visible
list_parts_librarytool List available parts from the FreeCAD parts library.
List available parts from the FreeCAD parts library.

        Returns:
            List of parts with:
                - name: Part filename
                - path: Full path to part file
                - category: Part category/folder
list_workbenchestool List all available FreeCAD workbenches.
List all available FreeCAD workbenches.

        Returns:
            List of dictionaries, each containing:
                - name: Workbench internal name
                - label: Display label
                - is_active: Whether workbench is currently active
loft_sketchestool Create a Loft (additive) through multiple sketches.
Create a Loft (additive) through multiple sketches.

        A loft creates a solid by connecting multiple profile sketches.

        Args:
            sketch_names: List of sketch names to loft through (in order).
            ruled: Whether to create ruled surfaces. Defaults to False.
            closed: Whether to close the loft. Defaults to False.
            name: Loft feature name. Auto-generated if None.
            doc_name: Document containing the sketches. Uses active document if None.

        Returns:
            Dictionary with created loft information:
                - name: Loft name
                - label: Loft label
                - type_id: Object type
make_compoundtool Combine multiple shapes into a single compound.
Combine multiple shapes into a single compound.

        A compound is a collection of shapes that can be manipulated together
        but are not fused (each shape remains separate).

        Args:
            object_names: List of object names to combine.
            result_name: Name for result object. Auto-generated if None.
            doc_name: Document containing the objects. Uses active document if None.

        Returns:
            Dictionary with result object information:
                - name: Result object name
                - label: Result object label
                - type_id: Result object type
                - shape_count: Number of shapes in compound
make_facetool Create a face from a closed wire.
Create a face from a closed wire.

        Args:
            object_name: Name of the wire object.
            result_name: Name for result object. Auto-generated if None.
            doc_name: Document containing the object. Uses active document if None.

        Returns:
            Dictionary with result object information:
                - name: Result object name
                - label: Result object label
                - type_id: Result object type
                - area: Face area
make_wiretool Create a wire (polyline) from a list of points.
Create a wire (polyline) from a list of points.

        Args:
            points: List of points, each as [x, y, z].
            closed: Whether to close the wire. Defaults to False.
            name: Object name. Auto-generated if None.
            doc_name: Target document. Uses active document if None.

        Returns:
            Dictionary with created object information:
                - name: Object name
                - label: Object label
                - type_id: Object type
                - length: Wire length
mirror_objecttool Mirror an object across a plane.
Mirror an object across a plane.

        Creates a new mirrored copy of the object.

        Args:
            object_name: Name of the object to mirror.
            plane: Mirror plane. Options: "XY", "XZ", "YZ".
            result_name: Name for the result object. Auto-generated if None.
            doc_name: Document containing the object. Uses active document if None.

        Returns:
            Dictionary with result object information:
                - name: Result object name
                - label: Result object label
                - type_id: Result object type
mirrored_featuretool Create a Mirrored feature from a PartDesign feature.
Create a Mirrored feature from a PartDesign feature.

        Mirrors a feature across a plane.

        Args:
            feature_name: Name of the feature to mirror.
            plane: Mirror plane. Options: "XY", "XZ", "YZ".
            name: Mirrored feature name. Auto-generated if None.
            doc_name: Document containing the feature. Uses active document if None.

        Returns:
            Dictionary with created mirror information:
                - name: Mirror name
                - label: Mirror label
                - type_id: Object type
offset_3dtool Create a 3D offset of a shape.
Create a 3D offset of a shape.

        Offsets all faces of the shape by the specified distance.

        Args:
            object_name: Name of the object to offset.
            offset: Offset distance (positive = outward, negative = inward).
            result_name: Name for result object. Auto-generated if None.
            doc_name: Document containing the object. Uses active document if None.

        Returns:
            Dictionary with result object information:
                - name: Result object name
                - label: Result object label
                - type_id: Result object type
pad_sketchtool Create a Pad (extrusion) from a sketch.
Create a Pad (extrusion) from a sketch.

        Args:
            sketch_name: Name of the sketch to pad.
            length: Pad length (extrusion distance).
            symmetric: Whether to extrude symmetrically. Defaults to False.
            reversed: Whether to reverse direction. Defaults to False.
            name: Pad feature name. Auto-generated if None.
            doc_name: Document containing the sketch. Uses active document if None.

        Returns:
            Dictionary with created pad information:
                - name: Pad name
                - label: Pad label
                - type_id: Object type
part_lofttool Create a loft (transition shape) between multiple profiles.
Create a loft (transition shape) between multiple profiles.

        This is the Part workbench version of loft, working directly on
        wires/faces rather than PartDesign sketches.

        Args:
            profile_names: List of wire/face object names to loft through (in order).
            solid: Whether to create a solid (True) or shell (False). Defaults to True.
            ruled: Whether to create ruled surfaces. Defaults to False.
            closed: Whether to close the loft (connect last to first). Defaults to False.
            result_name: Name for result object. Auto-generated if None.
            doc_name: Document containing the profiles. Uses active document if None.

        Returns:
            Dictionary with result object information:
                - name: Result object name
                - label: Result object label
                - type_id: Result object type
part_sweeptool Sweep a profile along a spine path.
Sweep a profile along a spine path.

        This is the Part workbench version of sweep, working directly on
        wires/faces rather than PartDesign sketches.

        Args:
            profile_name: Name of the profile wire/face object.
            spine_name: Name of the spine (path) wire object.
            solid: Whether to create a solid. Defaults to True.
            frenet: Whether to use Frenet mode for orientation. Defaults to True.
            result_name: Name for result object. Auto-generated if None.
            doc_name: Document containing the objects. Uses active document if None.

        Returns:
            Dictionary with result object information:
                - name: Result object name
                - label: Result object label
                - type_id: Result object type
pocket_sketchtool Create a Pocket (cut extrusion) from a sketch.
Create a Pocket (cut extrusion) from a sketch.

        Args:
            sketch_name: Name of the sketch to pocket.
            length: Pocket depth.
            type: Pocket type: "Length", "ThroughAll", "UpToFirst", "UpToFace".
                When the Midplane fallback is used, symmetric pockets support
                only "Length" and "ThroughAll"; other termination modes are
                rejected because FreeCAD ignores Midplane for them.
            name: Pocket feature name. Auto-generated if None.
            doc_name: Document containing the sketch. Uses active document if None.
            reversed: Flip the cut direction. Use True when the default
                direction points away from the material and removes nothing.
                Defaults to False.
            symmetric: Distribute the cut equally on both sides of the sketch
                plane. Uses the SideType property when available, falling back
                to Midplane or Symmetric on older FreeCAD versions. Defaults
                to False. Kept last so existing positional calls keep working.

        Returns:
            Dictionary with created pocket information:
                - name: Pocket name
                - label: Pocket label
                - type_id: Object type
                - volume_before: Body volume before the pocket
                - volume_after: Body volume after the pocket
                - volume_removed: Material removed (volume_before - volume_after)
                - warning: Present only when the pocket removed no material, so a
                    caller can tell a no-op cut from a real one
polar_patterntool Create a Polar (circular) Pattern from a PartDesign feature.
Create a Polar (circular) Pattern from a PartDesign feature.

        Repeats a feature around an axis.

        Args:
            feature_name: Name of the feature to pattern.
            axis: Pattern axis. Options: "X", "Y", "Z".
            angle: Total pattern angle. Defaults to 360.0.
            occurrences: Number of pattern instances. Defaults to 6.
            name: Pattern feature name. Auto-generated if None.
            doc_name: Document containing the feature. Uses active document if None.

        Returns:
            Dictionary with created pattern information:
                - name: Pattern name
                - label: Pattern label
                - type_id: Object type
recomputetool Force recompute of all objects in a document.
Force recompute of all objects in a document.

        Args:
            doc_name: Document to recompute. Uses active document if None.

        Returns:
            Dictionary with result:
                - success: Whether recompute completed
                - touch_count: Number of objects that were recomputed
recompute_documenttool Recompute a FreeCAD document to update all dependent objects.
Recompute a FreeCAD document to update all dependent objects.

        Args:
            doc_name: Name of document to recompute. Uses active document if None.

        Returns:
            Dictionary with recompute result:
                - success: Whether recompute was successful
                - invalid_objects: Objects reporting a recompute error
redotool Redo the last undone operation.
Redo the last undone operation.

        Args:
            doc_name: Document to redo in. Uses active document if None.

        Returns:
            Dictionary with result:
                - success: Whether redo was performed
                - can_redo: Whether more redos are available
revolution_sketchtool Create a Revolution (rotational extrusion) from a sketch.
Create a Revolution (rotational extrusion) from a sketch.

        Revolves the sketch profile around an axis to create a solid of revolution.

        Args:
            sketch_name: Name of the sketch to revolve.
            angle: Revolution angle in degrees. Defaults to 360.
            axis: Axis to revolve around. Options:
                - "Base_X" - X axis
                - "Base_Y" - Y axis
                - "Base_Z" - Z axis
                - "Sketch_V" - Sketch vertical axis
                - "Sketch_H" - Sketch horizontal axis
            symmetric: Whether to revolve symmetrically. Defaults to False.
            reversed: Whether to reverse direction. Defaults to False.
            name: Revolution feature name. Auto-generated if None.
            doc_name: Document containing the sketch. Uses active document if None.

        Returns:
            Dictionary with created revolution information:
                - name: Revolution name
                - label: Revolution label
                - type_id: Object type
revolve_shapetool Revolve a wire or face around an axis.
Revolve a wire or face around an axis.

        Args:
            object_name: Name of the wire or face object to revolve.
            axis_point: A point on the rotation axis [x, y, z].
            axis_direction: Direction of the rotation axis [x, y, z].
            angle: Revolution angle in degrees. Defaults to 360.
            result_name: Name for result object. Auto-generated if None.
            doc_name: Document containing the object. Uses active document if None.

        Returns:
            Dictionary with result object information:
                - name: Result object name
                - label: Result object label
                - type_id: Result object type
rotate_objecttool Rotate an object around an axis.
Rotate an object around an axis.

        Modifies the object's placement in-place.

        Args:
            object_name: Name of the object to rotate.
            axis: Rotation axis as [x, y, z] vector.
            angle: Rotation angle in degrees.
            center: Center point for rotation [x, y, z].
                    Uses object center if None.
            doc_name: Document containing the object. Uses active document if None.

        Returns:
            Dictionary with new placement:
                - position: New position [x, y, z]
                - rotation: New rotation angles
scale_objecttool Scale an object uniformly or non-uniformly.
Scale an object uniformly or non-uniformly.

        Creates a new scaled copy using Part.Scale.

        Args:
            object_name: Name of the object to scale.
            scale: Scale factor. Can be:
                - A single float for uniform scaling
                - A list [sx, sy, sz] for non-uniform scaling
            result_name: Name for the result object. Auto-generated if None.
            doc_name: Document containing the object. Uses active document if None.

        Returns:
            Dictionary with result object information:
                - name: Result object name
                - label: Result object label
                - type_id: Result object type
section_shapetool Create a cross-section of a shape at a standard plane.
Create a cross-section of a shape at a standard plane.

        Args:
            object_name: Name of the object to section.
            plane: Section plane: "XY", "XZ", or "YZ". Defaults to "XY".
            offset: Offset from origin along the plane normal. Defaults to 0.
            result_name: Name for result object. Auto-generated if None.
            doc_name: Document containing the object. Uses active document if None.

        Returns:
            Dictionary with result object information:
                - name: Result object name
                - label: Result object label
                - type_id: Result object type
set_camera_positiontool Set the camera position and orientation.
Set the camera position and orientation.

        Requires GUI mode.

        Args:
            position: Camera position as [x, y, z].
            look_at: Point to look at as [x, y, z]. Uses origin if None.
            doc_name: Document to set camera for. Uses active document if None.

        Returns:
            Dictionary with result:
                - success: Whether operation was successful
set_display_modetool Set the display mode of a FreeCAD object.
Set the display mode of a FreeCAD object.

        Args:
            object_name: Name of the object.
            mode: Display mode. Common options:
                - "Flat Lines" - Solid with edges
                - "Shaded" - Solid without edges
                - "Wireframe" - Wire frame only
                - "Points" - Points only
            doc_name: Document containing the object. Uses active document if None.

        Returns:
            Dictionary with result:
                - success: Whether operation was successful
                - mode: New display mode
set_object_colortool Set the color of a FreeCAD object.
Set the color of a FreeCAD object.

        Args:
            object_name: Name of the object.
            color: RGB color as [r, g, b] where each value is 0.0-1.0.
                   Example: [1.0, 0.0, 0.0] for red.
            doc_name: Document containing the object. Uses active document if None.

        Returns:
            Dictionary with result:
                - success: Whether operation was successful
                - color: New color values
set_object_visibilitytool Set the visibility of a FreeCAD object.
Set the visibility of a FreeCAD object.

        Args:
            object_name: Name of the object.
            visible: Whether object should be visible.
            doc_name: Document containing the object. Uses active document if None.

        Returns:
            Dictionary with result:
                - success: Whether operation was successful
                - visible: New visibility state
set_placementtool Set the placement (position and rotation) of a FreeCAD object.
Set the placement (position and rotation) of a FreeCAD object.

        Args:
            object_name: Name of the object to move.
            position: Position as [x, y, z]. Keeps current if None.
            rotation: Rotation as [yaw, pitch, roll] in degrees. Keeps current if None.
            doc_name: Document containing the object. Uses active document if None.

        Returns:
            Dictionary with new placement:
                - position: New position [x, y, z]
                - rotation: New rotation angles
set_selectiontool Set the selection in FreeCAD.
Set the selection in FreeCAD.

        Requires GUI mode.

        Args:
            object_names: List of object names to select.
            clear_existing: Whether to clear existing selection first. Defaults to True.
            doc_name: Document containing the objects. Uses active document if None.

        Returns:
            Dictionary with result:
                - success: Whether operation was successful
                - selected_count: Number of objects selected
set_view_angletool Set the 3D view angle.
Set the 3D view angle.

        Args:
            view_angle: View angle to set. Options:
                - "Isometric" - 3D isometric view
                - "Front" - Front view (XZ plane)
                - "Back" - Back view
                - "Top" - Top view (XY plane)
                - "Bottom" - Bottom view
                - "Left" - Left view (YZ plane)
                - "Right" - Right view
                - "FitAll" - Fit all objects in view
            doc_name: Document to set view for. Uses active document if None.

        Returns:
            Dictionary with result:
                - success: Whether operation was successful
shell_objecttool Create a shell (hollow) version of a solid by removing faces.
Create a shell (hollow) version of a solid by removing faces.

        Also known as "thickness" operation. Removes specified faces and
        offsets the remaining faces to create a hollow shell.

        Args:
            object_name: Name of the solid object to shell.
            thickness: Wall thickness (positive = outward, negative = inward).
            faces_to_remove: List of face names to remove (e.g., ["Face1", "Face6"]).
                            If None, tries to remove the largest face.
            result_name: Name for result object. Auto-generated if None.
            doc_name: Document containing the object. Uses active document if None.

        Returns:
            Dictionary with result object information:
                - name: Result object name
                - label: Result object label
                - type_id: Result object type
slice_shapetool Slice a shape with a plane, returning the cross-section.
Slice a shape with a plane, returning the cross-section.

        Args:
            object_name: Name of the object to slice.
            plane_point: A point on the cutting plane [x, y, z].
            plane_normal: Normal vector of the cutting plane [x, y, z].
            result_name: Name for result object. Auto-generated if None.
            doc_name: Document containing the object. Uses active document if None.

        Returns:
            Dictionary with result object information:
                - name: Result object name
                - label: Result object label
                - type_id: Result object type
spreadsheet_bind_propertytool Bind an object property to a spreadsheet cell using expressions.
Bind an object property to a spreadsheet cell using expressions.

        This creates a parametric link where the object property is
        driven by the spreadsheet cell value. When the spreadsheet
        value changes, the object updates automatically.

        Args:
            spreadsheet_name: Name of the spreadsheet object.
            alias: Cell alias to bind (the cell must have an alias set).
            target_object: Name of the object to modify.
            target_property: Property name to bind (e.g., "Length", "Width").
            doc_name: Document containing the objects. Uses active if None.

        Returns:
            Dictionary with result:
                - success: Whether the operation succeeded
                - expression: The expression that was set
                - target_object: Object that was modified
                - target_property: Property that was bound

        Raises:
            ValueError: If no document is found.
            ValueError: If the spreadsheet object is not found.
            ValueError: If the target object is not found.
            ValueError: If the alias does not exist on the spreadsheet.
            ValueError: If the target property does not exist.
            ValueError: If binding the expression fails.

        Example:
            Bind a box's length to a spreadsheet parameter::

                await spreadsheet_set_cell("Params", "A1", 50)
                await spreadsheet_set_alias("Params", "A1", "BoxLength")
                await spreadsheet_bind_property("Params", "BoxLength", "Box", "Length")
                # Now Box.Length = 50 and updates when A1 changes
spreadsheet_clear_celltool Clear a cell in a spreadsheet.
Clear a cell in a spreadsheet.

        This removes the cell's content and any alias.

        Args:
            spreadsheet_name: Name of the spreadsheet object.
            cell: Cell address to clear (e.g., "A1").
            doc_name: Document containing the spreadsheet. Uses active if None.

        Returns:
            Dictionary with result:
                - success: Whether the operation succeeded
                - cell: Cell address that was cleared

        Raises:
            ValueError: If no document is found.
            ValueError: If the spreadsheet object is not found.
            ValueError: If clearing the cell fails.

        Example:
            Clear a cell::

                await spreadsheet_clear_cell("Params", "A1")
spreadsheet_createtool Create a new Spreadsheet object.
Create a new Spreadsheet object.

        Spreadsheets allow storing values and formulas that can be
        referenced by other objects in the document for parametric design.

        Args:
            name: Spreadsheet name. Auto-generated if None.
            doc_name: Target document. Uses active document if None.

        Returns:
            Dictionary with created spreadsheet information:
                - name: Spreadsheet object name
                - label: Spreadsheet label
                - type_id: Object type

        Raises:
            ValueError: If the bridge fails to create the spreadsheet.
            ValueError: If a spreadsheet with the same name already exists
                (FreeCAD will auto-rename).

        Example:
            Create a spreadsheet for parameters::

                result = await spreadsheet_create(name="Parameters")
                # Returns {"name": "Parameters", "label": "Parameters", ...}
spreadsheet_get_aliasestool Get all aliases defined in a spreadsheet.
Get all aliases defined in a spreadsheet.

        Args:
            spreadsheet_name: Name of the spreadsheet object.
            doc_name: Document containing the spreadsheet. Uses active if None.

        Returns:
            Dictionary with aliases:
                - spreadsheet: Spreadsheet name
                - aliases: Dictionary mapping alias names to cell addresses
                - count: Number of aliases

        Raises:
            ValueError: If no document is found.
            ValueError: If the spreadsheet object is not found.
            ValueError: If retrieving aliases fails.

        Example:
            List all parameter aliases::

                result = await spreadsheet_get_aliases("Params")
                for alias, cell in result["aliases"].items():
                    print(f"{alias} -> {cell}")
spreadsheet_get_celltool Get the value of a cell in a spreadsheet.
Get the value of a cell in a spreadsheet.

        Args:
            spreadsheet_name: Name of the spreadsheet object.
            cell: Cell address (e.g., "A1", "B2").
            doc_name: Document containing the spreadsheet. Uses active if None.

        Returns:
            Dictionary with cell information:
                - cell: Cell address
                - value: Raw value (formula if it's a formula)
                - computed: Computed/displayed value
                - alias: Cell alias if set, None otherwise

        Raises:
            ValueError: If no document is found.
            ValueError: If the spreadsheet object is not found.
            ValueError: If retrieving cell data fails.

        Example:
            Get a cell value::

                result = await spreadsheet_get_cell("Params", "A1")
                print(f"Value: {result['computed']}")
spreadsheet_get_cell_rangetool Get values from a range of cells in a spreadsheet.
Get values from a range of cells in a spreadsheet.

        Args:
            spreadsheet_name: Name of the spreadsheet object.
            start_cell: Starting cell address (e.g., "A1").
            end_cell: Ending cell address (e.g., "C5").
            doc_name: Document containing the spreadsheet. Uses active if None.

        Returns:
            Dictionary with range data:
                - spreadsheet: Spreadsheet name
                - start: Start cell
                - end: End cell
                - cells: Dictionary mapping cell addresses to their values

        Raises:
            ValueError: If no document is found.
            ValueError: If the spreadsheet object is not found.
            ValueError: If start_cell or end_cell has an invalid format.
            ValueError: If retrieving the cell range fails.

        Example:
            Get a range of values::

                result = await spreadsheet_get_cell_range("Params", "A1", "B3")
                for cell, value in result["cells"].items():
                    print(f"{cell}: {value}")
spreadsheet_set_aliastool Set an alias for a cell in a spreadsheet.
Set an alias for a cell in a spreadsheet.

        Aliases allow referencing cell values by name instead of cell address.
        This is the key to parametric design - set an alias like "Length"
        and then reference it in object properties as "Spreadsheet.Length".

        Args:
            spreadsheet_name: Name of the spreadsheet object.
            cell: Cell address (e.g., "A1").
            alias: Alias name (e.g., "Length", "Width"). Must be a valid
                Python identifier (no spaces, starts with letter).
            doc_name: Document containing the spreadsheet. Uses active if None.

        Returns:
            Dictionary with result:
                - success: Whether the operation succeeded
                - cell: Cell address
                - alias: Alias that was set

        Raises:
            ValueError: If no document is found.
            ValueError: If the spreadsheet object is not found.
            ValueError: If the alias is not a valid Python identifier.
            ValueError: If setting the alias fails.

        Example:
            Set aliases for parametric dimensions::

                await spreadsheet_set_alias("Params", "A1", "BoxLength")
                await spreadsheet_set_alias("Params", "A2", "BoxWidth")
                # Now use Params.BoxLength in expressions
spreadsheet_set_celltool Set the value of a cell in a spreadsheet.
Set the value of a cell in a spreadsheet.

        Values can be numbers, strings, or formulas. Formulas start with '='.

        Args:
            spreadsheet_name: Name of the spreadsheet object.
            cell: Cell address (e.g., "A1", "B2", "C10").
            value: Value to set. Can be:
                - Number (int or float)
                - String (text)
                - Formula starting with '=' (e.g., "=A1+B1", "=2*pi")
            doc_name: Document containing the spreadsheet. Uses active if None.

        Returns:
            Dictionary with result:
                - success: Whether the operation succeeded
                - cell: Cell address that was set
                - value: Value that was set
                - computed: Computed value (for formulas)

        Raises:
            ValueError: If no document is found.
            ValueError: If the spreadsheet object is not found.
            ValueError: If the object is not a spreadsheet.
            ValueError: If setting the cell value fails.

        Example:
            Set numeric values and formulas::

                await spreadsheet_set_cell("Params", "A1", 100)  # Number
                await spreadsheet_set_cell("Params", "A2", "=A1*2")  # Formula
                await spreadsheet_set_cell("Params", "B1", "Length")  # String
subtractive_lofttool Create a subtractive loft (cut) through multiple sketches.
Create a subtractive loft (cut) through multiple sketches.

        Args:
            sketch_names: List of sketch names to loft through (in order).
            ruled: Whether to create ruled surfaces. Defaults to False.
            closed: Whether to close the loft. Defaults to False.
            name: Loft feature name. Auto-generated if None.
            doc_name: Document containing the sketches. Uses active document if None.

        Returns:
            Dictionary with created loft information:
                - name: Loft name
                - label: Loft label
                - type_id: Object type
subtractive_pipetool Create a subtractive pipe (sweep cut) along a spine path.
Create a subtractive pipe (sweep cut) along a spine path.

        Args:
            profile_sketch: Name of the profile sketch to sweep.
            spine_sketch: Name of the spine (path) sketch.
            transition: Transition mode. Options:
                - "Transformed" - Smooth transitions
                - "Right" - Sharp corners
                - "Round" - Rounded corners
            name: Pipe feature name. Auto-generated if None.
            doc_name: Document containing the sketches. Uses active document if None.

        Returns:
            Dictionary with created pipe information:
                - name: Pipe name
                - label: Pipe label
                - type_id: Object type
sweep_sketchtool Create a Sweep (additive) along a spine path.
Create a Sweep (additive) along a spine path.

        A sweep extrudes a profile sketch along a path defined by another sketch.

        Args:
            profile_sketch: Name of the profile sketch to sweep.
            spine_sketch: Name of the spine (path) sketch.
            transition: Transition mode. Options:
                - "Transformed" - Smooth transitions
                - "Right" - Sharp corners
                - "Round" - Rounded corners
            name: Sweep feature name. Auto-generated if None.
            doc_name: Document containing the sketches. Uses active document if None.

        Returns:
            Dictionary with created sweep information:
                - name: Sweep name
                - label: Sweep label
                - type_id: Object type
thickness_featuretool Create a thickness (shell) feature in PartDesign.
Create a thickness (shell) feature in PartDesign.

        Hollows out a solid by removing specified faces and offsetting
        the remaining faces.

        Args:
            object_name: Name of the solid feature to shell.
            thickness: Wall thickness (positive = inward).
            faces_to_remove: List of face names to remove (e.g., ["Face1"]).
            name: Thickness feature name. Auto-generated if None.
            doc_name: Document containing the object. Uses active document if None.

        Returns:
            Dictionary with created thickness information:
                - name: Thickness name
                - label: Thickness label
                - type_id: Object type
toggle_constructiontool Toggle construction mode for a sketch geometry.
Toggle construction mode for a sketch geometry.

        Construction geometry is used for reference but not included
        in the final sketch profile.

        Args:
            sketch_name: Name of the sketch.
            geometry_index: Index of the geometry to toggle.
            doc_name: Document containing the sketch. Uses active document if None.

        Returns:
            Dictionary with result:
                - success: Whether the operation succeeded
                - is_construction: New construction state
undotool Undo the last operation.
Undo the last operation.

        Args:
            doc_name: Document to undo in. Uses active document if None.

        Returns:
            Dictionary with result:
                - success: Whether undo was performed
                - can_undo: Whether more undos are available
undo_if_invalidtool Check document health and undo the last operation if invalid objects exist.
Check document health and undo the last operation if invalid objects exist.

        This tool first validates all objects in the document. If any objects
        are invalid or have errors, it automatically performs an undo operation.
        Use this after risky operations to ensure the model stays in a valid state.

        Args:
            doc_name: Name of document to check. Uses active document if None.

        Returns:
            Dictionary containing:
                - was_valid: Whether the document was valid before any undo
                - undone: Whether an undo operation was performed
                - invalid_objects: List of invalid objects found (before undo)
                - objects_with_errors: List of objects with errors (before undo)
                - message: Human-readable description of what happened
                - validation_after: Validation result after undo (if performed)

        Example:
            Auto-recover from a failed boolean operation::

                await boolean_operation("cut", "Box", "InvalidShape")
                result = await undo_if_invalid()
                if result["undone"]:
                    print("Recovered from invalid operation")
validate_documenttool Check the health of all objects in a FreeCAD document.
Check the health of all objects in a FreeCAD document.

        This tool validates every object in the document and provides
        a summary of the document's overall health. Use this after
        complex operations or before saving/exporting.

        Args:
            doc_name: Name of document to validate. Uses active document if None.

        Returns:
            Dictionary containing:
                - valid: Overall document validity (True if all objects valid)
                - doc_name: Name of the validated document
                - total_objects: Total number of objects in document
                - valid_objects: Count of valid objects
                - invalid_objects: List of names of invalid objects
                - objects_with_errors: List of names with error states
                - objects_needing_recompute: List of objects that need recompute
                - recompute_needed: Whether document needs recomputation
                - summary: Human-readable summary of document health

        Example:
            Check document health before saving::

                result = await validate_document()
                if result["valid"]:
                    await save_document()
                else:
                    print(f"Issues: {result['invalid_objects']}")
validate_objecttool Check the health and validity of a FreeCAD object.
Check the health and validity of a FreeCAD object.

        This tool inspects an object to determine if it is in a valid state,
        has any computation errors, or needs recomputation. Use this after
        performing operations to verify they succeeded.

        Args:
            object_name: Name of the object to validate.
            doc_name: Document containing the object. Uses active document if None.

        Returns:
            Dictionary containing:
                - valid: Overall validity (True if shape is valid and no errors)
                - object_name: Name of the validated object
                - shape_valid: Whether the shape geometry is valid
                - has_errors: Whether the object has error states
                - state: List of state flags (e.g., ["Invalid", "Touched"])
                - recompute_needed: Whether recomputation is needed
                - volume: Shape volume if applicable (None otherwise)
                - area: Shape surface area if applicable (None otherwise)
                - error_messages: List of any error messages
                - warnings: List of any warnings

        Example:
            Validate an object after creating it::

                result = await validate_object("MyBox")
                if not result["valid"]:
                    print(f"Errors: {result['error_messages']}")
zoom_intool Zoom in the 3D view.
Zoom in the 3D view.

        Requires GUI mode.

        Args:
            factor: Zoom factor (>1 zooms in). Defaults to 1.5.
            doc_name: Document to zoom in. Uses active document if None.

        Returns:
            Dictionary with result:
                - success: Whether operation was successful
zoom_outtool Zoom out the 3D view.
Zoom out the 3D view.

        Requires GUI mode.

        Args:
            factor: Zoom factor (>1 zooms out). Defaults to 1.5.
            doc_name: Document to zoom out. Uses active document if None.

        Returns:
            Dictionary with result:
                - success: Whether operation was successful

Text the model reads (171)

Every tool, prompt and resource description as written in the code: the model sees all of it, the user usually does not.

cam_get_capabilities tool
List what the CAM workbench offers in the connected FreeCAD.

        Use this first. It reports every operation and dressup type with its
        availability, the enabled post processors, job templates (job_*.json),
        the tool asset path, and known FreeCAD CAM issues the tools detect.

        Returns:
            Dictionary with freecad_version, gui, operations, dressups,
            stock_kinds, post_processors (Job.PostProcessor choices; legacy
            ones on 26.3+), machine_post_processors and machines (26.3+, a
            job uses them through its Machine property), job_templates,
            default_job_template, asset_path, tool_system ("assets" on FreeCAD
            1.1+, "legacy" tool bit files on 1.0), freecad_home,
            known_freecad_issues, stock_materials (26.3+: materials with
            FreeCAD's Machinability model, i.e. the ones CAM offers as stock
            material; name, uuid, library, folder and their generic surface
            speeds, if any).
cam_list_tool_library tool
List FreeCAD's tool libraries, their tool bits and the tool shapes.

        Tool bits from a library can be used in ``cam_add_tool_controller``
        with ``tool={"library_bit": "<id>"}``. Shapes (endmill, drill, v-bit,
        ...) can be used to define a new bit with ``tool={"shape": ...}``.

        Args:
            library: Only list this library (id or label). All if None.

        Returns:
            Dictionary with libraries (id, label, bits with number, id, label,
            shape, parameters, attributes) and shapes.
cam_analyze_model tool
List a model's faces and drillable holes, to choose operation Base faces.

        Args:
            object_name: Model object (name or unique label).
            doc_name: Document. Uses the active document if None.
            face_types: Only list these surface types, e.g. ["Plane", "Cylinder"].

        Returns:
            Dictionary with bound_box, volume, valid, faces (face name, surface
            type, area, z range, normal for planes, radius/center/axis for
            cylinders) and drillable_holes (element, diameter, center).
cam_set_stock tool
Replace a job's stock and/or assign the stock material.

        Args:
            kind: "from_base" (model bounding box plus margins), "box" or
                "cylinder". If None: only assign `material` to the existing
                stock, or "from_base" when no material is given.
            job_name: Job. Optional if the document has exactly one job.
            doc_name: Document. Uses the active document if None.
            extent_neg: from_base margins [x, y, z] on the negative sides (mm).
            extent_pos: from_base margins [x, y, z] on the positive sides (mm).
            size: box [length, width, height] (mm).
            radius: cylinder radius (mm).
            height: cylinder height (mm).
            placement: {"base": [x, y, z], "axis": [x, y, z], "angle": deg}.
            material: Stock material (FreeCAD 26.3+), name or UUID of a
                material from cam_get_capabilities' stock_materials. Feeds &
                speeds presets on tool bits are matched against it. A
                replaced stock keeps its material when this is None.

        Returns:
            Dictionary with stock name, kind, bound_box, material,
            material_uuid.
cam_feeds_speeds tool
Compare tool controllers with FreeCAD's feeds & speeds lookup.

        Runs what the "Feeds and Speeds Wizard" of a tool controller runs
        (FreeCAD 26.3+): presets on the tool bit, matched against the job's
        stock material (cam_set_stock material). Use it to check a job's
        speeds and feeds, or with apply=True to set them.

        Args:
            job_name: Job. Optional if the document has exactly one job.
            doc_name: Document. Uses the active document if None.
            tool_controllers: Tool controllers (names or unique labels). All
                of the job if None.
            mode: "preset" (only curated presets of the tool) or "resolver"
                (also the material's generic surface speed and the tool's
                default chipload).
            op_type: "profile", "pocket", "slot", "drill", "adaptive" or
                "surface_finish"; None matches any.
            apply: Write the suggestion to the tool controller.

        Returns:
            Dictionary with job, material, material_uuid and per tool
            controller: current values and suggestion (source, confidence,
            spindle_speed, horiz_feed_mm_min, vert_feed_mm_min,
            surface_speed_m_min, chipload_mm, warnings, applied, or a note).
cam_remove_tool_controller tool
Remove a tool controller (and its tool bit) that no operation uses.

        Args:
            tool_controller: Tool controller (name or unique label).
            doc_name: Document. Uses the active document if None.

        Returns:
            Dictionary with removed (label) and remaining tool controllers.
cam_add_operation tool
Add any CAM operation to a job.

        Use ``cam_get_capabilities`` for the types and ``cam_describe_type``
        for every option of a type. Depth properties are expressions by
        default; giving a value replaces the expression.

        Args:
            op_type: Operation type, e.g. "Profile", "Pocket", "PocketShape",
                "Adaptive", "MillFace", "MillFacing", "Helix", "Drilling",
                "Tapping", "ThreadMilling", "Engrave", "Vcarve", "Deburr",
                "Slot", "Surface", "Waterline", "PlanarSurface",
                "RotarySurface", "Flute", "Probe", "Custom"; or one that works
                on other operations or the program flow: "Comment" (property
                Comment), "Stop" (property Stop: "Mandatory" M0 / "Optional"
                M1), "Copy" (linked copy of one operation), "Array" (linear,
                polar or point array of operations with one tool controller,
                coolant None), "SimpleCopy" (fixed G-code copy). These take no
                tool_controller or base and are appended at the end of the
                job; reorder with cam_set_operation_order.
            job_name: Job. Optional if the document has exactly one job.
            tool_controller: Tool controller (name or label). Required when
                the job has more than one.
            base: Features to machine, [{"object": "<model>", "subelements":
                ["Face3", "Edge7"]}]. Original model names are mapped to the
                job's clones. None keeps FreeCAD's default (e.g. Drilling picks
                all holes, Profile the model outline); [] clears it.
            properties: Property values, e.g. {"Side": "Outside",
                "FinalDepth": -5, "StepDown": "1.5 mm"}.
            expressions: Property expressions; None as value removes one.
            name: Internal object name. The type if None.
            label: Display label.
            doc_name: Document. Uses the active document if None.
            source_operations: Copy, Array, SimpleCopy only: the operations to
                copy or array (names or labels), top-level in the job.

        Returns:
            Dictionary with name, label, type, what was set, and a path summary
            (commands, cut bound box, feeds, cycle time, warnings, notes).
cam_add_dressup tool
Add a dressup to an operation (or to another dressup).

        The dressup replaces the operation in the job. If the connected FreeCAD
        has the known bug where the base operation stays in the job (it would
        be cut twice), the call fails and is undone instead of working around
        it; see ``cam_get_capabilities`` known_freecad_issues.

        Args:
            dressup_type: "Tags", "Boundary", "Dogbone", "Array", "LeadInOut",
                "RampEntry", "Dragknife", "AxisMap", "ZCorrect", and on
                FreeCAD 26.3+ "Boundary2", "Mirror", "PlungeMilling". All but
                the first four need the FreeCAD GUI.
            base_operation: Operation or dressup to dress (name or label).
            properties: Property values, e.g. {"Width": 6, "Height": 1.5}.
            expressions: Property expressions.
            tag_count: Tags only: number of holding tags to generate.
            label: Display label.
            doc_name: Document. Uses the active document if None.

        Returns:
            Dictionary with name, label, type, base, what was set and a path
            summary.
cam_describe_type tool
List every option of an operation or dressup type with its defaults.

        Builds the type on a placeholder model in a hidden temporary document,
        reads its properties and closes the document again.

        Args:
            type_name: Operation or dressup type (see cam_get_capabilities).
            kind: "operation" or "dressup".
            groups: Only these property groups, e.g. ["Depth", "Operation"].
            include_hidden: Include properties FreeCAD hides in the editor.

        Returns:
            Dictionary with kind, type and properties (name, type, group,
            default, doc, enum values, expression, read_only).
cam_get_properties tool
Read all properties of a CAM object with their metadata.

        Works for jobs, stock, setup sheets, tool controllers, operations and
        dressups.

        Args:
            object_name: Object (name or unique label).
            groups: Only these property groups.
            include_hidden: Include properties FreeCAD hides in the editor.
            doc_name: Document. Uses the active document if None.

        Returns:
            Dictionary with name, label, kind, type and properties (name, type,
            group, value, doc, enum values, expression, read_only).
cam_set_properties tool
Set properties of any CAM object, with validation.

        Enumeration values are checked against the allowed list, read-only
        properties are refused, and a plain value replaces an expression.
        Quantities take units: "5 mm", "800 mm/min", "90 °".

        Args:
            object_name: Object (name or unique label).
            values: Property values. Link lists use [{"object", "subelements"}],
                links an object name, vectors [x, y, z].
            expressions: Property expressions; None as value removes one.
            recompute: Recompute the document afterwards.
            doc_name: Document. Uses the active document if None.

        Returns:
            Dictionary with what was set and, for operations and dressups, a
            path summary.
cam_set_operation_order tool
Reorder the operations of a job (this is the G-code order).

        Args:
            order: Every top-level operation/dressup of the job, in the new order.
            job_name: Job. Optional if the document has exactly one job.
            doc_name: Document. Uses the active document if None.

        Returns:
            Dictionary with the new order (labels).
cam_inspect_job tool
Describe a job: models, stock, tool controllers, operations, post.

        Every operation includes a path summary with plausibility warnings
        (no cutting moves, feed 0, rapid moves below the stock top, cuts
        outside the stock) and notes (e.g. cuts below the stock bottom).

        Args:
            job_name: Job. Optional if the document has exactly one job.
            doc_name: Document. Uses the active document if None.

        Returns:
            Dictionary with models, stock, tool_controllers, operations,
            setup_sheet, post processor settings, fixtures and cycle_time.
cam_inspect_path tool
Summarize the toolpath of one operation or dressup.

        Args:
            object_name: Operation or dressup (name or unique label).
            gcode_lines: Also return up to this many lines of its path as
                G-code (FreeCAD internal units: mm, mm/s). 0 returns none.
            doc_name: Document. Uses the active document if None.

        Returns:
            Dictionary with commands, by_command, feeds_mm_per_min, cycle_time,
            cut_bound_box, warnings, notes and optionally gcode.
cam_place_model tool
Turn and move the part in a job, e.g. flipped for the second side.

        Works on the job's model clones like FreeCAD's Job dialog (the
        original objects stay where they are). For a second setup, create a
        second job for the same model and place it here. Operations are
        recomputed. A stock "from base" is re-created with the same margins;
        a box or cylinder stock is turned and moved with the part.

        Args:
            job_name: Job. Optional if the document has exactly one job.
            rotate: {"axis": "x"|"y"|"z" or [x, y, z], "angle": degrees},
                around the center of the part's bounding box. Flip:
                {"axis": "x", "angle": 180}.
            face_up: {"object": "<model>", "face": "Face3"}: turn the part so
                this face points up (+Z). Not together with rotate.
            origin: Put the part's bounding box at the origin afterwards:
                {"x": "min"|"max"|"center"|"keep", "y": ...,
                 "z": "top"|"bottom"|"center"|"keep"}; e.g. {"x": "min",
                "y": "min", "z": "top"} for X0 Y0 at the lower left, Z0 on top.
            move: [x, y, z] shift in mm, applied together with origin.
            doc_name: Document. Uses the active document if None.

        Returns:
            Dictionary with rotation, move, model_bound_box, stock_bound_box,
            how the stock was handled and the recomputed operations.
list_documents tool
List all open FreeCAD documents.

        Returns:
            List of dictionaries, each containing:
                - name: Internal document name
                - label: Display label
                - path: File path (None if not saved)
                - is_modified: Whether document has unsaved changes
                - object_count: Number of objects in document
                - active_object: Name of currently active object (None if none)
get_active_document tool
Get the currently active FreeCAD document.

        Returns:
            Dictionary with document information, or None if no active document:
                - name: Internal document name
                - label: Display label
                - path: File path (None if not saved)
                - is_modified: Whether document has unsaved changes
                - objects: List of object names
                - active_object: Name of currently active object (None if none)
create_document tool
Create a new FreeCAD document.

        Args:
            name: Internal document name (no spaces allowed, will be sanitized).
            label: Display label (can contain spaces). Defaults to name.

        Returns:
            Dictionary with created document information:
                - name: Internal document name
                - label: Display label
                - path: File path (None for new document)
close_document tool
Close a FreeCAD document.

        Args:
            doc_name: Name of document to close. Uses active document if None.
            save_changes: Whether to save changes before closing. Defaults to False.

        Returns:
            Dictionary with close result:
                - success: Whether close was successful
                - saved: Whether document was saved before closing
recompute_document tool
Recompute a FreeCAD document to update all dependent objects.

        Args:
            doc_name: Name of document to recompute. Uses active document if None.

        Returns:
            Dictionary with recompute result:
                - success: Whether recompute was successful
                - invalid_objects: Objects reporting a recompute error
draft_list_fonts tool
List available font files on the system.

        Searches common font directories for TrueType (.ttf), OpenType (.otf),
        and TrueType Collection (.ttc) fonts that can be used with ShapeString.

        Note: For .ttc files, FreeCAD only uses the first font in the collection.

        Args:
            None.

        Returns:
            Dictionary with font information:
                - fonts: List of dictionaries with font details:
                    - name: Font filename
                    - path: Full path to font file
                    - type: Font type ("ttf", "otf", or "ttc")
                - count: Total number of fonts found
                - directories: Directories that were searched

        Raises:
            ValueError: If the bridge fails to execute the font search.

        Example:
            List available fonts::

                result = await draft_list_fonts()
                for font in result["fonts"][:10]:  # First 10 fonts
                    print(f"{font['name']}: {font['path']}")
draft_shapestring_to_sketch tool
Convert a ShapeString to a Sketch for use with PartDesign.

        This converts the 3D wire geometry of a ShapeString into a
        Sketcher::SketchObject that can be used with Pad, Pocket, etc.

        Args:
            shapestring_name: Internal name or unambiguous label of the ShapeString.
            body_name: Name of PartDesign Body to add sketch to. Optional.
            plane: Plane used to orient the sketch relative to the source.
                Options: "XY_Plane", "XZ_Plane", "YZ_Plane".
            sketch_name: Name for the created sketch. Auto-generated if None.
            doc_name: Document containing the ShapeString. Uses active if None.

        Returns:
            Dictionary with created sketch information:
                - name: Sketch object name
                - label: Sketch label
                - type_id: Object type
                - wire_count: Number of wires added to sketch
                - source: Name of source ShapeString

        Raises:
            ValueError: If the document, source, body, or origin plane is missing;
                the label is ambiguous; the plane or shape is invalid; contours
                are open or contain loose edges; edge conversion, recompute,
                or contour preservation fails.

        Example:
            Convert ShapeString to sketch for extrusion::

                await draft_shapestring("Hello", size=10)
                result = await draft_shapestring_to_sketch(
                    "ShapeString",
                    body_name="Body"
                )
                # Now use pad_sketch to extrude the text
draft_shapestring_to_face tool
Convert a ShapeString to a Face for direct use with Part operations.

        Creates a Part::Feature with a face from the ShapeString wires.
        This can be used directly with Part boolean operations or
        for creating solids.

        Args:
            shapestring_name: Name of the ShapeString object to convert.
            name: Name for the created face object. Auto-generated if None.
            doc_name: Document containing the ShapeString. Uses active if None.

        Returns:
            Dictionary with created face information:
                - name: Face object name
                - label: Face label
                - type_id: Object type
                - face_count: Number of faces created
                - area: Total face area
                - source: Name of source ShapeString

        Raises:
            ValueError: If no document is found.
            ValueError: If the ShapeString object is not found.
            ValueError: If the ShapeString has no shape data.
            ValueError: If the ShapeString has no wires.
            ValueError: If no faces could be created from the wires.
            ValueError: If conversion fails.

        Example:
            Convert ShapeString to face for boolean operations::

                await draft_shapestring("A", size=20)
                result = await draft_shapestring_to_face("ShapeString")
                # Now extrude or use with boolean operations
draft_extrude_shapestring tool
Extrude a ShapeString to create a 3D solid text object.

        This directly extrudes the ShapeString faces into a 3D solid,
        useful for creating standalone 3D text objects.

        Args:
            shapestring_name: Name of the ShapeString object to extrude.
            height: Extrusion height in mm. Defaults to 10.0.
            direction: Extrusion direction as [x, y, z]. Defaults to [0, 0, 1] (up).
            name: Name for the extruded object. Auto-generated if None.
            doc_name: Document containing the ShapeString. Uses active if None.

        Returns:
            Dictionary with extruded object information:
                - name: Object name
                - label: Object label
                - type_id: Object type
                - volume: Solid volume
                - height: Extrusion height used
                - source: Name of source ShapeString

        Raises:
            ValueError: If direction has incorrect number of elements (not 3).
            ValueError: If direction is a zero vector.
            ValueError: If no document is found.
            ValueError: If the ShapeString object is not found.
            ValueError: If the ShapeString has no shape data.
            ValueError: If the ShapeString has no wires.
            ValueError: If no faces could be created from the wires.
            ValueError: If extrusion fails.

        Example:
            Create extruded 3D text::

                await draft_shapestring("FreeCAD", size=20)
                result = await draft_extrude_shapestring(
                    "ShapeString",
                    height=5.0
                )
get_freecad_version tool
Get FreeCAD version and build information.

        Returns:
            Dictionary containing version information:
                - version: Version string (e.g., "0.21.2")
                - version_tuple: Version as list of integers
                - build_date: Build date string
                - python_version: Embedded Python version
                - gui_available: Whether GUI is available
get_connection_status tool
Get the current FreeCAD connection status.

        Returns:
            Dictionary containing connection information:
                - connected: Whether bridge is connected
                - mode: Connection mode (embedded, xmlrpc, socket)
                - freecad_version: FreeCAD version string
                - gui_available: Whether GUI is available
                - last_ping_ms: Last ping latency in milliseconds
                - error: Error message if not connected
get_console_output tool
Get recent FreeCAD console output.

        Args:
            lines: Maximum number of lines to return (1-1000). Defaults to 100.

        Returns:
            List of console output lines, most recent last.

        Raises:
            ValueError: The line limit is outside the supported range.
            RuntimeError: Console history is unavailable in this FreeCAD session.
get_mcp_server_environment tool
Get environment info about the MCP Server and FreeCAD connection.

        This tool returns information about the environment where the MCP Server
        is running and the FreeCAD connection state, which is useful for debugging,
        verifying which MCP Server instance you are connected to, and determining
        if GUI features are available.

        Returns:
            Dictionary containing environment information:
                - instance_id: Unique UUID for this server instance (generated at
                    startup). Use this to verify you're connected to the expected
                    server instance in tests and automation.
                - hostname: Machine hostname
                - os_name: Operating system name (Linux, Darwin, Windows)
                - os_version: Operating system version
                - platform: Platform identifier string
                - python_version: Python version running the MCP Server
                - freecad: FreeCAD connection information:
                    - connected: Whether bridge is connected to FreeCAD
                    - mode: Connection mode (embedded, xmlrpc, socket)
                    - version: FreeCAD version string
                    - gui_available: Whether FreeCAD GUI is available (False in
                        headless mode). Use this to skip GUI-only tests.
                    - is_headless: Convenience boolean, True when GUI is NOT
                        available (opposite of gui_available)
                - env_vars: Selected environment variables for debugging:
                    - FREECAD_MODE: Connection mode
                    - FREECAD_SOCKET_HOST: Socket host
                    - FREECAD_SOCKET_PORT: Socket port
                    - FREECAD_XMLRPC_PORT: XML-RPC port

        Example:
            Verify you're connected to the expected server instance::

                env = get_mcp_server_environment()
                expected_id = "abc123..."  # Captured from server startup output
                assert env["instance_id"] == expected_id

            Skip GUI-only tests in headless mode::

                env = get_mcp_server_environment()
                if env["freecad"]["is_headless"]:
                    pytest.skip("Test requires GUI mode")
list_macros tool
List all available FreeCAD macros.

        Returns:
            List of dictionaries, each containing:
                - name: Macro name (without extension)
                - path: Full path to macro file
                - description: Macro description from comments
                - is_system: Whether it's a system macro
list_objects tool
List all objects in a FreeCAD document.

        Args:
            doc_name: Name of document. Uses active document if None.

        Returns:
            List of dictionaries, each containing:
                - name: Object name
                - label: Display label
                - type_id: FreeCAD type identifier (e.g., "Part::Box")
                - visibility: Whether object is visible
inspect_object tool
Get detailed information about a FreeCAD object.

        Document-object links include their name, label, type ID, and document.
        Nested properties are bounded and may contain truncation or cycle markers.

        Args:
            object_name: Name of the object to inspect.
            doc_name: Document containing the object. Uses active document if None.
            include_properties: Whether to include property values.
            include_shape: Whether to include shape geometry details.

        Returns:
            Dictionary containing comprehensive object information:
                - name: Object name
                - label: Object label
                - type_id: FreeCAD type identifier
                - properties: Dictionary of property names and values (if requested)
                - shape_info: Shape details (if requested and object has shape)
                - children: List of child object names
                - parents: List of parent object names
                - visibility: Whether object is visible
create_object tool
Create a new FreeCAD object.

        Args:
            type_id: FreeCAD type ID for the object. Common types include:
                - "Part::Box" - Parametric box
                - "Part::Cylinder" - Parametric cylinder
                - "Part::Sphere" - Parametric sphere
                - "Part::Cone" - Parametric cone
                - "Part::Torus" - Parametric torus
                - "Part::Feature" - Generic Part feature
                - "Sketcher::SketchObject" - Sketch
                - "PartDesign::Body" - PartDesign body
            name: Object name. Auto-generated if None.
            properties: Initial property values to set.
            doc_name: Target document. Uses active document if None.

        Returns:
            Dictionary with created object information:
                - name: Object name
                - label: Object label
                - type_id: Object type
create_box tool
Create a Part Box primitive.

        Args:
            length: Box length (X dimension). Defaults to 10.0.
            width: Box width (Y dimension). Defaults to 10.0.
            height: Box height (Z dimension). Defaults to 10.0.
            name: Object name. Auto-generated if None.
            doc_name: Target document. Uses active document if None.

        Returns:
            Dictionary with created object information:
                - name: Object name
                - label: Object label
                - volume: Box volume
                - type_id: Object type
create_cylinder tool
Create a Part Cylinder primitive.

        Args:
            radius: Cylinder radius. Defaults to 5.0.
            height: Cylinder height. Defaults to 10.0.
            angle: Sweep angle in degrees (for partial cylinder). Defaults to 360.
            name: Object name. Auto-generated if None.
            doc_name: Target document. Uses active document if None.

        Returns:
            Dictionary with created object information:
                - name: Object name
                - label: Object label
                - type_id: Object type
create_sphere tool
Create a Part Sphere primitive.

        Args:
            radius: Sphere radius. Defaults to 5.0.
            name: Object name. Auto-generated if None.
            doc_name: Target document. Uses active document if None.

        Returns:
            Dictionary with created object information:
                - name: Object name
                - label: Object label
                - type_id: Object type
create_cone tool
Create a Part Cone primitive.

        Args:
            radius1: Bottom radius. Defaults to 5.0.
            radius2: Top radius (0 for pointed cone). Defaults to 0.0.
            height: Cone height. Defaults to 10.0.
            angle: Sweep angle in degrees (for partial cone). Defaults to 360.
            name: Object name. Auto-generated if None.
            doc_name: Target document. Uses active document if None.

        Returns:
            Dictionary with created object information:
                - name: Object name
                - label: Object label
                - type_id: Object type
create_torus tool
Create a Part Torus (donut shape) primitive.

        Args:
            radius1: Major radius (center to tube center). Defaults to 10.0.
            radius2: Minor radius (tube radius). Defaults to 2.0.
            angle1: Start angle for tube sweep. Defaults to -180.
            angle2: End angle for tube sweep. Defaults to 180.
            angle3: Rotation angle around axis. Defaults to 360.
            name: Object name. Auto-generated if None.
            doc_name: Target document. Uses active document if None.

        Returns:
            Dictionary with created object information:
                - name: Object name
                - label: Object label
                - type_id: Object type
create_wedge tool
Create a Part Wedge primitive.

        A wedge is a tapered box shape useful for ramps and similar geometry.

        Args:
            xmin: Minimum X at base. Defaults to 0.0.
            ymin: Minimum Y (base position). Defaults to 0.0.
            zmin: Minimum Z at base. Defaults to 0.0.
            x2min: Minimum X at top. Defaults to 2.0.
            z2min: Minimum Z at top. Defaults to 2.0.
            xmax: Maximum X at base. Defaults to 10.0.
            ymax: Maximum Y (top position). Defaults to 10.0.
            zmax: Maximum Z at base. Defaults to 10.0.
            x2max: Maximum X at top. Defaults to 8.0.
            z2max: Maximum Z at top. Defaults to 8.0.
            name: Object name. Auto-generated if None.
            doc_name: Target document. Uses active document if None.

        Returns:
            Dictionary with created object information:
                - name: Object name
                - label: Object label
                - type_id: Object type
create_helix tool
Create a Part Helix curve.

        A helix is a spiral curve, useful as a sweep path for threads and springs.

        Args:
            pitch: Distance between turns. Defaults to 5.0.
            height: Total helix height. Defaults to 20.0.
            radius: Helix radius. Defaults to 5.0.
            angle: Taper angle in degrees. Defaults to 0.0.
            left_handed: Whether helix is left-handed. Defaults to False.
            name: Object name. Auto-generated if None.
            doc_name: Target document. Uses active document if None.

        Returns:
            Dictionary with created object information:
                - name: Object name
                - label: Object label
                - type_id: Object type
edit_object tool
Edit properties of an existing FreeCAD object.

        Args:
            object_name: Name of the object to edit.
            properties: Dictionary of property names and new values.
            doc_name: Document containing the object. Uses active document if None.

        Returns:
            Dictionary with updated object information:
                - name: Object name
                - label: Object label
                - type_id: Object type
delete_object tool
Delete an object from a FreeCAD document.

        Args:
            object_name: Name of the object to delete.
            doc_name: Document containing the object. Uses active document if None.

        Returns:
            Dictionary with delete result:
                - success: Whether delete was successful
boolean_operation tool
Perform a boolean operation on two FreeCAD objects.

        Args:
            operation: Boolean operation type: "fuse" (union), "cut" (subtract),
                      or "common" (intersection).
            object1_name: Name of the first object.
            object2_name: Name of the second object.
            result_name: Name for the result object. Auto-generated if None.
            doc_name: Document containing the objects. Uses active document if None.

        Returns:
            Dictionary with result object information:
                - name: Result object name
                - label: Result object label
                - type_id: Result object type
set_placement tool
Set the placement (position and rotation) of a FreeCAD object.

        Args:
            object_name: Name of the object to move.
            position: Position as [x, y, z]. Keeps current if None.
            rotation: Rotation as [yaw, pitch, roll] in degrees. Keeps current if None.
            doc_name: Document containing the object. Uses active document if None.

        Returns:
            Dictionary with new placement:
                - position: New position [x, y, z]
                - rotation: New rotation angles
scale_object tool
Scale an object uniformly or non-uniformly.

        Creates a new scaled copy using Part.Scale.

        Args:
            object_name: Name of the object to scale.
            scale: Scale factor. Can be:
                - A single float for uniform scaling
                - A list [sx, sy, sz] for non-uniform scaling
            result_name: Name for the result object. Auto-generated if None.
            doc_name: Document containing the object. Uses active document if None.

        Returns:
            Dictionary with result object information:
                - name: Result object name
                - label: Result object label
                - type_id: Result object type
rotate_object tool
Rotate an object around an axis.

        Modifies the object's placement in-place.

        Args:
            object_name: Name of the object to rotate.
            axis: Rotation axis as [x, y, z] vector.
            angle: Rotation angle in degrees.
            center: Center point for rotation [x, y, z].
                    Uses object center if None.
            doc_name: Document containing the object. Uses active document if None.

        Returns:
            Dictionary with new placement:
                - position: New position [x, y, z]
                - rotation: New rotation angles
copy_object tool
Create a copy of an object.

        Args:
            object_name: Name of the object to copy.
            new_name: Name for the copy. Auto-generated if None.
            offset: Position offset [x, y, z] for the copy. [0,0,0] if None.
            doc_name: Document containing the object. Uses active document if None.

        Returns:
            Dictionary with copy object information:
                - name: Copy object name
                - label: Copy object label
                - type_id: Copy object type
mirror_object tool
Mirror an object across a plane.

        Creates a new mirrored copy of the object.

        Args:
            object_name: Name of the object to mirror.
            plane: Mirror plane. Options: "XY", "XZ", "YZ".
            result_name: Name for the result object. Auto-generated if None.
            doc_name: Document containing the object. Uses active document if None.

        Returns:
            Dictionary with result object information:
                - name: Result object name
                - label: Result object label
                - type_id: Result object type
get_selection tool
Get the current selection in FreeCAD.

        Requires GUI mode.

        Args:
            doc_name: Document to check selection in. Uses active document if None.

        Returns:
            List of selected objects with:
                - name: Object name
                - label: Object label
                - type_id: Object type
                - sub_elements: List of selected sub-elements (e.g., ["Face1", "Edge2"])
set_selection tool
Set the selection in FreeCAD.

        Requires GUI mode.

        Args:
            object_names: List of object names to select.
            clear_existing: Whether to clear existing selection first. Defaults to True.
            doc_name: Document containing the objects. Uses active document if None.

        Returns:
            Dictionary with result:
                - success: Whether operation was successful
                - selected_count: Number of objects selected
clear_selection tool
Clear the current selection in FreeCAD.

        Requires GUI mode.

        Returns:
            Dictionary with result:
                - success: Whether operation was successful
create_line tool
Create a Part Line (edge) between two points.

        Args:
            point1: Start point as [x, y, z].
            point2: End point as [x, y, z].
            name: Object name. Auto-generated if None.
            doc_name: Target document. Uses active document if None.

        Returns:
            Dictionary with created object information:
                - name: Object name
                - label: Object label
                - type_id: Object type
                - length: Line length
create_plane tool
Create a Part Plane (flat rectangular face).

        Args:
            length: Plane length (X direction). Defaults to 10.0.
            width: Plane width (Y direction). Defaults to 10.0.
            name: Object name. Auto-generated if None.
            doc_name: Target document. Uses active document if None.

        Returns:
            Dictionary with created object information:
                - name: Object name
                - label: Object label
                - type_id: Object type
create_ellipse tool
Create a Part Ellipse curve.

        Args:
            major_radius: Semi-major axis radius. Defaults to 10.0.
            minor_radius: Semi-minor axis radius. Defaults to 5.0.
            angle1: Start angle in degrees. Defaults to 0.
            angle2: End angle in degrees. Defaults to 360.
            name: Object name. Auto-generated if None.
            doc_name: Target document. Uses active document if None.

        Returns:
            Dictionary with created object information:
                - name: Object name
                - label: Object label
                - type_id: Object type
create_prism tool
Create a Part Prism (extruded regular polygon).

        Args:
            polygon_sides: Number of sides (3 for triangle, 6 for hexagon, etc.).
                           Defaults to 6.
            circumradius: Radius of circumscribed circle. Defaults to 5.0.
            height: Prism height. Defaults to 10.0.
            name: Object name. Auto-generated if None.
            doc_name: Target document. Uses active document if None.

        Returns:
            Dictionary with created object information:
                - name: Object name
                - label: Object label
                - type_id: Object type
create_regular_polygon tool
Create a Part Regular Polygon (2D wire).

        Args:
            polygon_sides: Number of sides (3 for triangle, 6 for hexagon, etc.).
                           Defaults to 6.
            circumradius: Radius of circumscribed circle. Defaults to 5.0.
            name: Object name. Auto-generated if None.
            doc_name: Target document. Uses active document if None.

        Returns:
            Dictionary with created object information:
                - name: Object name
                - label: Object label
                - type_id: Object type
shell_object tool
Create a shell (hollow) version of a solid by removing faces.

        Also known as "thickness" operation. Removes specified faces and
        offsets the remaining faces to create a hollow shell.

        Args:
            object_name: Name of the solid object to shell.
            thickness: Wall thickness (positive = outward, negative = inward).
            faces_to_remove: List of face names to remove (e.g., ["Face1", "Face6"]).
                            If None, tries to remove the largest face.
            result_name: Name for result object. Auto-generated if None.
            doc_name: Document containing the object. Uses active document if None.

        Returns:
            Dictionary with result object information:
                - name: Result object name
                - label: Result object label
                - type_id: Result object type
offset_3d tool
Create a 3D offset of a shape.

        Offsets all faces of the shape by the specified distance.

        Args:
            object_name: Name of the object to offset.
            offset: Offset distance (positive = outward, negative = inward).
            result_name: Name for result object. Auto-generated if None.
            doc_name: Document containing the object. Uses active document if None.

        Returns:
            Dictionary with result object information:
                - name: Result object name
                - label: Result object label
                - type_id: Result object type
slice_shape tool
Slice a shape with a plane, returning the cross-section.

        Args:
            object_name: Name of the object to slice.
            plane_point: A point on the cutting plane [x, y, z].
            plane_normal: Normal vector of the cutting plane [x, y, z].
            result_name: Name for result object. Auto-generated if None.
            doc_name: Document containing the object. Uses active document if None.

        Returns:
            Dictionary with result object information:
                - name: Result object name
                - label: Result object label
                - type_id: Result object type
section_shape tool
Create a cross-section of a shape at a standard plane.

        Args:
            object_name: Name of the object to section.
            plane: Section plane: "XY", "XZ", or "YZ". Defaults to "XY".
            offset: Offset from origin along the plane normal. Defaults to 0.
            result_name: Name for result object. Auto-generated if None.
            doc_name: Document containing the object. Uses active document if None.

        Returns:
            Dictionary with result object information:
                - name: Result object name
                - label: Result object label
                - type_id: Result object type
make_compound tool
Combine multiple shapes into a single compound.

        A compound is a collection of shapes that can be manipulated together
        but are not fused (each shape remains separate).

        Args:
            object_names: List of object names to combine.
            result_name: Name for result object. Auto-generated if None.
            doc_name: Document containing the objects. Uses active document if None.

        Returns:
            Dictionary with result object information:
                - name: Result object name
                - label: Result object label
                - type_id: Result object type
                - shape_count: Number of shapes in compound
explode_compound tool
Separate a compound into individual shape objects.

        Args:
            object_name: Name of the compound object to explode.
            doc_name: Document containing the object. Uses active document if None.

        Returns:
            Dictionary with result:
                - success: Whether operation succeeded
                - created_objects: List of created object names
fuse_all tool
Fuse (union) multiple shapes into a single solid.

        Unlike boolean_operation which works on two objects at a time,
        this fuses all specified objects at once.

        Args:
            object_names: List of object names to fuse.
            result_name: Name for result object. Auto-generated if None.
            doc_name: Document containing the objects. Uses active document if None.

        Returns:
            Dictionary with result object information:
                - name: Result object name
                - label: Result object label
                - type_id: Result object type
common_all tool
Find the common (intersection) of multiple shapes.

        Args:
            object_names: List of object names to intersect.
            result_name: Name for result object. Auto-generated if None.
            doc_name: Document containing the objects. Uses active document if None.

        Returns:
            Dictionary with result object information:
                - name: Result object name
                - label: Result object label
                - type_id: Result object type
make_wire tool
Create a wire (polyline) from a list of points.

        Args:
            points: List of points, each as [x, y, z].
            closed: Whether to close the wire. Defaults to False.
            name: Object name. Auto-generated if None.
            doc_name: Target document. Uses active document if None.

        Returns:
            Dictionary with created object information:
                - name: Object name
                - label: Object label
                - type_id: Object type
                - length: Wire length
make_face tool
Create a face from a closed wire.

        Args:
            object_name: Name of the wire object.
            result_name: Name for result object. Auto-generated if None.
            doc_name: Document containing the object. Uses active document if None.

        Returns:
            Dictionary with result object information:
                - name: Result object name
                - label: Result object label
                - type_id: Result object type
                - area: Face area
extrude_shape tool
Extrude a wire or face along a direction vector.

        Args:
            object_name: Name of the wire or face object to extrude.
            direction: Extrusion direction and length as [x, y, z].
            result_name: Name for result object. Auto-generated if None.
            doc_name: Document containing the object. Uses active document if None.

        Returns:
            Dictionary with result object information:
                - name: Result object name
                - label: Result object label
                - type_id: Result object type
revolve_shape tool
Revolve a wire or face around an axis.

        Args:
            object_name: Name of the wire or face object to revolve.
            axis_point: A point on the rotation axis [x, y, z].
            axis_direction: Direction of the rotation axis [x, y, z].
            angle: Revolution angle in degrees. Defaults to 360.
            result_name: Name for result object. Auto-generated if None.
            doc_name: Document containing the object. Uses active document if None.

        Returns:
            Dictionary with result object information:
                - name: Result object name
                - label: Result object label
                - type_id: Result object type
part_loft tool
Create a loft (transition shape) between multiple profiles.

        This is the Part workbench version of loft, working directly on
        wires/faces rather than PartDesign sketches.

        Args:
            profile_names: List of wire/face object names to loft through (in order).
            solid: Whether to create a solid (True) or shell (False). Defaults to True.
            ruled: Whether to create ruled surfaces. Defaults to False.
            closed: Whether to close the loft (connect last to first). Defaults to False.
            result_name: Name for result object. Auto-generated if None.
            doc_name: Document containing the profiles. Uses active document if None.

        Returns:
            Dictionary with result object information:
                - name: Result object name
                - label: Result object label
                - type_id: Result object type
part_sweep tool
Sweep a profile along a spine path.

        This is the Part workbench version of sweep, working directly on
        wires/faces rather than PartDesign sketches.

        Args:
            profile_name: Name of the profile wire/face object.
            spine_name: Name of the spine (path) wire object.
            solid: Whether to create a solid. Defaults to True.
            frenet: Whether to use Frenet mode for orientation. Defaults to True.
            result_name: Name for result object. Auto-generated if None.
            doc_name: Document containing the objects. Uses active document if None.

        Returns:
            Dictionary with result object information:
                - name: Result object name
                - label: Result object label
                - type_id: Result object type
create_partdesign_body tool
Create a new PartDesign Body.

        A PartDesign Body is a container for feature-based modeling that
        maintains a single solid shape through a sequence of operations.

        Args:
            name: Body name. Auto-generated if None.
            doc_name: Target document. Uses active document if None.

        Returns:
            Dictionary with created body information:
                - name: Body name
                - label: Body label
                - type_id: Object type
create_sketch tool
Create a new Sketch attached to a plane or body.

        Args:
            body_name: Name of PartDesign Body to attach to. Creates standalone if None.
            plane: Plane to attach sketch to. Options:
                - "XY_Plane" - Horizontal plane
                - "XZ_Plane" - Front vertical plane
                - "YZ_Plane" - Side vertical plane
                - Face name like "Face1" to attach to body face
            name: Sketch name. Auto-generated if None.
            doc_name: Target document. Uses active document if None.

        Returns:
            Dictionary with created sketch information:
                - name: Sketch name
                - label: Sketch label
                - type_id: Object type
                - support: What the sketch is attached to
add_sketch_rectangle tool
Add a rectangle to a sketch.

        Args:
            sketch_name: Name of the sketch to add rectangle to.
            x: X coordinate of bottom-left corner.
            y: Y coordinate of bottom-left corner.
            width: Rectangle width.
            height: Rectangle height.
            doc_name: Document containing the sketch. Uses active document if None.

        Returns:
            Dictionary with geometry info:
                - constraint_count: Number of constraints in sketch
                - geometry_count: Number of geometry elements
add_sketch_circle tool
Add a circle to a sketch.

        Args:
            sketch_name: Name of the sketch to add circle to.
            center_x: X coordinate of center.
            center_y: Y coordinate of center.
            radius: Circle radius.
            doc_name: Document containing the sketch. Uses active document if None.

        Returns:
            Dictionary with geometry info:
                - geometry_index: Index of the added circle
                - geometry_count: Total geometry elements
pad_sketch tool
Create a Pad (extrusion) from a sketch.

        Args:
            sketch_name: Name of the sketch to pad.
            length: Pad length (extrusion distance).
            symmetric: Whether to extrude symmetrically. Defaults to False.
            reversed: Whether to reverse direction. Defaults to False.
            name: Pad feature name. Auto-generated if None.
            doc_name: Document containing the sketch. Uses active document if None.

        Returns:
            Dictionary with created pad information:
                - name: Pad name
                - label: Pad label
                - type_id: Object type
pocket_sketch tool
Create a Pocket (cut extrusion) from a sketch.

        Args:
            sketch_name: Name of the sketch to pocket.
            length: Pocket depth.
            type: Pocket type: "Length", "ThroughAll", "UpToFirst", "UpToFace".
                When the Midplane fallback is used, symmetric pockets support
                only "Length" and "ThroughAll"; other termination modes are
                rejected because FreeCAD ignores Midplane for them.
            name: Pocket feature name. Auto-generated if None.
            doc_name: Document containing the sketch. Uses active document if None.
            reversed: Flip the cut direction. Use True when the default
                direction points away from the material and removes nothing.
                Defaults to False.
            symmetric: Distribute the cut equally on both sides of the sketch
                plane. Uses the SideType property when available, falling back
                to Midplane or Symmetric on older FreeCAD versions. Defaults
                to False. Kept last so existing positional calls keep working.

        Returns:
            Dictionary with created pocket information:
                - name: Pocket name
                - label: Pocket label
                - type_id: Object type
                - volume_before: Body volume before the pocket
                - volume_after: Body volume after the pocket
                - volume_removed: Material removed (volume_before - volume_after)
                - warning: Present only when the pocket removed no material, so a
                    caller can tell a no-op cut from a real one
fillet_edges tool
Add fillet (rounded edges) to an object.

        Args:
            object_name: Name of the object to fillet.
            radius: Fillet radius.
            edges: List of edge names to fillet (e.g., ["Edge1", "Edge2"]).
                   Fillets all edges if None.
            name: Fillet feature name. Auto-generated if None.
            doc_name: Document containing the object. Uses active document if None.

        Returns:
            Dictionary with created fillet information:
                - name: Fillet name
                - label: Fillet label
                - type_id: Object type
chamfer_edges tool
Add chamfer (beveled edges) to an object.

        Args:
            object_name: Name of the object to chamfer.
            size: Chamfer size.
            edges: List of edge names to chamfer (e.g., ["Edge1", "Edge2"]).
                   Chamfers all edges if None.
            name: Chamfer feature name. Auto-generated if None.
            doc_name: Document containing the object. Uses active document if None.

        Returns:
            Dictionary with created chamfer information:
                - name: Chamfer name
                - label: Chamfer label
                - type_id: Object type
revolution_sketch tool
Create a Revolution (rotational extrusion) from a sketch.

        Revolves the sketch profile around an axis to create a solid of revolution.

        Args:
            sketch_name: Name of the sketch to revolve.
            angle: Revolution angle in degrees. Defaults to 360.
            axis: Axis to revolve around. Options:
                - "Base_X" - X axis
                - "Base_Y" - Y axis
                - "Base_Z" - Z axis
                - "Sketch_V" - Sketch vertical axis
                - "Sketch_H" - Sketch horizontal axis
            symmetric: Whether to revolve symmetrically. Defaults to False.
            reversed: Whether to reverse direction. Defaults to False.
            name: Revolution feature name. Auto-generated if None.
            doc_name: Document containing the sketch. Uses active document if None.

        Returns:
            Dictionary with created revolution information:
                - name: Revolution name
                - label: Revolution label
                - type_id: Object type
groove_sketch tool
Create a Groove (subtractive revolution) from a sketch.

        Revolves a sketch profile and subtracts it from existing material.

        Args:
            sketch_name: Name of the sketch to revolve.
            angle: Groove angle in degrees. Defaults to 360.
            axis: Axis to revolve around. Options:
                - "Base_X" - X axis
                - "Base_Y" - Y axis
                - "Base_Z" - Z axis
                - "Sketch_V" - Sketch vertical axis
                - "Sketch_H" - Sketch horizontal axis
            symmetric: Whether to revolve symmetrically. Defaults to False.
            reversed: Whether to reverse direction. Defaults to False.
            name: Groove feature name. Auto-generated if None.
            doc_name: Document containing the sketch. Uses active document if None.

        Returns:
            Dictionary with created groove information:
                - name: Groove name
                - label: Groove label
                - type_id: Object type
create_hole tool
Create a Hole feature from a sketch containing point(s).

        Creates parametric holes with optional threading. The sketch should
        contain points defining hole center locations.

        Args:
            sketch_name: Name of the sketch with hole center point(s).
            diameter: Hole diameter (for non-threaded). Defaults to 6.0.
            depth: Hole depth. Defaults to 10.0.
            hole_type: Hole depth type. Options:
                - "Dimension" - Specific depth
                - "ThroughAll" - Through entire part
                - "UpToFirst" - Up to first face
            threaded: Whether hole is threaded. Defaults to False.
            thread_type: Thread standard. Options: "ISO", "UNC", "UNF".
            thread_size: Thread size (e.g., "M6", "M8", "#10", "1/4").
            name: Hole feature name. Auto-generated if None.
            doc_name: Document containing the sketch. Uses active document if None.

        Returns:
            Dictionary with created hole information:
                - name: Hole name
                - label: Hole label
                - type_id: Object type
linear_pattern tool
Create a Linear Pattern from a PartDesign feature.

        Repeats a feature in a linear direction.

        Args:
            feature_name: Name of the feature to pattern.
            direction: Pattern direction. Options: "X", "Y", "Z".
            length: Total pattern length. Defaults to 50.0.
            occurrences: Number of pattern instances. Defaults to 3.
            name: Pattern feature name. Auto-generated if None.
            doc_name: Document containing the feature. Uses active document if None.

        Returns:
            Dictionary with created pattern information:
                - name: Pattern name
                - label: Pattern label
                - type_id: Object type
polar_pattern tool
Create a Polar (circular) Pattern from a PartDesign feature.

        Repeats a feature around an axis.

        Args:
            feature_name: Name of the feature to pattern.
            axis: Pattern axis. Options: "X", "Y", "Z".
            angle: Total pattern angle. Defaults to 360.0.
            occurrences: Number of pattern instances. Defaults to 6.
            name: Pattern feature name. Auto-generated if None.
            doc_name: Document containing the feature. Uses active document if None.

        Returns:
            Dictionary with created pattern information:
                - name: Pattern name
                - label: Pattern label
                - type_id: Object type
mirrored_feature tool
Create a Mirrored feature from a PartDesign feature.

        Mirrors a feature across a plane.

        Args:
            feature_name: Name of the feature to mirror.
            plane: Mirror plane. Options: "XY", "XZ", "YZ".
            name: Mirrored feature name. Auto-generated if None.
            doc_name: Document containing the feature. Uses active document if None.

        Returns:
            Dictionary with created mirror information:
                - name: Mirror name
                - label: Mirror label
                - type_id: Object type
add_sketch_line tool
Add a line to a sketch.

        Args:
            sketch_name: Name of the sketch to add line to.
            x1: X coordinate of start point.
            y1: Y coordinate of start point.
            x2: X coordinate of end point.
            y2: Y coordinate of end point.
            construction: Whether this is a construction line. Defaults to False.
            doc_name: Document containing the sketch. Uses active document if None.

        Returns:
            Dictionary with geometry info:
                - geometry_index: Index of the added line
                - geometry_count: Total geometry elements
add_sketch_arc tool
Add an arc to a sketch.

        Args:
            sketch_name: Name of the sketch to add arc to.
            center_x: X coordinate of center.
            center_y: Y coordinate of center.
            radius: Arc radius.
            start_angle: Start angle in degrees.
            end_angle: End angle in degrees.
            doc_name: Document containing the sketch. Uses active document if None.

        Returns:
            Dictionary with geometry info:
                - geometry_index: Index of the added arc
                - geometry_count: Total geometry elements
add_sketch_point tool
Add a point to a sketch.

        Points are useful for defining hole centers and reference locations.

        Args:
            sketch_name: Name of the sketch to add point to.
            x: X coordinate.
            y: Y coordinate.
            doc_name: Document containing the sketch. Uses active document if None.

        Returns:
            Dictionary with geometry info:
                - geometry_index: Index of the added point
                - geometry_count: Total geometry elements
loft_sketches tool
Create a Loft (additive) through multiple sketches.

        A loft creates a solid by connecting multiple profile sketches.

        Args:
            sketch_names: List of sketch names to loft through (in order).
            ruled: Whether to create ruled surfaces. Defaults to False.
            closed: Whether to close the loft. Defaults to False.
            name: Loft feature name. Auto-generated if None.
            doc_name: Document containing the sketches. Uses active document if None.

        Returns:
            Dictionary with created loft information:
                - name: Loft name
                - label: Loft label
                - type_id: Object type
sweep_sketch tool
Create a Sweep (additive) along a spine path.

        A sweep extrudes a profile sketch along a path defined by another sketch.

        Args:
            profile_sketch: Name of the profile sketch to sweep.
            spine_sketch: Name of the spine (path) sketch.
            transition: Transition mode. Options:
                - "Transformed" - Smooth transitions
                - "Right" - Sharp corners
                - "Round" - Rounded corners
            name: Sweep feature name. Auto-generated if None.
            doc_name: Document containing the sketches. Uses active document if None.

        Returns:
            Dictionary with created sweep information:
                - name: Sweep name
                - label: Sweep label
                - type_id: Object type
create_datum_plane tool
Create a datum plane in a PartDesign body.

        Datum planes are reference planes used for sketching or measurements.

        Args:
            body_name: Name of the PartDesign body.
            offset: Offset distance from base plane. Defaults to 0.
            base_plane: Base plane to offset from. Options:
                - "XY_Plane" - Horizontal plane
                - "XZ_Plane" - Front vertical plane
                - "YZ_Plane" - Side vertical plane
            name: Datum plane name. Auto-generated if None.
            doc_name: Document containing the body. Uses active document if None.

        Returns:
            Dictionary with created datum information:
                - name: Datum name
                - label: Datum label
                - type_id: Object type
create_datum_line tool
Create a datum line (axis) in a PartDesign body.

        Datum lines are reference axes used for patterns or measurements.

        Args:
            body_name: Name of the PartDesign body.
            base_axis: Base axis. Options: "X_Axis", "Y_Axis", "Z_Axis".
            name: Datum line name. Auto-generated if None.
            doc_name: Document containing the body. Uses active document if None.

        Returns:
            Dictionary with created datum information:
                - name: Datum name
                - label: Datum label
                - type_id: Object type
create_datum_point tool
Create a datum point in a PartDesign body.

        Datum points are reference points used for measurements or construction.

        Args:
            body_name: Name of the PartDesign body.
            position: Point position [x, y, z]. Uses origin if None.
            name: Datum point name. Auto-generated if None.
            doc_name: Document containing the body. Uses active document if None.

        Returns:
            Dictionary with created datum information:
                - name: Datum name
                - label: Datum label
                - type_id: Object type
draft_feature tool
Add draft angle to faces of an object.

        Draft angles are used in manufacturing to allow parts to be
        released from molds.

        Args:
            object_name: Name of the object to draft.
            angle: Draft angle in degrees.
            plane: Neutral plane for draft direction: "XY", "XZ", "YZ".
            faces: List of face names to draft (e.g., ["Face1", "Face2"]).
                   Drafts all suitable faces if None.
            name: Draft feature name. Auto-generated if None.
            doc_name: Document containing the object. Uses active document if None.

        Returns:
            Dictionary with created draft information:
                - name: Draft name
                - label: Draft label
                - type_id: Object type
thickness_feature tool
Create a thickness (shell) feature in PartDesign.

        Hollows out a solid by removing specified faces and offsetting
        the remaining faces.

        Args:
            object_name: Name of the solid feature to shell.
            thickness: Wall thickness (positive = inward).
            faces_to_remove: List of face names to remove (e.g., ["Face1"]).
            name: Thickness feature name. Auto-generated if None.
            doc_name: Document containing the object. Uses active document if None.

        Returns:
            Dictionary with created thickness information:
                - name: Thickness name
                - label: Thickness label
                - type_id: Object type
subtractive_loft tool
Create a subtractive loft (cut) through multiple sketches.

        Args:
            sketch_names: List of sketch names to loft through (in order).
            ruled: Whether to create ruled surfaces. Defaults to False.
            closed: Whether to close the loft. Defaults to False.
            name: Loft feature name. Auto-generated if None.
            doc_name: Document containing the sketches. Uses active document if None.

        Returns:
            Dictionary with created loft information:
                - name: Loft name
                - label: Loft label
                - type_id: Object type
subtractive_pipe tool
Create a subtractive pipe (sweep cut) along a spine path.

        Args:
            profile_sketch: Name of the profile sketch to sweep.
            spine_sketch: Name of the spine (path) sketch.
            transition: Transition mode. Options:
                - "Transformed" - Smooth transitions
                - "Right" - Sharp corners
                - "Round" - Rounded corners
            name: Pipe feature name. Auto-generated if None.
            doc_name: Document containing the sketches. Uses active document if None.

        Returns:
            Dictionary with created pipe information:
                - name: Pipe name
                - label: Pipe label
                - type_id: Object type
add_sketch_ellipse tool
Add an ellipse to a sketch.

        Args:
            sketch_name: Name of the sketch to add ellipse to.
            center_x: X coordinate of center.
            center_y: Y coordinate of center.
            major_radius: Semi-major axis radius.
            minor_radius: Semi-minor axis radius.
            doc_name: Document containing the sketch. Uses active document if None.

        Returns:
            Dictionary with geometry info:
                - geometry_index: Index of the added ellipse
                - geometry_count: Total geometry elements
add_sketch_polygon tool
Add a regular polygon to a sketch.

        Args:
            sketch_name: Name of the sketch to add polygon to.
            center_x: X coordinate of center.
            center_y: Y coordinate of center.
            radius: Circumscribed circle radius.
            sides: Number of sides (3 for triangle, 6 for hexagon, etc.).
            doc_name: Document containing the sketch. Uses active document if None.

        Returns:
            Dictionary with geometry info:
                - first_line_index: Index of the first line
                - geometry_count: Total geometry elements
add_sketch_slot tool
Add a slot (obround/stadium shape) to a sketch.

        A slot is two semicircles connected by parallel lines.

        Args:
            sketch_name: Name of the sketch to add slot to.
            center1_x: X coordinate of first arc center.
            center1_y: Y coordinate of first arc center.
            center2_x: X coordinate of second arc center.
            center2_y: Y coordinate of second arc center.
            radius: Radius of the semicircular ends.
            doc_name: Document containing the sketch. Uses active document if None.

        Returns:
            Dictionary with geometry info:
                - first_geometry_index: Index of first geometry element
                - geometry_count: Total geometry elements
add_sketch_bspline tool
Add a B-spline curve to a sketch.

        Args:
            sketch_name: Name of the sketch to add B-spline to.
            points: List of control points, each as [x, y].
            closed: Whether to close the spline. Defaults to False.
            doc_name: Document containing the sketch. Uses active document if None.

        Returns:
            Dictionary with geometry info:
                - geometry_index: Index of the added B-spline
                - geometry_count: Total geometry elements
add_sketch_constraint tool
Add a constraint to a sketch.

        This is a general-purpose constraint tool. For common constraints,
        use the specific constraint tools (constrain_horizontal, etc.).

        Args:
            sketch_name: Name of the sketch.
            constraint_type: Type of constraint. Options:
                - Geometric: "Coincident", "Horizontal", "Vertical", "Parallel",
                  "Perpendicular", "Tangent", "Equal", "Symmetric", "Block"
                - Dimensional: "Distance", "DistanceX", "DistanceY", "Radius",
                  "Diameter", "Angle"
            geometry1: Index of first geometry element.
            point1: Point index on first geometry (1=start, 2=end, 3=center).
                    Use -1 for edge itself.
            geometry2: Index of second geometry element. Use -2 for external.
            point2: Point index on second geometry.
            value: Value for dimensional constraints (distance, angle, etc.).
            doc_name: Document containing the sketch. Uses active document if None.

        Returns:
            Dictionary with constraint info:
                - constraint_index: Index of the added constraint
                - constraint_count: Total constraint count
constrain_horizontal tool
Constrain a line to be horizontal.

        Args:
            sketch_name: Name of the sketch.
            geometry_index: Index of the line geometry.
            doc_name: Document containing the sketch. Uses active document if None.

        Returns:
            Dictionary with constraint info:
                - constraint_index: Index of the added constraint
constrain_vertical tool
Constrain a line to be vertical.

        Args:
            sketch_name: Name of the sketch.
            geometry_index: Index of the line geometry.
            doc_name: Document containing the sketch. Uses active document if None.

        Returns:
            Dictionary with constraint info:
                - constraint_index: Index of the added constraint
constrain_coincident tool
Constrain two points to be coincident (same location).

        Args:
            sketch_name: Name of the sketch.
            geometry1: Index of first geometry element.
            point1: Point on first geometry (1=start, 2=end, 3=center).
            geometry2: Index of second geometry element.
            point2: Point on second geometry.
            doc_name: Document containing the sketch. Uses active document if None.

        Returns:
            Dictionary with constraint info:
                - constraint_index: Index of the added constraint
constrain_parallel tool
Constrain two lines to be parallel.

        Args:
            sketch_name: Name of the sketch.
            geometry1: Index of first line.
            geometry2: Index of second line.
            doc_name: Document containing the sketch. Uses active document if None.

        Returns:
            Dictionary with constraint info:
                - constraint_index: Index of the added constraint
constrain_perpendicular tool
Constrain two lines to be perpendicular.

        Args:
            sketch_name: Name of the sketch.
            geometry1: Index of first line.
            geometry2: Index of second line.
            doc_name: Document containing the sketch. Uses active document if None.

        Returns:
            Dictionary with constraint info:
                - constraint_index: Index of the added constraint
constrain_tangent tool
Constrain two curves to be tangent.

        Args:
            sketch_name: Name of the sketch.
            geometry1: Index of first curve.
            geometry2: Index of second curve.
            doc_name: Document containing the sketch. Uses active document if None.

        Returns:
            Dictionary with constraint info:
                - constraint_index: Index of the added constraint
constrain_equal tool
Constrain two elements to have equal size (length or radius).

        Args:
            sketch_name: Name of the sketch.
            geometry1: Index of first element.
            geometry2: Index of second element.
            doc_name: Document containing the sketch. Uses active document if None.

        Returns:
            Dictionary with constraint info:
                - constraint_index: Index of the added constraint
constrain_distance tool
Add a distance constraint.

        Can constrain:
        - Line length (geometry1 only)
        - Point to point distance (geometry1+point1, geometry2+point2)
        - Point to line distance (geometry1+point1, geometry2 as line)

        Args:
            sketch_name: Name of the sketch.
            geometry1: Index of first geometry element.
            distance: The distance value.
            point1: Point on first geometry (1=start, 2=end). -1 for line length.
            geometry2: Index of second geometry element. -2 if not used.
            point2: Point on second geometry.
            doc_name: Document containing the sketch. Uses active document if None.

        Returns:
            Dictionary with constraint info:
                - constraint_index: Index of the added constraint
constrain_distance_x tool
Constrain horizontal distance from origin or between points.

        Args:
            sketch_name: Name of the sketch.
            geometry: Index of geometry element.
            point: Point index (1=start, 2=end, 3=center).
            distance: The horizontal distance value.
            doc_name: Document containing the sketch. Uses active document if None.

        Returns:
            Dictionary with constraint info:
                - constraint_index: Index of the added constraint
constrain_distance_y tool
Constrain vertical distance from origin or between points.

        Args:
            sketch_name: Name of the sketch.
            geometry: Index of geometry element.
            point: Point index (1=start, 2=end, 3=center).
            distance: The vertical distance value.
            doc_name: Document containing the sketch. Uses active document if None.

        Returns:
            Dictionary with constraint info:
                - constraint_index: Index of the added constraint
constrain_radius tool
Constrain the radius of a circle or arc.

        Args:
            sketch_name: Name of the sketch.
            geometry_index: Index of the circle/arc geometry.
            radius: The radius value.
            doc_name: Document containing the sketch. Uses active document if None.

        Returns:
            Dictionary with constraint info:
                - constraint_index: Index of the added constraint
constrain_angle tool
Constrain angle of a line or between two lines.

        Args:
            sketch_name: Name of the sketch.
            geometry1: Index of first line.
            angle: Angle in degrees.
            geometry2: Index of second line (-2 for angle from horizontal).
            doc_name: Document containing the sketch. Uses active document if None.

        Returns:
            Dictionary with constraint info:
                - constraint_index: Index of the added constraint
constrain_fix tool
Fix (lock) a point or geometry in place.

        Args:
            sketch_name: Name of the sketch.
            geometry_index: Index of the geometry element.
            point_index: Point to fix (1=start, 2=end, 3=center).
                        -1 to fix the entire element.
            doc_name: Document containing the sketch. Uses active document if None.

        Returns:
            Dictionary with constraint info:
                - constraint_index: Index of the added constraint
add_external_geometry tool
Add external geometry reference to a sketch.

        External geometry allows referencing edges/faces from other
        objects for construction and constraints.

        Args:
            sketch_name: Name of the sketch.
            object_name: Name of the object to reference.
            element: Element to reference (e.g., "Edge1", "Face1").
            doc_name: Document containing the sketch. Uses active document if None.

        Returns:
            Dictionary with result:
                - success: Whether the operation succeeded
                - external_geometry_count: Number of external geometry elements
delete_sketch_geometry tool
Delete a geometry element from a sketch.

        Args:
            sketch_name: Name of the sketch.
            geometry_index: Index of the geometry to delete.
            doc_name: Document containing the sketch. Uses active document if None.

        Returns:
            Dictionary with result:
                - success: Whether the deletion succeeded
                - geometry_count: Remaining geometry count
delete_sketch_constraint tool
Delete a constraint from a sketch.

        Args:
            sketch_name: Name of the sketch.
            constraint_index: Index of the constraint to delete.
            doc_name: Document containing the sketch. Uses active document if None.

        Returns:
            Dictionary with result:
                - success: Whether the deletion succeeded
                - constraint_count: Remaining constraint count
get_sketch_info tool
Get detailed information about a sketch.

        Args:
            sketch_name: Name of the sketch.
            doc_name: Document containing the sketch. Uses active document if None.

        Returns:
            Dictionary with sketch information:
                - name: Sketch name
                - geometry_count: Number of geometry elements
                - constraint_count: Number of constraints
                - external_geometry_count: Number of external geometry references
                - fully_constrained: Whether sketch is fully constrained
                - dof: Degrees of freedom remaining, or None if unavailable; may be
                  stale if the sketch has not been recomputed
                - state: FreeCAD object state flags, including any error state
toggle_construction tool
Toggle construction mode for a sketch geometry.

        Construction geometry is used for reference but not included
        in the final sketch profile.

        Args:
            sketch_name: Name of the sketch.
            geometry_index: Index of the geometry to toggle.
            doc_name: Document containing the sketch. Uses active document if None.

        Returns:
            Dictionary with result:
                - success: Whether the operation succeeded
                - is_construction: New construction state
spreadsheet_create tool
Create a new Spreadsheet object.

        Spreadsheets allow storing values and formulas that can be
        referenced by other objects in the document for parametric design.

        Args:
            name: Spreadsheet name. Auto-generated if None.
            doc_name: Target document. Uses active document if None.

        Returns:
            Dictionary with created spreadsheet information:
                - name: Spreadsheet object name
                - label: Spreadsheet label
                - type_id: Object type

        Raises:
            ValueError: If the bridge fails to create the spreadsheet.
            ValueError: If a spreadsheet with the same name already exists
                (FreeCAD will auto-rename).

        Example:
            Create a spreadsheet for parameters::

                result = await spreadsheet_create(name="Parameters")
                # Returns {"name": "Parameters", "label": "Parameters", ...}
spreadsheet_set_cell tool
Set the value of a cell in a spreadsheet.

        Values can be numbers, strings, or formulas. Formulas start with '='.

        Args:
            spreadsheet_name: Name of the spreadsheet object.
            cell: Cell address (e.g., "A1", "B2", "C10").
            value: Value to set. Can be:
                - Number (int or float)
                - String (text)
                - Formula starting with '=' (e.g., "=A1+B1", "=2*pi")
            doc_name: Document containing the spreadsheet. Uses active if None.

        Returns:
            Dictionary with result:
                - success: Whether the operation succeeded
                - cell: Cell address that was set
                - value: Value that was set
                - computed: Computed value (for formulas)

        Raises:
            ValueError: If no document is found.
            ValueError: If the spreadsheet object is not found.
            ValueError: If the object is not a spreadsheet.
            ValueError: If setting the cell value fails.

        Example:
            Set numeric values and formulas::

                await spreadsheet_set_cell("Params", "A1", 100)  # Number
                await spreadsheet_set_cell("Params", "A2", "=A1*2")  # Formula
                await spreadsheet_set_cell("Params", "B1", "Length")  # String
spreadsheet_get_cell tool
Get the value of a cell in a spreadsheet.

        Args:
            spreadsheet_name: Name of the spreadsheet object.
            cell: Cell address (e.g., "A1", "B2").
            doc_name: Document containing the spreadsheet. Uses active if None.

        Returns:
            Dictionary with cell information:
                - cell: Cell address
                - value: Raw value (formula if it's a formula)
                - computed: Computed/displayed value
                - alias: Cell alias if set, None otherwise

        Raises:
            ValueError: If no document is found.
            ValueError: If the spreadsheet object is not found.
            ValueError: If retrieving cell data fails.

        Example:
            Get a cell value::

                result = await spreadsheet_get_cell("Params", "A1")
                print(f"Value: {result['computed']}")
spreadsheet_set_alias tool
Set an alias for a cell in a spreadsheet.

        Aliases allow referencing cell values by name instead of cell address.
        This is the key to parametric design - set an alias like "Length"
        and then reference it in object properties as "Spreadsheet.Length".

        Args:
            spreadsheet_name: Name of the spreadsheet object.
            cell: Cell address (e.g., "A1").
            alias: Alias name (e.g., "Length", "Width"). Must be a valid
                Python identifier (no spaces, starts with letter).
            doc_name: Document containing the spreadsheet. Uses active if None.

        Returns:
            Dictionary with result:
                - success: Whether the operation succeeded
                - cell: Cell address
                - alias: Alias that was set

        Raises:
            ValueError: If no document is found.
            ValueError: If the spreadsheet object is not found.
            ValueError: If the alias is not a valid Python identifier.
            ValueError: If setting the alias fails.

        Example:
            Set aliases for parametric dimensions::

                await spreadsheet_set_alias("Params", "A1", "BoxLength")
                await spreadsheet_set_alias("Params", "A2", "BoxWidth")
                # Now use Params.BoxLength in expressions
spreadsheet_get_aliases tool
Get all aliases defined in a spreadsheet.

        Args:
            spreadsheet_name: Name of the spreadsheet object.
            doc_name: Document containing the spreadsheet. Uses active if None.

        Returns:
            Dictionary with aliases:
                - spreadsheet: Spreadsheet name
                - aliases: Dictionary mapping alias names to cell addresses
                - count: Number of aliases

        Raises:
            ValueError: If no document is found.
            ValueError: If the spreadsheet object is not found.
            ValueError: If retrieving aliases fails.

        Example:
            List all parameter aliases::

                result = await spreadsheet_get_aliases("Params")
                for alias, cell in result["aliases"].items():
                    print(f"{alias} -> {cell}")
spreadsheet_clear_cell tool
Clear a cell in a spreadsheet.

        This removes the cell's content and any alias.

        Args:
            spreadsheet_name: Name of the spreadsheet object.
            cell: Cell address to clear (e.g., "A1").
            doc_name: Document containing the spreadsheet. Uses active if None.

        Returns:
            Dictionary with result:
                - success: Whether the operation succeeded
                - cell: Cell address that was cleared

        Raises:
            ValueError: If no document is found.
            ValueError: If the spreadsheet object is not found.
            ValueError: If clearing the cell fails.

        Example:
            Clear a cell::

                await spreadsheet_clear_cell("Params", "A1")
spreadsheet_bind_property tool
Bind an object property to a spreadsheet cell using expressions.

        This creates a parametric link where the object property is
        driven by the spreadsheet cell value. When the spreadsheet
        value changes, the object updates automatically.

        Args:
            spreadsheet_name: Name of the spreadsheet object.
            alias: Cell alias to bind (the cell must have an alias set).
            target_object: Name of the object to modify.
            target_property: Property name to bind (e.g., "Length", "Width").
            doc_name: Document containing the objects. Uses active if None.

        Returns:
            Dictionary with result:
                - success: Whether the operation succeeded
                - expression: The expression that was set
                - target_object: Object that was modified
                - target_property: Property that was bound

        Raises:
            ValueError: If no document is found.
            ValueError: If the spreadsheet object is not found.
            ValueError: If the target object is not found.
            ValueError: If the alias does not exist on the spreadsheet.
            ValueError: If the target property does not exist.
            ValueError: If binding the expression fails.

        Example:
            Bind a box's length to a spreadsheet parameter::

                await spreadsheet_set_cell("Params", "A1", 50)
                await spreadsheet_set_alias("Params", "A1", "BoxLength")
                await spreadsheet_bind_property("Params", "BoxLength", "Box", "Length")
                # Now Box.Length = 50 and updates when A1 changes
spreadsheet_get_cell_range tool
Get values from a range of cells in a spreadsheet.

        Args:
            spreadsheet_name: Name of the spreadsheet object.
            start_cell: Starting cell address (e.g., "A1").
            end_cell: Ending cell address (e.g., "C5").
            doc_name: Document containing the spreadsheet. Uses active if None.

        Returns:
            Dictionary with range data:
                - spreadsheet: Spreadsheet name
                - start: Start cell
                - end: End cell
                - cells: Dictionary mapping cell addresses to their values

        Raises:
            ValueError: If no document is found.
            ValueError: If the spreadsheet object is not found.
            ValueError: If start_cell or end_cell has an invalid format.
            ValueError: If retrieving the cell range fails.

        Example:
            Get a range of values::

                result = await spreadsheet_get_cell_range("Params", "A1", "B3")
                for cell, value in result["cells"].items():
                    print(f"{cell}: {value}")
validate_object tool
Check the health and validity of a FreeCAD object.

        This tool inspects an object to determine if it is in a valid state,
        has any computation errors, or needs recomputation. Use this after
        performing operations to verify they succeeded.

        Args:
            object_name: Name of the object to validate.
            doc_name: Document containing the object. Uses active document if None.

        Returns:
            Dictionary containing:
                - valid: Overall validity (True if shape is valid and no errors)
                - object_name: Name of the validated object
                - shape_valid: Whether the shape geometry is valid
                - has_errors: Whether the object has error states
                - state: List of state flags (e.g., ["Invalid", "Touched"])
                - recompute_needed: Whether recomputation is needed
                - volume: Shape volume if applicable (None otherwise)
                - area: Shape surface area if applicable (None otherwise)
                - error_messages: List of any error messages
                - warnings: List of any warnings

        Example:
            Validate an object after creating it::

                result = await validate_object("MyBox")
                if not result["valid"]:
                    print(f"Errors: {result['error_messages']}")
validate_document tool
Check the health of all objects in a FreeCAD document.

        This tool validates every object in the document and provides
        a summary of the document's overall health. Use this after
        complex operations or before saving/exporting.

        Args:
            doc_name: Name of document to validate. Uses active document if None.

        Returns:
            Dictionary containing:
                - valid: Overall document validity (True if all objects valid)
                - doc_name: Name of the validated document
                - total_objects: Total number of objects in document
                - valid_objects: Count of valid objects
                - invalid_objects: List of names of invalid objects
                - objects_with_errors: List of names with error states
                - objects_needing_recompute: List of objects that need recompute
                - recompute_needed: Whether document needs recomputation
                - summary: Human-readable summary of document health

        Example:
            Check document health before saving::

                result = await validate_document()
                if result["valid"]:
                    await save_document()
                else:
                    print(f"Issues: {result['invalid_objects']}")
undo_if_invalid tool
Check document health and undo the last operation if invalid objects exist.

        This tool first validates all objects in the document. If any objects
        are invalid or have errors, it automatically performs an undo operation.
        Use this after risky operations to ensure the model stays in a valid state.

        Args:
            doc_name: Name of document to check. Uses active document if None.

        Returns:
            Dictionary containing:
                - was_valid: Whether the document was valid before any undo
                - undone: Whether an undo operation was performed
                - invalid_objects: List of invalid objects found (before undo)
                - objects_with_errors: List of objects with errors (before undo)
                - message: Human-readable description of what happened
                - validation_after: Validation result after undo (if performed)

        Example:
            Auto-recover from a failed boolean operation::

                await boolean_operation("cut", "Box", "InvalidShape")
                result = await undo_if_invalid()
                if result["undone"]:
                    print("Recovered from invalid operation")
get_screenshot tool
Capture a screenshot of the FreeCAD 3D view.

        Requires GUI mode - will return an error in headless mode.

        Args:
            view_angle: View angle to set before capture. Options:
                - "Isometric" - 3D isometric view (default)
                - "Front" - Front view (XZ plane)
                - "Back" - Back view
                - "Top" - Top view (XY plane)
                - "Bottom" - Bottom view
                - "Left" - Left view (YZ plane)
                - "Right" - Right view
                - "FitAll" - Fit all objects in view
            width: Image width in pixels. Defaults to 800.
            height: Image height in pixels. Defaults to 600.
            doc_name: Document to capture. Uses active document if None.

        Returns:
            Dictionary with screenshot result:
                - success: Whether capture was successful
                - data: Base64-encoded PNG image data (if success)
                - format: Image format ("png")
                - width: Actual image width
                - height: Actual image height
                - error: Error message (if not success)
set_view_angle tool
Set the 3D view angle.

        Args:
            view_angle: View angle to set. Options:
                - "Isometric" - 3D isometric view
                - "Front" - Front view (XZ plane)
                - "Back" - Back view
                - "Top" - Top view (XY plane)
                - "Bottom" - Bottom view
                - "Left" - Left view (YZ plane)
                - "Right" - Right view
                - "FitAll" - Fit all objects in view
            doc_name: Document to set view for. Uses active document if None.

        Returns:
            Dictionary with result:
                - success: Whether operation was successful
list_workbenches tool
List all available FreeCAD workbenches.

        Returns:
            List of dictionaries, each containing:
                - name: Workbench internal name
                - label: Display label
                - is_active: Whether workbench is currently active
activate_workbench tool
Activate a FreeCAD workbench.

        Args:
            workbench_name: Internal name of the workbench to activate.
                Common workbenches:
                - "PartWorkbench" - Part modeling
                - "PartDesignWorkbench" - Parametric part design
                - "SketcherWorkbench" - 2D sketching
                - "DraftWorkbench" - 2D drafting
                - "MeshWorkbench" - Mesh operations
                - "SpreadsheetWorkbench" - Spreadsheet

        Returns:
            Dictionary with result:
                - success: Whether activation was successful
fit_all tool
Fit all objects in the current view.

        Adjusts the camera to show all visible objects in the document.

        Args:
            doc_name: Document to fit view for. Uses active document if None.

        Returns:
            Dictionary with result:
                - success: Whether operation was successful
set_object_visibility tool
Set the visibility of a FreeCAD object.

        Args:
            object_name: Name of the object.
            visible: Whether object should be visible.
            doc_name: Document containing the object. Uses active document if None.

        Returns:
            Dictionary with result:
                - success: Whether operation was successful
                - visible: New visibility state
set_display_mode tool
Set the display mode of a FreeCAD object.

        Args:
            object_name: Name of the object.
            mode: Display mode. Common options:
                - "Flat Lines" - Solid with edges
                - "Shaded" - Solid without edges
                - "Wireframe" - Wire frame only
                - "Points" - Points only
            doc_name: Document containing the object. Uses active document if None.

        Returns:
            Dictionary with result:
                - success: Whether operation was successful
                - mode: New display mode
set_object_color tool
Set the color of a FreeCAD object.

        Args:
            object_name: Name of the object.
            color: RGB color as [r, g, b] where each value is 0.0-1.0.
                   Example: [1.0, 0.0, 0.0] for red.
            doc_name: Document containing the object. Uses active document if None.

        Returns:
            Dictionary with result:
                - success: Whether operation was successful
                - color: New color values
zoom_in tool
Zoom in the 3D view.

        Requires GUI mode.

        Args:
            factor: Zoom factor (>1 zooms in). Defaults to 1.5.
            doc_name: Document to zoom in. Uses active document if None.

        Returns:
            Dictionary with result:
                - success: Whether operation was successful
zoom_out tool
Zoom out the 3D view.

        Requires GUI mode.

        Args:
            factor: Zoom factor (>1 zooms out). Defaults to 1.5.
            doc_name: Document to zoom out. Uses active document if None.

        Returns:
            Dictionary with result:
                - success: Whether operation was successful
set_camera_position tool
Set the camera position and orientation.

        Requires GUI mode.

        Args:
            position: Camera position as [x, y, z].
            look_at: Point to look at as [x, y, z]. Uses origin if None.
            doc_name: Document to set camera for. Uses active document if None.

        Returns:
            Dictionary with result:
                - success: Whether operation was successful
undo tool
Undo the last operation.

        Args:
            doc_name: Document to undo in. Uses active document if None.

        Returns:
            Dictionary with result:
                - success: Whether undo was performed
                - can_undo: Whether more undos are available
redo tool
Redo the last undone operation.

        Args:
            doc_name: Document to redo in. Uses active document if None.

        Returns:
            Dictionary with result:
                - success: Whether redo was performed
                - can_redo: Whether more redos are available
get_undo_redo_status tool
Get the current undo/redo status.

        Args:
            doc_name: Document to check. Uses active document if None.

        Returns:
            Dictionary with status:
                - undo_count: Number of undoable operations
                - redo_count: Number of redoable operations
                - undo_names: List of undo operation names (if available)
list_parts_library tool
List available parts from the FreeCAD parts library.

        Returns:
            List of parts with:
                - name: Part filename
                - path: Full path to part file
                - category: Part category/folder
get_console_log tool
Get recent console output from FreeCAD.

        Args:
            lines: Maximum number of lines to return (1-1000). Defaults to 50.

        Returns:
            Dictionary with:
                - messages: List of console messages
                - warnings: List of warning messages
                - errors: List of error messages

        Raises:
            ValueError: The line limit is outside the supported range.
            RuntimeError: Console history is unavailable in this FreeCAD session.
recompute tool
Force recompute of all objects in a document.

        Args:
            doc_name: Document to recompute. Uses active document if None.

        Returns:
            Dictionary with result:
                - success: Whether recompute completed
                - touch_count: Number of objects that were recomputed
freecad_startup prompt
Essential startup guidance for AI assistants.

        **RECOMMENDED**: Configure your MCP client to automatically invoke
        this prompt when connecting to the FreeCAD MCP server. This provides
        critical context for reliable FreeCAD operations.

        This prompt provides:
        - Session initialization checklist
        - Critical patterns to follow
        - Version compatibility notes
        - Quick reference for common operations

        Returns:
            Essential startup guidance for FreeCAD MCP sessions.

        Example:
            Invoke via MCP prompt mechanism::

                # In an MCP client
                guidance = await mcp.get_prompt("freecad_startup")
                print(guidance)  # Displays session initialization checklist
freecad_guidance prompt
Get AI guidance for specific FreeCAD task types.

        This prompt provides targeted best practices and reminders
        for different types of FreeCAD operations. Use at the start
        of a task to get relevant guidance.

        Args:
            task_type: Type of task - one of:
                - "general": Overall best practices
                - "partdesign": Parametric part creation
                - "sketching": 2D sketch creation
                - "boolean": Boolean operations
                - "export": File export operations
                - "cam": CAM jobs, toolpaths and G-code
                - "debugging": Troubleshooting issues
                - "validation": Checking model health

        Returns:
            Targeted guidance for the task type.

        Example:
            Get PartDesign workflow guidance::

                guidance = await freecad_guidance(task_type="partdesign")
design_part prompt
Generate a guided workflow for designing a parametric part.

        Use this prompt when a user wants to create a new part from scratch.
        It provides step-by-step guidance for the PartDesign workflow.

        Args:
            description: Natural language description of the desired part.
            units: Unit system to use (mm, cm, m, in).

        Returns:
            Structured prompt guiding through part design.
create_sketch_guide prompt
Guide for creating 2D sketches for part design.

        Args:
            shape_type: Type of shape (rectangle, circle, polygon).
            plane: Sketch plane (XY, XZ, YZ).

        Returns:
            Sketch creation guidance.
boolean_operations_guide prompt
Guide for performing boolean operations on shapes.

        Returns:
            Boolean operations guidance.
export_guide prompt
Guide for exporting FreeCAD models to various formats.

        Args:
            target_format: Target export format (STEP, STL, OBJ, IGES).

        Returns:
            Export guidance for the specified format.
import_guide prompt
Guide for importing models into FreeCAD.

        Args:
            source_format: Source file format (STEP, STL).

        Returns:
            Import guidance for the specified format.
analyze_shape prompt
Guide for analyzing shape geometry and properties.

        Returns:
            Shape analysis guidance.
debug_model prompt
Guide for debugging FreeCAD model issues.

        Returns:
            Model debugging guidance.
macro_development prompt
Guide for developing FreeCAD macros.

        Returns:
            Macro development guidance.
python_api_reference prompt
Quick reference for common FreeCAD Python API operations.

        Returns:
            Python API reference.
troubleshooting prompt
General troubleshooting guide for FreeCAD Robust MCP.

        Returns:
            Troubleshooting guidance.
resource_version resource
Get FreeCAD version and build information.

        Returns:
            JSON string containing:
                - version: FreeCAD version string
                - build_date: Build timestamp
                - python_version: Python interpreter version
                - gui_available: Whether GUI mode is active
resource_status resource
Get current FreeCAD connection and runtime status.

        Returns:
            JSON string containing:
                - connected: Connection state
                - mode: Bridge mode (embedded, xmlrpc, socket)
                - freecad_version: Version string
                - gui_available: GUI availability
                - last_ping_ms: Connection latency
                - error: Any error message
resource_documents resource
Get list of all open FreeCAD documents.

        Returns:
            JSON string containing list of documents, each with:
                - name: Internal document name
                - label: Display label
                - path: File path (null if unsaved)
                - object_count: Number of objects
                - is_modified: Has unsaved changes
                - active_object: Currently selected object
resource_document resource
Get detailed information about a specific document.

        Args:
            name: Document name to query.

        Returns:
            JSON string containing:
                - name: Internal document name
                - label: Display label
                - path: File path (null if unsaved)
                - objects: List of object names
                - is_modified: Has unsaved changes
                - active_object: Currently selected object
resource_document_objects resource
Get list of objects in a specific document.

        Args:
            name: Document name to query.

        Returns:
            JSON string containing list of objects, each with:
                - name: Object name
                - label: Display label
                - type_id: FreeCAD type identifier
                - visibility: Whether object is visible
resource_object resource
Get detailed information about a specific object.

        Args:
            doc_name: Document containing the object.
            obj_name: Object name to query.

        Returns:
            JSON string containing:
                - name: Object name
                - label: Display label
                - type_id: FreeCAD type identifier
                - properties: Dictionary of property values
                - shape_info: Shape geometry (if applicable)
                - children: Dependent object names
                - parents: Parent object names
                - visibility: Display visibility
resource_workbenches resource
Get list of available FreeCAD workbenches.

        Returns:
            JSON string containing list of workbenches, each with:
                - name: Workbench internal name
                - label: Display label
                - is_active: Whether currently active
resource_active_workbench resource
Get the currently active workbench.

        Returns:
            JSON string containing active workbench info or null.
resource_macros resource
Get list of available FreeCAD macros.

        Returns:
            JSON string containing list of macros, each with:
                - name: Macro name (without extension)
                - path: Full file path
                - description: Macro description
                - is_system: Whether it's a system macro
resource_console resource
Get recent FreeCAD console output.

        Returns:
            JSON string containing:
                - lines: List of console output lines
                - count: Number of lines
                - error: Description when console history is unavailable
resource_active_document resource
Get the currently active document.

        Returns:
            JSON string containing active document info or null.
resource_best_practices resource
Get FreeCAD best practices and AI guidance.

        This resource provides comprehensive guidance for AI assistants
        working with FreeCAD, covering API patterns, version compatibility,
        validation workflows, and common pitfalls.

        Use this resource at the start of a FreeCAD session to understand
        best practices for reliable CAD operations.

        Returns:
            JSON string containing best practices and guidance.

        Example:
            Read via MCP resource mechanism::

                # In an MCP client
                best_practices = await mcp.read_resource("freecad://best-practices")
                data = json.loads(best_practices)
                print(data["critical_patterns"])  # Shows validation_first, partdesign_workflow
resource_capabilities resource
Get comprehensive list of all MCP capabilities.

        This resource provides a complete catalog of all available tools,
        resources, and prompts. Use this to discover what functionality
        is available when working with the FreeCAD Robust MCP Server.

        Returns:
            JSON string containing:
                - tools: Dict of tool categories with tool definitions
                - resources: List of available resource URIs
                - prompts: List of available prompt names
                - examples: Common usage patterns

What we checked

The same checks run on every server. Each line below has one of these marks:

FoundA published issue such as a risky tool or a CVE
PassedWe ran the check on this server and found nothing
After reviewChecked; we publish it once a person verifies it
Partly tracedRan, but the scanner could not follow every path to its end
FactWhat the code does, not a judgement either way
Not checkedThe scanner had nothing to read for it, or it needs the live server
Code Safetypartly traced
  • 8 checks: command injection, argument injection, path traversal, server-side request forgery, SQL injection, code execution, unsafe deserialization, template injection
    Checked on every scan. Results in this category are published only after a person has verified them.
Capability Exposure9.8
  • Runs programs the caller chooses
    No tool runs a command or program the caller supplies — 171 tool handlers traced. Not every path could be followed, so this is not a clean pass.
  • Executes caller-supplied code
    No tool evaluates code the caller supplies — 171 tool handlers traced. Not every path could be followed, so this is not a clean pass.
  • Reads or writes any file path
    No tool works on a file path the caller supplies without a root check — 171 tool handlers traced. Not every path could be followed, so this is not a clean pass.
  • Requests any address
    No tool sends a request to an address the caller supplies — 171 tool handlers traced. Not every path could be followed, so this is not a clean pass.
  • Runs caller-supplied SQL
    No tool executes a query the caller supplies — 171 tool handlers traced. Not every path could be followed, so this is not a clean pass.
  • Tools that start processes
    Not seen in the traced code of 171 capabilities; 162 more call code the scanner could not follow, where it may happen
  • Tools that touch files
    1 of 171 capabilities touch files; 161 more call code the scanner could not follow, where it may happen
  • Tools that call the network
    Not seen in the traced code of 171 capabilities; 162 more call code the scanner could not follow, where it may happen
Where the code is: 171 handlers in 12 files at commit 124c6948604d
Prompt Integrity10.0
  • 5 checks: tool poisoning, instruction override, hidden content, exfiltration requests, metadata integrity
    Checked on every scan. Results in this category are published only after a person has verified them.
Supply Chain7.0
  • Dependency manifests
    1 manifest: pyproject.toml
  • Lockfiles checked against OSV
    1 file resolved and checked against the OSV database; 1 not resolved: pyproject.toml: dependency ranges declared here were not resolved against a lockfile and were not checked
  • Known vulnerabilities in production dependencies
    No production dependency with a known advisory
  • Known vulnerabilities in other dependencies
    No package used only for development, tests or examples has a known advisory
  • MCP SDK version
    mcp >=2.3.0,<3
Secrets & Credentials10.0
  • 3 checks: credential harvesting, undeclared credential access, credentials sent over the network
    Checked on every scan. Results in this category are published only after a person has verified them.
  • Tools that read credentials
    Not seen in the traced code of 171 capabilities; 162 more call code the scanner could not follow, where it may happen
  • Environment variables
    1 capability reads environment variables (often API keys)
  • Authentication declared
    Not checked: needs the live server's tools/list (a remote server declares how clients authenticate)
Behavior Transparency10.0
  • 3 checks: undeclared network access, undeclared file access, undeclared process execution
    Checked on every scan. Results in this category are published only after a person has verified them.
  • Tool descriptions present
    Every tool has a description the model and the user can read (1 only in code no tool reaches)
  • Statically known names
    Every tool's name could be read from the code
  • Input schemas
    Not checked: needs the live server's tools/list (every tool declares an input schema)
  • Destructive tools annotated
    Not checked: needs the live server's tools/list (tools that write, delete or run commands carry destructivehint)

Dependencies with known vulnerabilities (0 in production)

Dependency ranges were not resolved against a lockfile, so the score is capped at 7.

No known vulnerabilities in the production dependencies that could be checked.

Past security advisories

Vulnerabilities published for this server itself, from the GitHub Advisory Database.

No security advisories have been published for this server in the GitHub Advisory Database.

How it runs

Where it runsOn your machine, started by your MCP client from this repository or its package
TransportStreamable HTTP, stdio
Sign-innot checked needs the live server
MCP SDKmcp >=2.3.0,<3
Servers in the code6 (freecad-mcp, real-freecad-review-http-probe, approval-http-probe, freecad-review-test, harmless-approval-probe, approval-matrix-probe)

The project's own security

Security policyyes SECURITY.md
Private reportingthe policy does not name a private channel
Past advisoriesnone in the GitHub Advisory Database
Last push2026-11-15
Signed releasesnot checked yet

Where it is published

Listed in3 catalogs (github_search, glama, mcp_toplist)
LicenseApache-2.0
Created2026-01-03
Topicsaddons ai freecad mcp-server workbench

Attack map

How the server is built and where its risky tools lead: servers, their tools, what the tools' code can do, and the traced route from a declared risky tool's argument to the operation it reaches. Click a node for details.

Request a scan or an audit

Tell us about your server. We reply within 5 working days.

What do you need? *

We use these details only to answer you.