MCPVault

get_selection

MCP tool from MCP Server Solidworks by eyfel

reads the geometry the user selected in the SolidWorks GUI and maps it to the analyze index.

How to use it

get_selection is exposed by the MCP Server Solidworks MCP server. Add the server to your MCP client (Claude Desktop, Cursor, Windsurf and others), and the get_selection tool becomes available to the model automatically. See the full listing for setup details and every tool this server provides.

Install MCP Server Solidworks

$pip install -r requirements.txt
FULL MCP SERVER SOLIDWORKS LISTING

Other tools in MCP Server Solidworks (39)

activate_document

switches between open documents.

add_dimension

adds a dimension to the sketch.

add_drawing_dimension

adds a single dimension by sheet coordinate.

add_drawing_view

adds a model view: front, top, right, isometric, back, bottom, left; orthographic views default to Hidden-Lines-Visible per drafting convention (displaymode overridable).

add_edge_feature

fillet or chamfer on a solid edge (chamfer: distance-angle at any angle, or distance-distance).

add_flat_pattern_view

adds a sheet-metal flat-pattern view (the unfolded blank with bend lines and bend notes); the correct, standard way to detail sheet-metal parts.

add_hole_callout

adds a hole callout on a hole edge.

add_mate

adds a mate (coincident, concentric, parallel, perpendicular, tangent, distance, angle, lock) using robust index-based entity selection.

add_reference_geometry

reference plane, axis, or point.

add_sketch_constraint

adds a sketch relation (horizontal, coincident, etc.).

add_sketch_entity

adds a sketch entity: line, circle, arc, center arc, ellipse, spline, rectangle, fillet, chamfer.

analyze_assembly

reads components (tree order with full transforms, incl. a flattened leaf view across nesting levels), mates (creation order, locale-proof enum types, entity anchors), or one component's face/edge lists.

analyze_model

geometry, massproperties, bodies (per-body fingerprints for multibody parts), features (a compact feature-level recipe), edges, faces, sketch (one sketch's exact segments on demand), and featuremap (per-feature consumed/created topology — the source of the reference-resolver anchors) modes.

auto_center_marks

automatically inserts center marks and centerlines on every hole/slot.

auto_dimension_drawing

transfers the model's driving dimensions into the views (the "Insert Model Items" automation) — the robust alternative to placing dimensions by coordinate.

close_document

closes the document.

compare_assemblies

objective assembly diff (component set, per-component transforms to ≤1 µm, mate count + types, mass properties) with the verified verdict.

compare_parts

objective two-part diff (topology, volume, area, center of mass) with the project's verified verdict (topology-exact and ΔV ≤ 1% and ΔA ≤ 1%).

create_drawing

creates a drawing document (A3 sheet).

create_pattern

linear or circular pattern.

create_rib

rib feature from an open sketch profile.

create_sketch

starts a sketch on a plane or a selected face.

edit_feature

suppresses, unsuppresses, deletes, or renames a feature.

edit_sketch

reopens an existing sketch for editing.

ensure_ready

launches SolidWorks via COM and attaches if it is closed (does not open a document).

extrude_feature

boss, cut, revolve, sweep, loft.

insert_component

inserts a part file as a component: insertion point or a full 13-number transform, fixed or floating.

modify_dimension

changes the value of a named dimension (the basis for variants).

open_document

opens an existing file from disk (native .sldprt/.sldasm/.slddrw; imports .ipt/.CATPart/STEP/IGES via 3D Interconnect when the translator is available, otherwise returns a clear OPENFAILED).

open_new_assembly

opens a new blank assembly document.

open_new_part

opens a new part document.

rebuild_from_ir

the reverse IR door: runs an artifact's IR block through the deterministic compiler to rebuild the part — or assembly — in a fresh document, and warns when the source file has changed under the artifact (sourcestale).

save_analysis

writes an analysis artifact for a part or assembly file (feature recipe / component + mate tree, driving parameters, and an optional Feature Graph IR block) to <folder>/.solidpilot/.

save_body_as_part

extracts one body of a multibody part into its own part file (for flattened assembly STEP imports).

save_document

saves the part or drawing to disk.

set_part_material

assigns a material to the part.

sheet_metal_feature

sheet metal: baseflange, edgeflange (incl. custom-profile flanges), sketchedbend, flatpattern.

submit_feature_graph

the forward IR door: builds a part or assembly from a Feature Graph supplied directly by the model (design intent, no original to copy), through the same compiler — two doors, one compiler.

verify_state

returns the current state and feature tree.