SolidWorks MCP
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| SOLIDWORKS_MCP_ALLOW_SCRIPTS | No | Set to 1 (or pass the --allow-scripts flag) to switch on the run_script tool, which runs any Python it is given on this computer. | 0 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| get_statusA | Report whether SolidWorks is reachable, its revision, this server's version, and the active/current part. |
| new_documentA | Create a new empty part (kind='part') or assembly (kind='assembly'); it becomes the current document. Assemblies compose saved parts: insert_component places each part, add_mate constrains them, check_interference proves nothing overlaps. Drawings: drawing_file. |
| add_boxA | Add a rectangular block: sketch width x height on the first plane, extrude by depth. Dimensions are in millimetres. Returns the created feature name, the
addressable depth dimension ('D1@'), |
| add_extruded_profileA | Extrude a closed polygon into a solid; it is auto-closed.
corner_radii_mm rounds the corners with real sketch fillets: one radius for all, or one per vertex (0 = sharp); equal radii share one dimension ('radius', else 'r'). draft_deg tapers the walls inwards as they rise (negative: outwards), a dimension 'draft' (a moulded boss, a printable taper). merge=False keeps the result a separate body: list_bodies, combine_bodies. An argument that does not go with the variant is refused. Returns mass properties (volume = polygon area * depth; a right-angled corner of radius r loses r^2 (1 - pi/4), a concave one gains it). |
| add_discA | Create a disc/puck/flange: a circle extruded along +Z, centred at (x_mm, y_mm). Flat faces are +Z/-Z, so add_hole and add_circular_pattern compose with it (round-flange bolt circles). The centre defaults to the origin; off it, its x and y are dimensions. Returns mass properties. Use new_document first. |
| add_cylinderB | Create a cylinder by revolving a profile 360° about an axis. The first revolve-based primitive. Returns the resulting mass properties (volume = π · r² · h). Use new_document first. |
| add_coneA | Create a cone/frustum by revolving a trapezoidal profile 360°. top_diameter_mm = 0 gives a full cone. Returns mass properties (volume = π·h/3 · (rb² + rb·rt + rt²)). Use new_document first. |
| add_revolved_profileA | Revolve a closed profile on the Front plane about an axis in it. Without axis_mm: profile_mm = [[r, z], …] in mm, r = distance from the Y axis, z = position along it. With axis_mm = [[x1, y1], [x2, y2]]: profile_mm gives [x, y] points and the axis is the line through those two points, anywhere and at any angle (a hub turned about its own centre). Auto-closed and spun angle_deg (default 360°). Points on the axis give a solid (shafts, vases); a profile away from it gives a ring. The profile may not cross the axis. corner_radii_mm rounds corners as for add_extruded_profile (not those on the axis). Returns mass properties. Use new_document first. |
| add_swept_pipeA | Sweep a circular profile (pipe/tube/rod) along a 2D path on the Front plane. path_mm = [[x, y], …] in mm is the centreline. Interior corners are rounded with bend_radius_mm (required when the path turns; a 2-point straight path needs none); smooth=True runs a spline through the points instead, a flowing curve. diameter_mm = outer Ø; the round profile is auto-generated perpendicular to the path. Returns mass properties (pi r^2 x path_length_mm). Use new_document first. |
| add_swept_profileA | Sweep an arbitrary closed PROFILE (cross-section) along a 2D PATH. profile_mm = [[u,v],…] in mm: the closed cross-section on the Right plane (u → world -Z, v → world +Y), centred near the origin. path_mm = [[x,y],…] in mm on the Front plane — MUST start at the origin heading +X (the profile is perpendicular to the path there). Path corners are rounded with bend_radius_mm; corner_radii_mm rounds the profile's corners as for add_extruded_profile. Volume = profile_area · path_length. For non-round extrusions along a path (rails, gaskets, trim, channels). Returns mass properties. Use new_document first. |
| add_loftA | Loft (blend) 2+ closed profiles, given one of two ways.
Give profiles in the same order and sense so they do not twist. Returns mass properties. |
| cut_profileA | Cut a polygonal pocket, slot or window; the polygon is auto-closed.
Blind by depth_mm (with plane=: in total, centred on the plane), or through all when omitted. corner_radii_mm rounds the corners as for add_extruded_profile. Returns mass properties. |
| add_planeA | Make a reference plane to sketch on: an offset or a turned plane, its position a dimension. base moved offset_mm along its normal (base: front/top/right or a plane by name), or a default plane turned angle_deg about a model axis it holds, about='x'/'y'/'z' (front holds x and y, top x and z, right y and z), by the right-hand rule. For both, turn first, then offset that plane. Or the plane through model point through=[x, y, z] square to normal=[dx, dy, dz] (any direction, e.g. square to a cone's generatrix). Returns its name for plane= arguments, and origin_mm, normal, x_axis and y_axis: a point (u, v) on it is origin + u x_axis + v y_axis. |
| list_bodiesA | List the part's solid bodies: name, volume and bounding box. A part holds several after merge=False or split_body; combine_bodies joins them again. |
| combine_bodiesA | Combine solid bodies of the part into operation 'add' joins the tools to main, 'subtract' cuts them out of it, 'common' keeps only what main shares with them. tools: body names, every other body by default. Returns mass properties and the bodies left. |
| split_bodyA | Split the part's body in two along a plane (front/top/right or a plane by name). The two bodies come back by name: combine them differently, or check each with list_bodies. Use add_plane first for a cut anywhere else. |
| add_threadA | Cut a real, printable ISO metric thread (SolidWorks' own Thread feature). size: e.g. 'M10x1.5', 'M3x0.5', 'M10x1.0' -- checked against SolidWorks' thread profiles. (x_mm, y_mm, z_mm) = centre of the circular edge where the thread starts: the end face of a rod, or the mouth of a hole (internal=True). It runs length_mm into the material, right-handed. External: the rod must have the nominal diameter (M10 -> Ø10). Internal: drill the ISO basic minor diameter first, D - 1.0825*P (M10x1.5 -> Ø8.376). Returns mass properties and the thread's size, pitch and diameters. |
| add_ribA | Add a straight stiffening rib / gusset in a plane parallel to the Front plane. start_mm/end_mm = [x, y] ends of the rib's free edge (add_extruded_profile coordinates); the plane sits at height z_mm. The rib grows toward toward_mm (any [x, y] point on the side to fill, e.g. the inner corner of an L-bracket) until it meets the part, thickness_mm thick, centred on the plane. Returns mass properties: a triangular gusset with legs a and b adds a*b/2 * thickness. |
| add_holeA | Cut a round hole. Which one follows from the arguments:
Prefer iso= for standard fasteners. Returns mass properties. |
| add_boss_on_faceA | Grow a round boss (standoff, peg) height_mm out of ANY planar face, centred at (x, y, z) mm. The face is found as for add_hole with face=. For a PCB standoff, add a blind
hole in its top. Returns mass properties and |
| add_text_on_faceA | Engrave text into ANY planar face, or emboss it with emboss=True (labels, version numbers). (x, y, z) is the text's lower-left corner on the face; the text runs along the face sketch's horizontal axis: upright along +x on the top (+z) and front (-y) faces, turned on the others (vertical on +/-x, upside down on +y), so put labels on the top or front. height_mm is the character height, depth_mm the engraving depth or embossing height. The position is two dimensions ('x', 'y'); font must be installed (default: SolidWorks' own). Returns text_area_mm2, since letters have no hand calculation. |
| cut_offset_pocketA | Pocket a planar face, leaving a rim rim_mm wide along its outline. The recessed web of an I-beam that follows a curved link, a tray, or a frame
(depth_mm omitted: through all). The face is the one facing |
| cut_slotA | Cut a straight slotted hole (obround) on the +Z face. Centred at (x_mm, y_mm); length_mm is centre-to-centre of the rounded ends, width_mm the slot width, angle_deg its orientation in the +Z plane (0 = +X). Cut blind by depth_mm or through when omitted. Returns mass properties. |
| add_extruded_slotB | Extrude a stadium (rounded tab, lug or link) from point start_mm to end_mm ([x, y] mm). The half-round ends are centred on the two points themselves; width_mm is the tab's width, depth_mm the extrusion along +Z. Volume = (width * length
|
| extrude_sketchA | Extrude an existing sketch of the current part by name, e.g. one a person drew. depth_mm along the sketch's normal (reverse=True: the other way), merged with the body. Or up_to='next': up to the next face of the part, ending on its shape (a post into a curved wall) and following it when it changes; or up_to='@x,y,z': up to the face through that point, also where 'next' fails (a side of the profile on a face: the refusal names a point ahead). The sketch keeps its own dimensions and relations, so the person's design stays in charge; read_sketch shows it first. Returns mass properties. |
| add_sketchA | Draw a sketch of lines, arcs and splines on a plane, fully defined, to extrude or cut. plane: "front", "top", "right" or a plane by name (add_plane). Points are [u, v] in the plane's own axes, which the result gives (origin_mm + u x_axis + v y_axis): front is (x, y), top (x, -z), right (-z, y). The outline starts at start_mm; each segment runs on from where the last ended: {"line": [u, v]}; {"arc": [u, v], "through": [u, v]} (an arc through a middle point); {"arc": [u, v], "tangent": true} (an arc flowing on from the segment before); {"spline": [[u, v], ..., [u, v]]} (through the points, ending at the last). "tangent": true on a line checks that it flows on. End on start_mm to close the outline. Segments that meet smoothly get a tangent relation, the rest is dimensioned from the origin: x/y for the i-th point given (points_mm lists them; start_mm is 0), r for the radius of segment k. Then extrude_sketch / cut_sketch the returned sketch. fixed=True freezes computed geometry (an involute, a cam) with Fix relations instead of dimensions. |
| cut_sketchA | Cut an existing sketch of the current part by name into the body. depth_mm deep, or through all when depth_mm is omitted, against the sketch's normal: into the part from a face. From a plane with the part in front of it (a box on the Front plane) give reverse=True. Returns mass properties. |
| add_filletA | Round edges of the current part with one constant radius (mm). edges: "all" (default), "x"/"y"/"z" for edges parallel to that world axis, a face outline like "+z:outline" (the outer edges of the top face, not those of holes in it), every edge of one feature like "feature:Boss" (its top and where it meets the part: a moulded look), or explicit indices like "2,5" from list_edges. radii_at_mm = [[x, y, z, r], ...] makes the radius vary: r at the edge end at each point (list_edges gives the ends), radius_mm at the other ends, straight in between; 'vertex_radii' gives each end's dimension. skip_shorter_mm leaves out edges shorter than that. tangent_propagation=True carries the round on along edges that run on smoothly from the given ones, as SolidWorks does by default: an edge ending where it runs into another tangentially, such as round a fillet, only rounds so. A refusal names the edges the radius does not fit (each tried alone, and with propagation). Returns the number of edges filleted and the mass properties. |
| add_full_roundB | Round a rib's top off completely: a full round fillet, as on a moulded part. The face facing |
| add_chamferB | Chamfer edges of the current part: distance_mm back along a face, at angle_deg (default 45°) to it. edges: "all" (default), "x"/"y"/"z", a face outline like "+z:outline", a feature's edges like "feature:Boss", or explicit indices like "2,5" from list_edges. Another angle than 45° needs from_face, which way the face that the distance runs along faces: "-z", angle_deg=60 makes an underside edge printable without support (round an arc the chamfer is a cone). Returns the number of edges chamfered and the mass properties. |
| add_linear_patternA | Repeat a feature direction: "+x"/"-x"/"+y"/... feature_name: the feature to repeat (e.g. "Hole"); defaults to the most recently added feature. Returns mass properties. |
| add_circular_patternA | Repeat a feature The axis is the cylindrical face nearest (center_x_mm, center_y_mm) — e.g. a centre hole drilled there — or axis='y' (a model axis through the origin: revolved parts turn about y) or a reference axis by name (add_axis). feature_name defaults to the last feature. Bolt circle: drill a centre hole
|
| add_axisB | A reference axis anywhere: through=[[x, y, z], [dx, dy, dz]] (point and direction, model mm) or where two planes meet (planes=['Plane1', 'right']). Patterns turn about it by name (add_circular_pattern(axis=...)). |
| run_scriptA | Run Python against the live SolidWorks: a whole part in one call, or what no tool covers; only when the server runs with --allow-scripts. Give the script as code, or as a file at path: it may import helpers
from its own folder (reloaded every run), so fix a part by editing the
file and running it again. The script sees sw, model (current part/
assembly), drawing, mod (typed interfaces), wrap(obj, mod.IFeature),
mm (mm -> m), to_mm, doubles([..]) (a VARIANT array) and session (this
server's tools: session.new_part(), session.add_box(...)). print() is
captured and One report comes back for a part: features_added, failing_features, bodies (volume, box), clashes between bodies, under_defined_sketches, mass properties, seconds, and image: one PNG of the iso, right, top and bottom views (for a path, next to the script; image='x.png' elsewhere). |
| add_mirrorA | Mirror features, or the whole body, about the 'front'/'top'/'right' plane moved offset_mm. Mirrors about z / y / x = offset_mm; plane may also name another plane in the part ('Plane1'), moved offset_mm along its normal. features: list_features names; the copies follow their seeds. Without features the body is mirrored and merged: model half of a symmetric part, mirror it about the face where the halves meet. The plane position comes back as dimension 'plane_offset'. Fails, leaving the part as it was, when a copy would land outside the part. |
| add_shellA | Hollow the current part to a wall of thickness_mm, opening one face. open_face: a direction "+z"/"-z"/"+x"/... removes that planar face (open shell); "none" makes a closed hollow. Returns the resulting mass properties. |
| set_dimensionA | Set a named driving dimension (e.g. 'D1@BlockExtrude') in mm, rebuild, and remeasure. This is the parametric edit at the heart of the correction loop. Every
modelling tool returns its dimensions by role in |
| slice_meshA | Cross-sections of an STL/3MF mesh at the given heights along axis 'x'/'y'/'z'. For modelling a part that must fit something that only exists as a mesh. Returns each section's closed loops, largest first, as polygon points (mm) ready to use as profiles. frame (3MF): 'object' (the mesh's own frame) or 'build' (as placed on the slicer's plate). |
| compare_with_meshB | Compare the current part's cross-sections with a reference mesh's at the same heights. offset_mm [dx, dy, dz] moves the mesh into the part's frame. A different area means a misread feature; equal areas with different extents a shifted frame. Returns per-section pairs and the worst differences. |
| list_dimensionsA | List every dimension in the current part: name (for set_dimension), feature, value, unit. For a part opened from disk, or when the names the tools returned are gone. |
| read_sketchA | Read a sketch of the current part back, e.g. one a person drew (a list_features name). Gives its lines, arcs, circles and splines in MODEL coordinates (mm), construction geometry marked, its dimensions (for set_dimension) and whether it is fully defined: check a design against fixed points before building on it with extrude_sketch / cut_sketch. |
| list_featuresA | List the current part's modelling history in tree order: name, type, suppressed. For a part opened from disk, or to find the step to undo. Flags features that fail to rebuild and names sketches that are not fully defined. |
| delete_featureA | Delete a feature (a list_features name) with its sketch, then rebuild and remeasure. The way to undo a step. Refuses when other features are built on it and names them, and what is built on those; with_children=True deletes them all. dry_run=True only lists what would go (would_delete). Equations that named its dimensions break and come back as broken_equations; with_equations=True deletes them (global variables stay). |
| suppress_featureA | Suppress a feature, or bring it back with suppress=False; rebuild and remeasure. Keeps the feature and its dimensions, unlike delete_feature, so it suits trying a variant. Features that depend on it follow both ways. |
| reorder_featureA | Move a feature (a list_features name), with its sketch, to just before another one; rebuild and remeasure. For a boss added last that filled holes cut earlier: build it at the end as usual, then move it before the first of those cuts, and they cut through it again. Refused, the part as it was, when the feature is built on something at or after that place. Returns the new order (features) and the features that fail to rebuild (failing_features). |
| set_appearanceA | Colour and/or see-through of the current part, or of one component in an assembly. rgb: [r, g, b], 0..255 each; transparency: 0 solid .. 1 clear (0 makes a see-through component solid again). In an assembly, component names it ('Bracket-1', 'Leg-1/Thigh-1'); the colour then belongs to the assembly and the part keeps its own. What is left out stays as it was. |
| set_materialA | Assign a material by name (e.g. "6061 Alloy", "AISI 1020", "ABS"). Makes mass and density reflect a real material instead of the 1000 kg/m³ default. One SolidWorks does not have (say "TPU") comes with its density: density_kg_m3=1210 makes it, by that name, carrying only the density. The English names work on a SolidWorks in another language too. Returns mass properties including density. |
| set_equationA | Add an equation, or replace the one that sets the same name; rebuild and remeasure. A SolidWorks equation string, e.g. '"D1@BlockExtrude" = 25' or '"D1@BlockExtrude" = 2 * "D1@Sketch1"'. A global variable is '"W" = 40'; link a dimension to it with '"width@Sketch1" = "W"', and set '"W" = 45' again to change it. Persists a relation (unlike set_dimension). A list of equations is set in order with one rebuild at the end (later ones may use earlier ones), and a refused one undoes the whole list. Returns the index (per equation for a list), whether it replaced one, the features that fail to rebuild (failing_features) and mass properties. |
| list_equationsA | List the equations and global variables: index, equation, name it sets, value, global.
|
| delete_equationA | Delete an equation by the name it sets ("L_thigh", "D1@Boss") or its list_equations index. Rebuilds and returns what was deleted, failing_features and mass properties. |
| list_documentsA | List the documents open in SolidWorks: title, path (empty until saved), type, unsaved changes.
|
| activate_documentA | Make an open document current again by its title, also a new one that was never saved. For after open_document / close_document on another document; list_documents gives the titles. |
| delete_mateA | Delete a mate of the current assembly by name (list_components, or add_mate's 'mate'). A list of names deletes them all at once, with one rebuild. Their components are free to move again. Returns what was deleted and how many mates are left (list_components lists them). |
| suppress_mateA | Suppress a mate so it stops holding its components (it stays in the tree), or bring it back. suppress=False brings it back. Returns whether it is suppressed now. |
| delete_componentA | Remove a component from the current assembly, with the mates that hold it. component: its name in list_components ("Bracket-1", or "Bracket" while there is one). Returns the mates deleted, how many components are left and the assembly's mass properties. |
| replace_componentA | Swap a top-level component for another .sldprt or .sldasm, in the same place. SolidWorks re-attaches each mate to the new part's matching face where it can. Returns the new component, the mates kept, and the mates that broke or went: each with its type, the other components, and what it held on the old part (the face's type, normal or axis and centre in the component's own frame), plus up to three candidate faces on the new part ('#index', nearest first). Re-mate with delete_mate and add_mate(mates=[...]). |
| rebuildB | Force a rebuild of the current part or assembly and report whether it rebuilt without errors. In an assembly, mate_errors names each mate SolidWorks flags, and each mate that lost a face or edge it used (it rebuilds fine, but holds nothing). |
| get_mass_propertiesA | Get volume (mm^3), mass (kg), surface area (mm^2), centre of mass, and bounding box. |
| get_bounding_boxB | Get the bounding box (min/max/size in mm) of the current part, tight, or of the whole assembly. |
| list_facesA | List the part's faces (index, planar?, normal, area, centre) for inspection. A cylindrical face also gives its axis, radius and a point on the axis (for a hole: its centre), so hole patterns can be read off. component: a component of the current assembly, listed in its own frame (e.g. an imported servo); for a sub-assembly, every part's faces in the sub-assembly's frame, each naming its part. A part's indices shift as features are added; a component's are ordered by part, type, centre and area, so they stay while its shape does. add_mate takes them as '#5'. |
| list_edgesA | List the part's edges: index, type, length, ends; lines also axis and midpoint. Narrow it on a big part: face (a list_faces index, "#5"), feature (the edges of the faces it made), within_mm ([[x1, y1, z1], [x2, y2, z2]]: both ends inside), min_length_mm. Indices are always those of the whole part: use them with add_fillet/add_chamfer edges="2,5". |
| check_printabilityA | Check the current part for 3D printing, built along Overhangs: downward faces leaning more than overhang_deg from vertical (90 = a flat ceiling) need support; the faces on the bed do not count. Gives the overhanging area per face (list_faces index) with its worst lean and centre, the bed contact area and the print height. With min_wall_mm (e.g. two nozzle widths) also the walls thinner than that, measured straight through the material from points spread over every face, with where each is thinnest. A spot right beside an edge where faces meet at a sharp angle reads as thin as the wedge of material there is: that is the edge, not a wall. |
| exportA | Export the current part or assembly to STEP/STL/IGES/Parasolid/3MF (format from extension). Silent (no prompts). Verifies the file appears on disk and reports its size.
For STL/3MF, tessellation resolution is set first: quality 'coarse'|'fine'
(default 'fine' for print quality), or pass deviation_mm (+ optional angle_deg)
for a reproducible custom resolution (overrides quality). Ignored for other formats.
An assembly goes to STL as one file, or one file per component with
per_component=True (SolidWorks names them); |
| screenshotA | Save a screenshot of the current part or assembly (PNG/JPG/TIF). view: 'iso' (default), 'front', 'back', 'left', 'right', 'top' or 'bottom'; or from_dir = [x, y, z], the direction to look from, e.g. [-1, 1, -1] to see from behind and below what iso hides (the model's +y stays up). Zoomed to fit, or onto a detail: zoom_mm = [[x1, y1, z1], [x2, y2, z2]], the corners of the region to fill the image (model mm, in any view). Reference planes and axes are left out, so they do not cut through the shape; show_planes=True keeps them. |
| make_drawingA | Make a manufacturing drawing of the current part in one call: PDF, .slddrw, DXF or DWG. Front, top and side views (first angle) plus an iso view on an ISO sheet
('A4' upright, 'A3'..'A0' landscape) with SolidWorks' ISO title block, at
the largest standard scale that leaves room for dimensions (or scale='1:2').
The model's dimensions come in once each, one hole callout per set of
identical Hole Wizard holes ('4X ...'), their centres dimensioned, and the
title block shows material and mass. Returns |
| build_drawingA | Build a drawing from scratch from a spec; edit the spec and rebuild to fine-tune. spec: {"part": path (default the current part), "sheet": "A3", "scale": "1:2", "views": [{"name": "front", "orient": "front", "at": [x, y]}, {"name": "side", "projected_from": "front", "side": "right"}, {"name": "A-A", "section_of": "front", "through": [x, y, z], "normal": "x"}, {"name": "B", "detail_of": "front", "center": [x, y, z], "radius": 5}], "import": ["model", "callouts", "hole_locations"], "dims": [{"view": "front", "ref": "edge:-x", "to": "hole:H1"}, {"view": "front", "chain": ["edge:-x", "hole:H1", "hole:H2"]}], "callouts": [{"view": "front", "hole": "H1"}], "symbols": [{"type": "datum", "view": "top", "ref": "edge:-z", "label": "A"}, {"type": "gtol", "view": "top", "ref": "edge:+z", "symbol": "parallelism", "tolerance": "0.05", "datums": ["A"]}, {"type": "surface_finish", ...}], "notes": ["..."], "tables": [[["a", "b"], ...]], "gear_table": {"kind": "spur", "teeth": 20, "module": 2}, "props": {"material": "from part"}, "layout": "auto"}. Saved to path when given. Returns what was made and the problems check_drawing finds. |
| drawing_fileA | The current drawing's document: action 'new' (sheet 'A4' upright or 'A3'..'A0', part: the saved model its views show, default the current part), 'open' (path .slddrw), 'save' (path .slddrw), 'export' (path: PDF, DXF, DWG, PNG/JPG/TIF of the sheet) or 'close' (without saving). The drawing is kept apart from the current part. 'new' returns the frame, title block and free areas in sheet mm. |
| set_drawing_propertiesA | Fill the title block through the custom properties its fields show. description, material, weight, finish go to the part ('from part' links material / weight to the part's own, so they follow the model); drawn_by, drawn_date, checked_by, checked_date, approved_by, revision, company, part_no, qty or any other name go to the drawing. Returns what each title block field now shows and which properties it has no field for. |
| add_viewA | Add a view. kind:
|
| edit_viewA | Move a view (its geometry centred on at=[x, y], or beside='' on side, gap_mm apart; align 'center' or 'start'), change it (scale '1:2' or 'sheet'; display 'hidden_removed', 'hidden_visible', 'wireframe', 'shaded', 'shaded_edges'; tangent_edges; new_name), or delete=True it. Projected and section views stay aligned with their parent, so they only move along that line. |
| list_viewsB | The sheet's frame and title block, and each view (or one): name, type, scale, outline and geometry box (sheet mm), the model-to-sheet mapping (a model point p lands at origin + p.x * x + p.y * y + p.z * z), and its annotations: id, type, shown text, value, box. |
| import_dimensionsB | Bring in what the model already knows. kinds: 'model' (its dimensions, each once), 'callouts' (one counted hole callout per set of identical Hole Wizard holes, '4X ...'), 'hole_locations' (their centres dimensioned from the left and bottom edges), 'center_marks' (centre marks and lines). Default the first three, into every view (or one). |
| add_dimensionA | Dimension in a view between references, or the size of one. ref / to: 'edge:-x' (the face facing -x, seen edge-on), 'hole:CBore1' (its
centre; alone its diameter), 'feature:CornerFillet' (alone: its radius), or
a model point [x, y, z] (the edge nearest it). style 'single' (ref to |
| add_symbolB | A symbol on an edge of a view, its leader attached mid-edge. type:
|
| add_noteC | A note on the sheet; at=[x, y] its top-left corner (sheet mm), by default above the title block. Lines: '\n'. |
| add_tableC | A table on the sheet: rows [[cell, ...], ...] (title=True merges the first row), or gear={...} for a computed gear data table: kind 'spur' (diameters, span over k teeth, centre distance) or 'bevel' (straight: cone angles, cone distance, chordal thickness and height, crown to apex), teeth, module, mating_teeth, pressure_angle_deg, face_width_mm, profile_shift, shaft_angle_deg, accuracy, extra_rows [[label, value], ...]; teeth, module and mating_teeth default to the part's custom properties Teeth, Module, MatingTeeth. at=[x, y] its top-left corner, by default free room. |
| edit_annotationA | Change an annotation by id ('RD3@Drawing View1'), or delete=True it. prefix / suffix (a prefix replaces SolidWorks' own symbol: a radius needs 'R', e.g. '4X R'), precision (decimals), tolerance [upper, lower] mm, fit ('H7'), a note's text, its place at=[x, y] (sheet mm), diametric=True. A model dimension keeps these in the part (the result says changes_part). |
| auto_layoutB | Lay all views out again: the main view top left, its projected and section views beside it, the rest in the room left, with room for dimensions, at the largest standard scale that fits (or scale). arrange_dimensions=True then lets SolidWorks space each view's dimensions evenly. |
| check_drawingA | Problems on the sheet, to fix before sending the drawing out. Views or annotations outside the frame or over the title block, views overlapping, texts overlapping or on view geometry, crossing leaders, text under 2.5 mm, probable duplicate dimensions, and hole/cut/fillet/chamfer features no dimension or callout covers. |
| render_drawingC | Picture (PNG/JPG) of the sheet, or of the region zoom_mm = [[x1, y1], [x2, y2]] (sheet mm), to look at it. |
| close_documentA | Close one open document by its title (list_documents): a part, assembly or drawing. Without a title it closes the current part or assembly. save=True saves it over its own file first; otherwise closing never asks and unsaved changes are lost (the result says discarded_changes). Parts that an open assembly loaded (visible false) close with that assembly and are refused here. With no title and no current document it closes SolidWorks' active one, but only when that has no unsaved changes. |
| save_documentA | Save the current part (.sldprt) or assembly (.sldasm) to path, or over its own file without one. Saves silently and checks the file was really written. Drawings: drawing_file(action='save'). |
| open_documentA | Open a .sldprt or .sldasm, or import a STEP/IGES/Parasolid file; it becomes the current document. A neutral file opens as a part, or as an assembly if it holds one (kind='part' / 'assembly' says which up front). A part shows its history in list_features and its dimensions in list_dimensions; an imported body has no history, but the tools work on it (holes and pockets on its faces, bosses, fillets), and the result gives its solid body count and mass properties. An imported assembly's parts arrive as components at their places, ready for list_components and add_mate; the result gives the component count. Drawings: drawing_file(action='open'). |
| insert_componentA | Insert a .sldprt, or a .sldasm as a sub-assembly, with its ORIGIN at (x, y, z) mm. The part's own origin lands exactly on that point, and the placement is read back and verified. fixed=True pins the component; fixed=False leaves it free for mates. The default fixes only the FIRST component, giving the assembly a ground to build against. Returns the component's name, placement and box. |
| list_componentsA | List the assembly's components (name, path, fixed, position, rotation, bounding box) and mates. Positions are in mm and rotations in degrees, both in assembly coordinates; the bounding box of each component is in assembly coordinates too. Each mate gives its name, SolidWorks type, the components it holds, the dimension of a distance or angle mate, and an error when SolidWorks flags it. On a big assembly, narrow it: name keeps the matching components ('Bolt*' as a wildcard, 'bolt' anywhere in the name) and the mates holding them; mates=False leaves the mates out; brief=True gives only name, path, fixed. |
| set_component_transformA | Move/rotate a component: its origin to (x, y, z) mm, rotated rx/ry/rz degrees. name is the component name ('Bed' or 'Bed-1'); rotations apply X, then Y, then Z about the assembly axes, and work on a fixed component too. The transform is read back and compared, so a move SolidWorks ignored (e.g. one already pinned by mates) fails loudly instead of silently leaving the part where it was. |
| add_mateA | Mate a face of one component to a face of another, or add several mates in one call. comp_a/comp_b are component names ('Bed' or 'Bed-1'; 'Leg-1/Thigh-1' inside
a sub-assembly). face_a/face_b select a face in that component's OWN frame:
by direction "+x"/"-x"/"+y"/... (optionally "+y:inner" for the cavity side
of a hollow part), by its list_faces(component=...) index, "#5", or by a
point on it, "@x,y,z" (a hole's wall: its centre plus the radius along x).
mate_type between planar faces:
"coincident", "distance" (distance_mm), "parallel", "perpendicular" or
"angle" (angle_deg between the faces' normals, 0..180); "concentric" between
two cylindrical faces (a pin in a hole, a hinge axis), leaving the turn
about the axis free. flip takes the other solution: the mirror side of a
distance, the other turning direction of an angle. A distance or angle
mate returns its Several at once: mates=[{"comp_a": "Bolt-1", "face_a": "#3", "comp_b": "Plate-1", "face_b": "#12", "mate_type": "concentric"}, ...], each with the arguments above. stop_on_error=True stops at the first that fails; the mates before it stay. Returns a result per mate (its name and dimension, or the error), how many were added, failed and not tried, and the mate count. |
| check_interferenceA | Report component pairs whose solids overlap, with the volume in mm^3. Touching faces do not count (a bed standing on the floor is fine); only real overlapping material does. count == 0 means the assembly is clash-free. |
| measure_distanceA | The smallest distance (mm) from a component to another one, a point or an axis. Give component_b; or point_mm = [x, y, z] in assembly mm, and the nearest point on the component comes back too, with inside: true when the point lies in its material; or axis_mm = [[x, y, z], [dx, dy, dz]], the endless line through that point along that direction, such as a bolt's axis. 0 means they touch or overlap; check_interference tells which. Sub-assemblies count with all their parts; one part inside is 'Leg-1/Thigh-1'. |
| check_motionA | Step a joint through its range and check the assembly at every step. dimension_name: an angle or distance mate's dimension (add_mate returns it); values in degrees for an angle, mm for a distance, e.g. [30, 60, 90, 120, 150]. Each step gives the overlapping pairs with their volume and the distance between each pair in distances ([["Rod", "Bolt"], ...]); the summary gives clash_free and each pair's smallest distance with the value where it occurs. The dimension goes back to its value afterwards. A joint inside a sub-assembly is 'D1@Angle1@Leg-1'. Refused while a mate is broken: the parts it should hold would drift and the result mean nothing. |
| swept_regionA | Outline what a component covers in a plane while a joint moves, to keep clear of it or cut it away. Steps the joint's dimension through values (as check_motion, e.g. every 5 degrees over 30..150), cuts the component at axis = each of heights_mm (a few heights inside a layer, not on its faces) and joins all of it, made margin_mm wider, within about tolerance_mm. frame: the component to give the coordinates in, such as the part to cut from; else the assembly's. Each region's outline runs counter-clockwise in the plane's other two axes, (x, y) across z: give it to add_sketch as a spline. count says how many separate regions there are. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| guide | Modelling guide: conventions, verification, recipes, 3D printing, reverse-engineering from a mesh, limits. |
TDQS
Scored across 91 tools
Many tools have distinct purposes, but the modeling surface contains several overlapping primitives: add_box/add_extruded_profile/add_disc, add_cylinder/add_cone/add_revolved_profile, add_swept_pipe/add_swept_profile, and add_sketch+extrude_sketch versus add_extruded_profile all require reading long descriptions to choose correctly. Other areas such as documents, mates, and drawings are clearer, so overlap is present but not pervasive.
Names are consistently snake_case and mostly follow a verb_noun pattern (add_hole, cut_profile, list_features, set_dimension, check_interference). A few tools like swept_region, auto_layout, rebuild, export, screenshot, and run_script deviate from the verb_noun pattern but remain readable and predictable.
With 91 tools, this server is far beyond the typical 3-15 range and exceeds the 50+ threshold for an extreme tool-count mismatch. Even for a broad CAD domain, the surface is large enough to burden tool selection and discovery.
Coverage is strong across part modeling, assemblies, mates, drawings, dimensions, equations, export, and mesh inspection, with detailed lifecycle support. Gaps remain around direct sketch editing, assembly component patterns, configurations, and mesh import, but many can be worked around via run_script.