solidworks_mcp.adapters.complexity_analyzer¶
solidworks_mcp.adapters.complexity_analyzer ¶
Complexity analysis for routing operations between COM and VBA paths.
Classes¶
ComplexityAnalyzer ¶
Analyze operation complexity and recommend COM or VBA execution path.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
parameter_threshold
|
int
|
The parameter threshold value. Defaults to 12. |
12
|
score_threshold
|
float
|
The score threshold value. Defaults to 0.6. |
0.6
|
Attributes:
| Name | Type | Description |
|---|---|---|
_parameter_threshold |
Any
|
The parameter threshold value. |
_score_threshold |
Any
|
The score threshold value. |
Initialize analyzer state.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
parameter_threshold
|
int
|
The parameter threshold value. Defaults to 12. |
12
|
score_threshold
|
float
|
The score threshold value. Defaults to 0.6. |
0.6
|
Returns:
| Name | Type | Description |
|---|---|---|
None |
None
|
None. |
Source code in src/solidworks_mcp/adapters/complexity_analyzer.py
Functions¶
analyze ¶
Produce a routing recommendation for an operation call.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
operation
|
str
|
Callable object executed by the helper. |
required |
payload
|
object
|
The payload value. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
RoutingDecision |
RoutingDecision
|
The result produced by the operation. |
Source code in src/solidworks_mcp/adapters/complexity_analyzer.py
record_result ¶
Record operation outcome for future routing influence.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
operation
|
str
|
Callable object executed by the helper. |
required |
route
|
str
|
The route value. |
required |
success
|
bool
|
The success value. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
None |
None
|
None. |
Source code in src/solidworks_mcp/adapters/complexity_analyzer.py
OperationProfile
dataclass
¶
Complexity profile metadata for an operation.
Attributes:
| Name | Type | Description |
|---|---|---|
base_complexity |
float
|
The base complexity value. |
name |
str
|
The name value. |
vba_preferred |
bool
|
The vba preferred value. |
RoutingDecision ¶
Bases: BaseModel
Complexity-based routing decision.
Attributes:
| Name | Type | Description |
|---|---|---|
complexity_score |
float
|
The complexity score value. |
operation |
str
|
The operation value. |
parameter_count |
int
|
The parameter count value. |
prefer_vba |
bool
|
The prefer vba value. |
reason |
str
|
The reason value. |