solidworks_mcp.tools.export¶
solidworks_mcp.tools.export ¶
Export tools for SolidWorks MCP Server.
Provides tools for exporting SolidWorks models to various formats including STEP, IGES, STL, PDF, DWG, and image formats.
Attributes¶
Classes¶
BatchExportInput ¶
Bases: CompatInput
Input schema for batch export operations.
Attributes:
| Name | Type | Description |
|---|---|---|
export_format |
str | None
|
The export format value. |
file_pattern |
str | None
|
The file pattern value. |
file_patterns |
list[str]
|
The file patterns value. |
format_type |
str | None
|
The format type value. |
include_subdirectories |
bool
|
The include subdirectories value. |
output_directory |
str
|
The output directory value. |
recursive |
bool
|
The recursive value. |
source_directory |
str
|
The source directory value. |
Functions¶
model_post_init ¶
Provide model post init support for the batch export input.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
__context
|
Any
|
The context value. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
None |
None
|
None. |
Source code in src/solidworks_mcp/tools/export.py
CompatInput ¶
Bases: BaseModel
Base schema allowing legacy/extra fields used by existing tests.
Attributes:
| Name | Type | Description |
|---|---|---|
model_config |
Any
|
The model config value. |
ExportDWGInput ¶
Bases: CompatInput
Input schema for DWG export.
Attributes:
| Name | Type | Description |
|---|---|---|
autocad_version |
str | None
|
The autocad version value. |
drawing_path |
str | None
|
The drawing path value. |
dwg_version |
str
|
The dwg version value. |
file_path |
str | None
|
The file path value. |
layer_mapping |
bool
|
The layer mapping value. |
output_path |
str | None
|
The output path value. |
units |
str
|
The units value. |
version |
str
|
The version value. |
Functions¶
model_post_init ¶
Provide model post init support for the export dwginput.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
__context
|
Any
|
The context value. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
None |
None
|
None. |
Source code in src/solidworks_mcp/tools/export.py
ExportFileInput ¶
Bases: CompatInput
Input schema for exporting files.
Attributes:
| Name | Type | Description |
|---|---|---|
file_path |
str
|
The file path value. |
format_type |
str
|
The format type value. |
options |
dict[str, Any] | None
|
The options value. |
ExportIGESInput ¶
Bases: CompatInput
Input schema for IGES export.
Attributes:
| Name | Type | Description |
|---|---|---|
file_path |
str | None
|
The file path value. |
iges_version |
str | None
|
The iges version value. |
model_path |
str | None
|
The model path value. |
output_path |
str | None
|
The output path value. |
precision |
float
|
The precision value. |
surface_type |
str
|
The surface type value. |
units |
str
|
The units value. |
ExportImageInput ¶
Bases: CompatInput
Input schema for exporting images.
Attributes:
| Name | Type | Description |
|---|---|---|
file_path |
str | None
|
The file path value. |
format |
str | None
|
The format value. |
format_type |
str
|
The format type value. |
height |
int
|
The height value. |
image_format |
str | None
|
The image format value. |
model_path |
str | None
|
The model path value. |
orientation |
str | None
|
The orientation value. |
output_path |
str | None
|
The output path value. |
resolution |
str | None
|
The resolution value. |
view_orientation |
str
|
The view orientation value. |
width |
int
|
The width value. |
Functions¶
model_post_init ¶
Provide model post init support for the export image input.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
__context
|
Any
|
The context value. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
None |
None
|
None. |
Source code in src/solidworks_mcp/tools/export.py
ExportPDFInput ¶
Bases: CompatInput
Input schema for PDF export.
Attributes:
| Name | Type | Description |
|---|---|---|
color_mode |
str
|
The color mode value. |
drawing_path |
str | None
|
The drawing path value. |
file_path |
str | None
|
The file path value. |
include_3d |
bool
|
The include 3d value. |
output_path |
str | None
|
The output path value. |
quality |
str
|
The quality value. |
ExportSTEPInput ¶
Bases: CompatInput
Input schema for STEP export.
Attributes:
| Name | Type | Description |
|---|---|---|
file_path |
str | None
|
The file path value. |
model_path |
str | None
|
The model path value. |
output_path |
str | None
|
The output path value. |
precision |
float
|
The precision value. |
step_version |
str | None
|
The step version value. |
units |
str
|
The units value. |
version |
str
|
The version value. |
ExportSTLInput ¶
Bases: CompatInput
Input schema for STL export.
Attributes:
| Name | Type | Description |
|---|---|---|
binary_format |
bool
|
The binary format value. |
file_format |
str | None
|
The file format value. |
file_path |
str | None
|
The file path value. |
format_type |
str
|
The format type value. |
model_path |
str | None
|
The model path value. |
output_path |
str | None
|
The output path value. |
resolution |
str
|
The resolution value. |
units |
str
|
The units value. |
SolidWorksAdapter ¶
Bases: ABC
Base adapter interface for SolidWorks integration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config
|
object | None
|
Configuration values for the operation. Defaults to None. |
None
|
Attributes:
| Name | Type | Description |
|---|---|---|
_metrics |
Any
|
The metrics value. |
config |
Any
|
The config value. |
config_dict |
Any
|
The config dict value. |
Initialize adapter with configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config
|
object | None
|
Configuration values for the operation. Defaults to None. |
None
|
Source code in src/solidworks_mcp/adapters/base.py
Functions¶
add_arc
async
¶
add_arc(center_x: float, center_y: float, start_x: float, start_y: float, end_x: float, end_y: float) -> AdapterResult[str]
Add an arc to the current sketch.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
center_x
|
float
|
The center x value. |
required |
center_y
|
float
|
The center y value. |
required |
start_x
|
float
|
The start x value. |
required |
start_y
|
float
|
The start y value. |
required |
end_x
|
float
|
The end x value. |
required |
end_y
|
float
|
The end y value. |
required |
Returns:
| Type | Description |
|---|---|
AdapterResult[str]
|
AdapterResult[str]: The result produced by the operation. |
Source code in src/solidworks_mcp/adapters/base.py
add_centerline
async
¶
Add a centerline to the current sketch.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x1
|
float
|
The x1 value. |
required |
y1
|
float
|
The y1 value. |
required |
x2
|
float
|
The x2 value. |
required |
y2
|
float
|
The y2 value. |
required |
Returns:
| Type | Description |
|---|---|
AdapterResult[str]
|
AdapterResult[str]: The result produced by the operation. |
Source code in src/solidworks_mcp/adapters/base.py
add_circle
abstractmethod
async
¶
Add a circle to the current sketch.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
center_x
|
float
|
The center x value. |
required |
center_y
|
float
|
The center y value. |
required |
radius
|
float
|
The radius value. |
required |
Returns:
| Type | Description |
|---|---|
AdapterResult[str]
|
AdapterResult[str]: The result produced by the operation. |
Source code in src/solidworks_mcp/adapters/base.py
add_ellipse
async
¶
add_ellipse(center_x: float, center_y: float, major_axis: float, minor_axis: float) -> AdapterResult[str]
Add an ellipse to the current sketch.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
center_x
|
float
|
The center x value. |
required |
center_y
|
float
|
The center y value. |
required |
major_axis
|
float
|
The major axis value. |
required |
minor_axis
|
float
|
The minor axis value. |
required |
Returns:
| Type | Description |
|---|---|
AdapterResult[str]
|
AdapterResult[str]: The result produced by the operation. |
Source code in src/solidworks_mcp/adapters/base.py
add_fillet
async
¶
Add a fillet feature to selected edges.
Rounds the selected edges of the current solid body with the given radius.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
radius
|
float
|
Fillet radius in millimeters. |
required |
edge_names
|
list[str]
|
List of edge names to fillet. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
AdapterResult |
'AdapterResult[Any]'
|
Feature result or error. |
Source code in src/solidworks_mcp/adapters/base.py
add_line
abstractmethod
async
¶
Add a line to the current sketch.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x1
|
float
|
The x1 value. |
required |
y1
|
float
|
The y1 value. |
required |
x2
|
float
|
The x2 value. |
required |
y2
|
float
|
The y2 value. |
required |
Returns:
| Type | Description |
|---|---|
AdapterResult[str]
|
AdapterResult[str]: The result produced by the operation. |
Source code in src/solidworks_mcp/adapters/base.py
add_polygon
async
¶
Add a regular polygon to the current sketch.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
center_x
|
float
|
The center x value. |
required |
center_y
|
float
|
The center y value. |
required |
radius
|
float
|
The radius value. |
required |
sides
|
int
|
The sides value. |
required |
Returns:
| Type | Description |
|---|---|
AdapterResult[str]
|
AdapterResult[str]: The result produced by the operation. |
Source code in src/solidworks_mcp/adapters/base.py
add_rectangle
abstractmethod
async
¶
Add a rectangle to the current sketch.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x1
|
float
|
The x1 value. |
required |
y1
|
float
|
The y1 value. |
required |
x2
|
float
|
The x2 value. |
required |
y2
|
float
|
The y2 value. |
required |
Returns:
| Type | Description |
|---|---|
AdapterResult[str]
|
AdapterResult[str]: The result produced by the operation. |
Source code in src/solidworks_mcp/adapters/base.py
add_sketch_circle
async
¶
add_sketch_circle(center_x: float, center_y: float, radius: float, construction: bool = False) -> AdapterResult[str]
Alias for add_circle used by some tool flows.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
center_x
|
float
|
The center x value. |
required |
center_y
|
float
|
The center y value. |
required |
radius
|
float
|
The radius value. |
required |
construction
|
bool
|
The construction value. Defaults to False. |
False
|
Returns:
| Type | Description |
|---|---|
AdapterResult[str]
|
AdapterResult[str]: The result produced by the operation. |
Source code in src/solidworks_mcp/adapters/base.py
add_sketch_constraint
async
¶
add_sketch_constraint(entity1: str, entity2: str | None, relation_type: str, entity3: str | None = None) -> AdapterResult[str]
Apply a geometric constraint between sketch entities.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
entity1
|
str
|
The entity1 value. |
required |
entity2
|
str | None
|
The entity2 value. |
required |
relation_type
|
str
|
The relation type value. |
required |
entity3
|
str | None
|
Third entity ID — only used by the
|
None
|
Returns:
| Type | Description |
|---|---|
AdapterResult[str]
|
AdapterResult[str]: The result produced by the operation. |
Source code in src/solidworks_mcp/adapters/base.py
add_sketch_dimension
async
¶
add_sketch_dimension(entity1: str, entity2: str | None, dimension_type: str, value: float) -> AdapterResult[str]
Add a sketch dimension.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
entity1
|
str
|
The entity1 value. |
required |
entity2
|
str | None
|
The entity2 value. |
required |
dimension_type
|
str
|
The dimension type value. |
required |
value
|
float
|
The value value. |
required |
Returns:
| Type | Description |
|---|---|
AdapterResult[str]
|
AdapterResult[str]: The result produced by the operation. |
Source code in src/solidworks_mcp/adapters/base.py
add_spline
async
¶
Add a spline through the provided points.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
points
|
list[dict[str, float]]
|
The points value. |
required |
Returns:
| Type | Description |
|---|---|
AdapterResult[str]
|
AdapterResult[str]: The result produced by the operation. |
Source code in src/solidworks_mcp/adapters/base.py
check_sketch_fully_defined
async
¶
Check whether a sketch is fully defined.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
sketch_name
|
str | None
|
Optional sketch name to inspect. Defaults to None. |
None
|
Returns:
| Type | Description |
|---|---|
AdapterResult[dict[str, Any]]
|
AdapterResult[dict[str, Any]]: Definition status payload. |
Source code in src/solidworks_mcp/adapters/base.py
close_model
abstractmethod
async
¶
Close the current model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
save
|
bool
|
The save value. Defaults to False. |
False
|
Returns:
| Type | Description |
|---|---|
AdapterResult[None]
|
AdapterResult[None]: The result produced by the operation. |
Source code in src/solidworks_mcp/adapters/base.py
connect
abstractmethod
async
¶
create_assembly
abstractmethod
async
¶
Create a new assembly document.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str | None
|
The name value. Defaults to None. |
None
|
Returns:
| Type | Description |
|---|---|
AdapterResult[SolidWorksModel]
|
AdapterResult[SolidWorksModel]: The result produced by the operation. |
Source code in src/solidworks_mcp/adapters/base.py
create_cut
async
¶
Create a cut feature from an existing sketch.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
sketch_name
|
str
|
The sketch name value. |
required |
depth
|
float
|
The depth value. |
required |
Returns:
| Type | Description |
|---|---|
AdapterResult[str]
|
AdapterResult[str]: The result produced by the operation. |
Source code in src/solidworks_mcp/adapters/base.py
create_cut_extrude
async
¶
Create a cut-extrude feature from the active sketch.
Cuts material from the current solid body using the active sketch profile. Equivalent to SolidWorks Insert > Cut > Extrude.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
params
|
ExtrusionParameters
|
Depth and direction parameters. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
AdapterResult |
'AdapterResult[Any]'
|
Feature result or error. |
Source code in src/solidworks_mcp/adapters/base.py
create_drawing
abstractmethod
async
¶
Create a new drawing document.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str | None
|
The name value. Defaults to None. |
None
|
Returns:
| Type | Description |
|---|---|
AdapterResult[SolidWorksModel]
|
AdapterResult[SolidWorksModel]: The result produced by the operation. |
Source code in src/solidworks_mcp/adapters/base.py
create_extrusion
abstractmethod
async
¶
Create an extrusion feature.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
params
|
ExtrusionParameters
|
The params value. |
required |
Returns:
| Type | Description |
|---|---|
AdapterResult[SolidWorksFeature]
|
AdapterResult[SolidWorksFeature]: The result produced by the operation. |
Source code in src/solidworks_mcp/adapters/base.py
create_loft
abstractmethod
async
¶
Create a loft feature.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
params
|
LoftParameters
|
The params value. |
required |
Returns:
| Type | Description |
|---|---|
AdapterResult[SolidWorksFeature]
|
AdapterResult[SolidWorksFeature]: The result produced by the operation. |
Source code in src/solidworks_mcp/adapters/base.py
create_part
abstractmethod
async
¶
Create a new part document.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str | None
|
The name value. Defaults to None. |
None
|
units
|
str | None
|
The units value. Defaults to None. |
None
|
Returns:
| Type | Description |
|---|---|
AdapterResult[SolidWorksModel]
|
AdapterResult[SolidWorksModel]: The result produced by the operation. |
Source code in src/solidworks_mcp/adapters/base.py
create_revolve
abstractmethod
async
¶
Create a revolve feature.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
params
|
RevolveParameters
|
The params value. |
required |
Returns:
| Type | Description |
|---|---|
AdapterResult[SolidWorksFeature]
|
AdapterResult[SolidWorksFeature]: The result produced by the operation. |
Source code in src/solidworks_mcp/adapters/base.py
create_sketch
abstractmethod
async
¶
Create a new sketch on the specified plane.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
plane
|
str
|
The plane value. |
required |
Returns:
| Type | Description |
|---|---|
AdapterResult[str]
|
AdapterResult[str]: The result produced by the operation. |
Source code in src/solidworks_mcp/adapters/base.py
create_sweep
abstractmethod
async
¶
Create a sweep feature.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
params
|
SweepParameters
|
The params value. |
required |
Returns:
| Type | Description |
|---|---|
AdapterResult[SolidWorksFeature]
|
AdapterResult[SolidWorksFeature]: The result produced by the operation. |
Source code in src/solidworks_mcp/adapters/base.py
disconnect
abstractmethod
async
¶
exit_sketch
abstractmethod
async
¶
Exit sketch editing mode.
Returns:
| Type | Description |
|---|---|
AdapterResult[None]
|
AdapterResult[None]: The result produced by the operation. |
export_file
abstractmethod
async
¶
Export the current model to a file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
file_path
|
str
|
Path to the target file. |
required |
format_type
|
str
|
The format type value. |
required |
Returns:
| Type | Description |
|---|---|
AdapterResult[None]
|
AdapterResult[None]: The result produced by the operation. |
Source code in src/solidworks_mcp/adapters/base.py
export_image
abstractmethod
async
¶
Export a viewport screenshot (PNG/JPG) of the current model.
Payload keys: file_path (str): Absolute output path. width (int): Image width in pixels. height (int): Image height in pixels. view_orientation (str): One of "isometric", "front", "top", "right", "back", "bottom", "current".
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
payload
|
dict
|
The payload value. |
required |
Returns:
| Type | Description |
|---|---|
AdapterResult[dict]
|
AdapterResult[dict]: The result produced by the operation. |
Source code in src/solidworks_mcp/adapters/base.py
get_dimension
abstractmethod
async
¶
Get the value of a dimension.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
The name value. |
required |
Returns:
| Type | Description |
|---|---|
AdapterResult[float]
|
AdapterResult[float]: The result produced by the operation. |
Source code in src/solidworks_mcp/adapters/base.py
get_mass_properties
abstractmethod
async
¶
Get mass properties of the current model.
Returns:
| Type | Description |
|---|---|
AdapterResult[MassProperties]
|
AdapterResult[MassProperties]: The result produced by the operation. |
get_metrics ¶
Get adapter metrics.
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
dict[str, Any]: A dictionary containing the resulting values. |
get_model_info
abstractmethod
async
¶
Get metadata for the active model.
Returns:
| Type | Description |
|---|---|
AdapterResult[dict[str, Any]]
|
AdapterResult[dict[str, Any]]: The result produced by the operation. |
health_check
abstractmethod
async
¶
Get adapter health status.
Returns:
| Name | Type | Description |
|---|---|---|
AdapterHealth |
AdapterHealth
|
The result produced by the operation. |
is_connected
abstractmethod
¶
Check if connected to SolidWorks.
Returns:
| Name | Type | Description |
|---|---|---|
bool |
bool
|
True if connected, otherwise False. |
list_configurations
abstractmethod
async
¶
List configuration names for the active model.
Returns:
| Type | Description |
|---|---|
AdapterResult[list[str]]
|
AdapterResult[list[str]]: The result produced by the operation. |
list_features
abstractmethod
async
¶
List model features from the feature tree.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_suppressed
|
bool
|
The include suppressed value. Defaults to False. |
False
|
Returns:
| Type | Description |
|---|---|
AdapterResult[list[dict[str, Any]]]
|
AdapterResult[list[dict[str, Any]]]: The result produced by the operation. |
Source code in src/solidworks_mcp/adapters/base.py
open_model
abstractmethod
async
¶
Open a SolidWorks model (part, assembly, or drawing).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
file_path
|
str
|
Path to the target file. |
required |
Returns:
| Type | Description |
|---|---|
AdapterResult[SolidWorksModel]
|
AdapterResult[SolidWorksModel]: The result produced by the operation. |
Source code in src/solidworks_mcp/adapters/base.py
save_file
async
¶
Save the active model to the existing path or the provided path.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
file_path
|
str | None
|
Path to the target file. Defaults to None. |
None
|
Returns:
| Type | Description |
|---|---|
AdapterResult[Any]
|
AdapterResult[Any]: The result produced by the operation. |
Source code in src/solidworks_mcp/adapters/base.py
set_dimension
abstractmethod
async
¶
Set the value of a dimension.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
The name value. |
required |
value
|
float
|
The value value. |
required |
Returns:
| Type | Description |
|---|---|
AdapterResult[None]
|
AdapterResult[None]: The result produced by the operation. |
Source code in src/solidworks_mcp/adapters/base.py
sketch_circular_pattern
async
¶
Create a circular pattern of sketch entities around the sketch origin.
The rotation axis is always the sketch origin — SW's
CreateCircularSketchStepAndRepeat has no pattern-centre
parameter and derives the axis from the seed's geometry. Place
the seed entity at the desired radius from the origin.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
entities
|
list[str]
|
The entities value. |
required |
angle
|
float
|
The angle value. |
required |
count
|
int
|
The count value. |
required |
Returns:
| Type | Description |
|---|---|
AdapterResult[str]
|
AdapterResult[str]: The result produced by the operation. |
Source code in src/solidworks_mcp/adapters/base.py
sketch_linear_pattern
async
¶
sketch_linear_pattern(entities: list[str], direction_x: float, direction_y: float, spacing: float, count: int) -> AdapterResult[str]
Create a linear pattern of sketch entities.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
entities
|
list[str]
|
The entities value. |
required |
direction_x
|
float
|
The direction x value. |
required |
direction_y
|
float
|
The direction y value. |
required |
spacing
|
float
|
The spacing value. |
required |
count
|
int
|
The count value. |
required |
Returns:
| Type | Description |
|---|---|
AdapterResult[str]
|
AdapterResult[str]: The result produced by the operation. |
Source code in src/solidworks_mcp/adapters/base.py
sketch_mirror
async
¶
Mirror sketch entities about a mirror line.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
entities
|
list[str]
|
The entities value. |
required |
mirror_line
|
str
|
The mirror line value. |
required |
Returns:
| Type | Description |
|---|---|
AdapterResult[str]
|
AdapterResult[str]: The result produced by the operation. |
Source code in src/solidworks_mcp/adapters/base.py
sketch_offset
async
¶
sketch_offset(entities: list[str], offset_distance: float, reverse_direction: bool) -> AdapterResult[str]
Offset sketch entities.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
entities
|
list[str]
|
The entities value. |
required |
offset_distance
|
float
|
The offset distance value. |
required |
reverse_direction
|
bool
|
The reverse direction value. |
required |
Returns:
| Type | Description |
|---|---|
AdapterResult[str]
|
AdapterResult[str]: The result produced by the operation. |
Source code in src/solidworks_mcp/adapters/base.py
update_metrics ¶
Update adapter metrics.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
operation_time
|
float
|
The operation time value. |
required |
success
|
bool
|
The success value. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
None |
None
|
None. |
Source code in src/solidworks_mcp/adapters/base.py
Functions¶
_normalize_input ¶
Build internal normalize input.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
input_data
|
Any
|
The input data value. |
required |
model_type
|
type[TInput]
|
The model type value. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
TInput |
TInput
|
The result produced by the operation. |
Source code in src/solidworks_mcp/tools/export.py
register_export_tools
async
¶
Register export tools with FastMCP.
Registers comprehensive file export tools for SolidWorks automation supporting multiple industry-standard formats including neutral CAD formats, manufacturing formats, and documentation outputs.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mcp
|
FastMCP
|
The mcp value. |
required |
adapter
|
SolidWorksAdapter
|
Adapter instance used for the operation. |
required |
config
|
dict[str, Any]
|
Configuration values for the operation. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
int |
int
|
The computed numeric result. |
Example
Source code in src/solidworks_mcp/tools/export.py
361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 | |