Skip to main content
Glama
andrewbartels1

SolidworksMCP-python

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault

No arguments

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": true
}
logging
{}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
extensions
{
  "io.modelcontextprotocol/ui": {}
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
open_modelA

Open a SolidWorks model (part, assembly, or drawing).

Opens an existing SolidWorks file and makes it the active document for further operations. Supports all standard SolidWorks file formats and provides detailed model information upon successful opening.

create_partA

Create a new SolidWorks part document.

Creates a new SolidWorks part document using the default part template. The new part becomes the active document and is ready for modeling operations such as sketch creation and feature addition.

create_assemblyA

Create a new SolidWorks assembly document.

Creates a new SolidWorks assembly document using the default assembly template. The new assembly becomes the active document and is ready for component insertion, mating, and assembly-level operations.

create_drawingA

Create a new SolidWorks drawing document.

This tool creates a new drawing document using the default drawing template. The new drawing will become the active document.

close_modelA

Close the current SolidWorks model.

Closes the currently active SolidWorks document with an option to save changes before closing. This is essential for proper model lifecycle management and preventing data loss.

create_extrusionC

Create an extrusion feature from the active sketch.

Creates a 3D extrusion feature (boss or cut) from the currently active 2D sketch. Supports advanced options like draft angles, thin features, bidirectional extrusion, and various end conditions for professional modeling workflows.

create_revolveB

Create a revolve feature from the active sketch.

Creates a 3D revolve feature by rotating the active 2D sketch profile around a specified axis of revolution. Supports full and partial revolves, thin features, and bidirectional revolution for comprehensive rotational modeling.

get_dimensionB

Get the value of a dimension from the current model.

Retrieves the current value of a named dimension from the active SolidWorks model. Dimensions can be from sketches, features, or global dimensions. Useful for parametric modeling and design validation.

set_dimensionA

Set the value of a dimension in the current model.

This tool modifies the value of a named dimension and rebuilds the model. Use this to parametrically modify your model dimensions.

create_cut_extrudeA

Cut material from the active model using the current sketch profile.

Creates a Cut-Extrude feature (Insert > Cut > Extrude) from the active sketch. Use this after exit_sketch when you want to remove material — e.g. to create windows, holes, slots, or any through/blind cut in an existing solid body.

add_filletA

Add a fillet (rounded edge) to selected edges of the current model.

Rounds the specified named edges with the given radius. Edge names use the SolidWorks convention, e.g. 'Edge<1>', or you can leave edge_names empty to fillet all edges if the adapter supports it.

create_sweepA

Sweep the active profile sketch along a named path sketch.

Creates a swept boss/protrusion (Insert > Boss/Base > Sweep). Requires two sketches in the active part: a closed profile sketch and an open path sketch named by path. The profile is inferred as the sketch that is not the path (in the usual "draw profile, draw path, sweep" flow this is unambiguous). Optionally applies a constant twist along the path.

create_loftA

Loft a solid between two or more profile sketches.

Creates a lofted boss/protrusion (Insert > Boss/Base > Loft) blending the listed profile sketches in order. Each profile must be a closed contour. Optional guide curves shape the transition between profiles.

create_sketchA

Create a new sketch on the specified plane.

Creates a new sketch on a reference plane and enters sketch edit mode. This is the first step for creating any 2D geometry that will be used for 3D features like extrusions, revolves, or sweeps.

add_lineC

Add a line to the current sketch.

Adds a line segment between two points in the active sketch. Lines are fundamental sketch entities used for creating profiles, construction geometry, and complex shapes.

add_circleB

Add a circle to the current sketch.

add_rectangleB

Add a rectangle to the current sketch.

Creates a rectangular profile defined by two opposite corner points, automatically generating four connected line segments forming a closed rectangle suitable for extrusion or other 3D operations.

exit_sketchA

Exit sketch editing mode.

Exits the current sketch editing mode and returns to the 3D modeling environment. This is required after completing sketch geometry before creating 3D features like extrusions, revolves, or sweeps.

Returns: dict[str, Any]: A dictionary containing the resulting values.

Example: ```python # Complete sketch workflow await create_sketch({"plane": "Top"}) await add_circle({"center_x": 0, "center_y": 0, "radius": 5})

                result = await exit_sketch()
                if result["status"] == "success":
                    print("Sketch completed, ready for 3D operations")
                    # Now ready for extrude, revolve, etc.
                ```

            Note:
                - Must be called after sketch geometry creation
                - Required before executing 3D modeling operations
                - Automatically validates sketch geometry
                - Previous sketch remains selectable for feature creation
check_sketch_fully_definedB

Check whether a sketch is fully defined.

add_arcB

Add an arc to the current sketch.

Creates a circular arc defined by center point, start point, and end point. Arcs are essential for creating rounded corners, curved transitions, and complex curved profiles in mechanical designs.

add_splineA

Add a spline curve to the current sketch.

Creates a smooth, free-form spline curve that passes through or near the specified control points. Splines are ideal for creating organic shapes, complex profiles, and smooth transitions in industrial design.

add_centerlineA

Add a centerline to the current sketch.

Creates a construction/reference line that serves as a centerline for symmetrical features, revolution axes, or construction geometry. Centerlines are non-geometric entities used for reference only.

add_polygonB

Add a regular polygon to the current sketch.

Creates a regular polygon with specified number of sides, center point, and circumscribed radius. Polygons are useful for creating hexagonal nuts, octagonal features, and other multi-sided geometric shapes.

add_ellipseA

Add an ellipse to the current sketch.

Creates an elliptical entity with specified center and major/minor axes. Ellipses are useful for creating oval holes, ergonomic profiles, and complex curved features in mechanical and industrial design.

add_sketch_constraintA

Add a geometric constraint/relation between sketch entities.

Creates geometric relationships between sketch entities such as parallel, perpendicular, tangent, coincident, etc. Essential for creating fully defined, parametric sketches that maintain design intent.

add_sketch_dimensionA

Add a dimension to sketch entities.

Creates dimensional constraints that control the size of sketch entities. Dimensions are essential for creating precise, parametric designs that can be easily modified and maintain manufacturing tolerances.

In live SolidWorks automation, sketch dimensions can otherwise trigger the interactive Modify approval dialog. The adapter suppresses the relevant sketch-input preferences for the automation session and uses the dedicated radial/diameter APIs for circles and arcs so this tool remains non-interactive.

sketch_linear_patternB

Create a linear pattern of sketch entities.

Generates a linear array of selected sketch entities in specified direction(s) with defined spacing and count. Essential for creating hole patterns, vent grilles, and repetitive geometric features.

sketch_circular_patternA

Create a circular pattern of sketch entities around the sketch origin.

Generates a circular array of selected sketch entities. The rotation axis is always the sketch origin — SOLIDWORKS' CreateCircularSketchStepAndRepeat does not expose a pattern-centre parameter. Position the seed entity at the desired radius from the origin; the pattern derives its radius from the seed's centre.

Essential for creating bolt circles, gear teeth, and other radially symmetric features around the sketch origin.

sketch_mirrorA

Mirror sketch entities about a centerline.

Creates mirrored copies of selected sketch entities about a reference centerline, maintaining symmetrical design relationships. Essential for creating symmetric parts and reducing modeling time.

sketch_offsetA

Create an offset of sketch entities.

Generates offset copies of selected sketch entities at a specified distance, maintaining the original entity shape while creating parallel geometry. Essential for wall thickness, machining allowances, and clearance features.

sketch_tutorial_simple_holeA

Tutorial: Create a simple circular hole sketch.

Demonstrates complete workflow for creating a basic hole sketch that can be used for through-holes, counterbores, or other circular features. This tutorial shows the fundamental sketch-to-feature process.

Returns: dict[str, Any]: A dictionary containing the resulting values.

Example: ```python # Learn basic sketching workflow result = await sketch_tutorial_simple_hole()

                if result["status"] == "success":
                    print("Tutorial completed successfully!")
                    print("Steps performed:")
                    for step in result["steps"]:
                        print(f"  - {step}")
                    print(f"Next: {result['next_steps']}")
                ```

            Workflow:
                1. Creates sketch on Top plane
                2. Adds 2.5mm radius circle at origin (5mm diameter hole)
                3. Exits sketch editing mode
                4. Returns sketch ready for extrusion or cutting operations

            Note:
                - Demonstrates complete sketch creation workflow
                - Creates standard 5mm diameter hole geometry
                - Result is ready for negative extrusion to create hole
                - Perfect starting point for learning SolidWorks automation
tutorial_simple_holeA

Create a simple hole as a guided tutorial workflow.

Builds a sketch circle on the selected plane, exits the sketch, and creates a cut feature using the supplied diameter and depth. Useful as an end-to-end example of a basic subtractive feature.

create_drawing_viewB

Create a drawing view of a SolidWorks model.

Creates technical drawing views including orthographic projections, isometric views, section views, and detail views from 3D models. Essential for generating production drawings and technical documentation.

add_dimensionA

Add a dimension to the current drawing.

Creates dimensional annotations on drawing views including linear, radial, angular, and diameter dimensions. Essential for manufacturing specifications and quality control documentation.

add_noteC

Add a note or annotation to the current drawing.

Creates text annotations, callouts, and notes on drawings for specifications, instructions, and additional manufacturing information. Essential for comprehensive technical documentation.

create_section_viewC

Create a section view of the current drawing.

Generates section views that show internal features by cutting through the part along a specified section line. Essential for revealing hidden geometry, internal structures, and complex assemblies.

create_detail_viewA

Create a detail view of a specific area.

Generates magnified detail views of specific regions to show fine features, tight tolerances, and intricate geometry that requires enhanced visibility for manufacturing and inspection.

update_sheet_formatC

Update the sheet format and title block information.

Applies drawing templates and updates title block fields with project information, revision data, and drawing metadata. Essential for standardized documentation and drawing control.

auto_dimension_viewC

Automatically dimension a drawing view.

Analyzes drawing view geometry and automatically adds common dimensions including overall sizes, hole diameters, radii, and critical features. Accelerates drawing completion and ensures comprehensive dimensioning coverage.

check_drawing_standardsB

Check the current drawing against drafting standards.

Validates drawing compliance with industry drafting standards including ANSI Y14.5, ISO 128, and DIN standards. Identifies non-compliance issues and provides recommendations for improvement.

create_technical_drawingB

Create a technical drawing from a SolidWorks part or assembly.

Supports selecting a template, output path, sheet format, scale, and optional auto- population of standard views for documentation.

add_drawing_viewA

Add, update, or remove a drawing view in an existing drawing.

Supports configuring the target drawing, view type, parent view, scale, and placement coordinates for common drawing view workflows.

add_annotationB

Add an annotation such as a note, balloon, or surface symbol.

Places annotation text in a drawing with optional font size, leader attachment, and title-block style metadata fields.

update_title_blockB

Update title block fields for the active drawing.

Applies drawing metadata such as title, drawing number, and approval fields to keep documentation aligned with standards.

analyze_drawing_comprehensiveC

Handle analyze drawing comprehensive.

analyze_drawing_dimensionsB

Analyze dimensions in a SolidWorks drawing for consistency and completeness.

This tool performs detailed dimensional analysis including precision, tolerances, and completeness checking.

analyze_drawing_annotationsC

Analyze drawing annotations and notes quality.

check_drawing_complianceC

Check drawing compliance with company standards.

analyze_drawing_viewsC

Analyze drawing views arrangement and quality.

generate_drawing_reportC

Generate comprehensive drawing analysis report.

compare_drawing_versionsC

Compare different versions of drawing files.

validate_drawing_completenessC

Validate drawing completeness for production readiness.

calculate_mass_propertiesB

Get mass properties of the current SolidWorks model.

Calculates and returns comprehensive mass properties for the active model including volume, surface area, mass, center of mass, and moments of inertia. Essential for engineering analysis, weight calculations, and structural design.

get_mass_propertiesD

Backward-compatible alias for calculate_mass_properties.

check_interferenceA

Check for interference between components in an assembly.

Analyzes specified components for geometric interference (overlapping volumes) and provides detailed interference detection results. Critical for assembly validation and identifying design conflicts before manufacturing.

analyze_geometryC

Handle analyze geometry.

This tool provides various geometry analysis capabilities like curvature analysis, draft analysis, thickness analysis, etc.

get_material_propertiesA

Get material properties of the current model.

This tool retrieves the material properties assigned to the model including density, elastic modulus, yield strength, etc.

Returns: dict[str, Any]: A dictionary containing the resulting values.

export_stepB

Export the current model to STEP format.

Exports SolidWorks models to STEP (Standard for the Exchange of Product Data) format, the preferred neutral CAD format for interoperability between different CAD systems and manufacturers.

export_igesA

Export the current model to IGES format.

Exports SolidWorks models to IGES (Initial Graphics Exchange Specification) format, a legacy neutral CAD format still widely used for surface modeling and older CAD system compatibility.

export_stlC

Export the current model to STL format.

Exports SolidWorks models to STL (Stereolithography) format, the standard file format for 3D printing, rapid prototyping, and additive manufacturing applications.

export_pdfA

Export the current model or drawing to PDF format.

Creates PDF documents from SolidWorks drawings, assemblies, or parts for documentation, sharing, review, and archival purposes. Essential for design review and manufacturing documentation.

export_dwgB

Export the current drawing to DWG format.

Converts SolidWorks drawings to DWG (Drawing) format, the native AutoCAD file format widely used in architecture, engineering, and construction industries for 2D technical drawings.

export_imageA

Export images of the current model.

Captures high-quality rendered images of SolidWorks models from various view orientations for documentation, presentations, marketing materials, and web publication.

batch_exportA

Batch export multiple SolidWorks files to a target format.

Processes entire directories of SolidWorks files and converts them to specified target formats. Essential for project migrations, supplier deliverables, and large-scale format conversions.

generate_vba_codeB

Generate VBA code for SolidWorks automation.

Analyzes operation description and generates appropriate VBA code with SolidWorks API calls, error handling, and documentation.

automation_start_macro_recordingC

Start recording a macro in SolidWorks.

Begins macro recording to capture user actions and generate reusable automation scripts.

automation_stop_macro_recordingA

Stop recording the current macro.

This tool stops the active macro recording and saves the recorded actions as a VBA macro.

batch_process_filesC

Handle batch process files.

This tool processes multiple files in a directory, performing operations like rebuild, save as, export, or property updates.

manage_design_tableB

Create or manage design tables for parametric modeling.

Design tables allow you to create multiple configurations of a part or assembly by driving parameters from an Excel spreadsheet.

execute_workflowC

Handle execute workflow.

This tool executes a series of automated steps in sequence, with support for parallel execution and error handling.

create_templateC

Create a SolidWorks template file.

This tool creates templates for parts, assemblies, or drawings with standardized settings, materials, and configurations.

optimize_performanceC

Optimize SolidWorks performance settings.

This tool analyzes the current SolidWorks configuration and suggests or applies performance optimizations.

save_fileA

Save the current SolidWorks model.

Saves the currently active SolidWorks document to its existing file location. Essential for preserving work and maintaining document version control. Handles both modified and unmodified documents based on force_save setting.

save_asB

Save the current model to a new location or format.

Saves the currently active SolidWorks document with a new filename, location, or file format. Supports multiple export formats for interoperability with other CAD systems and manufacturing workflows.

get_file_propertiesA

Get properties of the current SolidWorks file.

Retrieves comprehensive metadata and properties of the currently active SolidWorks document. Provides essential file information for document management, version control, and project organization.

Returns: dict[str, Any]: A dictionary containing the resulting values.

Example: ```python result = await get_file_properties()

                if result["status"] == "success":
                    props = result["properties"]

                    # Basic file info
                    file_info = props["file_info"]
                    print(f"File: {file_info['file_name']}")
                    print(f"Size: {file_info['file_size']}")
                    print(f"Type: {file_info['file_type']}")

                    # Technical properties
                    tech = props["technical_properties"]
                    print(f"Material: {tech['material']}")
                    print(f"Units: {tech['units']}")

                    # Document info
                    doc = props["document_info"]
                    print(f"Author: {doc['author']}")
                    print(f"Description: {doc['description']}")
                ```

            Note:
                - Requires an active SolidWorks document
                - Properties may vary based on document type
                - Some properties may be empty if not set
                - Technical properties depend on document configuration
get_model_infoA

Get metadata for the active SolidWorks document.

Returns a compact summary of the current model context that is useful for read-before- write LLM flows (document type, active configuration, and feature count).

Returns: dict[str, Any]: A dictionary containing the resulting values.

list_featuresA

List feature-tree entries for the active SolidWorks document.

Useful for read-before-write workflows where the agent must inspect existing model structure before adding or editing downstream features.

classify_feature_treeA

Classify the active model into a feature family from model-info and tree data.

This is a read-before-write helper for delegation. It summarizes whether the current document looks like a direct-MCP solid, sheet metal workflow, advanced VBA-backed part, assembly, drawing, or an insufficient-evidence case.

list_configurationsA

List configuration names for the active SolidWorks document.

Returns all available configuration names so callers can select a stable target before invoking feature or export operations.

Returns: dict[str, Any]: A dictionary containing the resulting values.

manage_file_propertiesB

Read, update, copy, move, rename, or delete file-related properties.

Uses the requested operation and file paths to manage SolidWorks file metadata or related file lifecycle tasks through the active adapter.

convert_file_formatB

Convert a SolidWorks file from one format to another.

Supports exporting source files to target formats such as STEP, IGES, STL, PDF, or other adapter-supported conversion outputs.

batch_file_operationsB

Run a file operation across multiple files as a batch workflow.

Intended for repetitive file management tasks such as copying, moving, renaming, or deleting groups of SolidWorks documents.

load_partA

Load (open) a SolidWorks part file.

Convenience wrapper that opens a .sldprt file and makes it the active document. Provides a simpler alternative to open_model for parts.

load_assemblyA

Load (open) a SolidWorks assembly file.

Convenience wrapper that opens a .sldasm file and makes it the active document. Provides a simpler alternative to open_model for assemblies.

save_partB

Save the active SolidWorks part document.

Convenience wrapper that saves the currently active part. If no file_path is provided, saves to the existing location. Otherwise, saves as a new file.

save_assemblyA

Save the active SolidWorks assembly document.

Convenience wrapper that saves the currently active assembly. If no file_path is provided, saves to the existing location. Otherwise, saves as a new file.

pack_and_go_assemblyA

Copy a SolidWorks assembly and all its referenced parts to a self-contained folder.

Enumerates every component referenced by the active assembly, copies the assembly and each part into target_dir, then rewrites the stored component paths inside the copied assembly so it opens without any dependency on the original file locations — equivalent to the SolidWorks GUI Pack-and-Go operation.

generate_vba_extrusionC

Generate VBA code for complex extrusion operations.

generate_vba_revolveC

Generate VBA code for complex revolve operations.

generate_vba_assembly_insertB

Generate VBA code for assembly component insertion.

generate_vba_drawing_viewsC

Generate VBA code for drawing view creation.

generate_vba_batch_exportB

Generate VBA code for batch file export operations.

generate_vba_part_modelingC

Generate VBA code for complex part modeling operations.

generate_vba_assembly_matesC

Generate VBA code for assembly mate creation.

generate_vba_drawing_dimensionsC

Generate VBA code for creating drawing dimensions.

Creates macro for various dimension types in drawings.

generate_vba_file_operationsC

Generate VBA code for file management operations.

generate_vba_macro_recorderC

Generate VBA code using macro recording patterns.

extract_templateB

Extract template from existing SolidWorks model.

apply_templateB

Apply a template to an existing SolidWorks model.

This tool applies saved template settings including properties, dimensions, and formatting to the target model.

batch_apply_templateA

Apply template to multiple models in batch.

This tool processes multiple SolidWorks files and applies the same template configuration to all matching files.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/andrewbartels1/SolidworksMCP-python'

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