solidworks_mcp.selftest.results¶
solidworks_mcp.selftest.results ¶
What a selftest run produces: checks, area results, and the tool caller.
Classes¶
AreaResult
dataclass
¶
Check
dataclass
¶
Check(name: str, expected: Any, measured: Any, tolerance: Any = None, unit: str = '', passed: bool | None = None)
One value read back from SolidWorks against the hand calculation.
passed is None when the value could not be measured, which
counts as a failure.
Outcome ¶
Bases: StrEnum
An area's result.
ToolCaller ¶
Call MCP tools by name with dict input, as a client does; log each call.
Wrap a connected fastmcp.Client.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
client
|
Any
|
The client, already entered. |
required |
Source code in src/solidworks_mcp/selftest/results.py
Methods:¶
__call__
async
¶
Call name and return its reply; raise when it reports an error.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
The tool's name. |
required |
args
|
dict[str, Any] | None
|
Its input, sent as |
None
|
record
|
bool
|
Whether the call is listed in the report. |
True
|
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
dict[str, Any]: The tool's reply. |
Raises:
| Type | Description |
|---|---|
ToolFailed
|
The tool replied with |
Source code in src/solidworks_mcp/selftest/results.py
ToolFailed ¶
Bases: Exception
A tool call returned status: error.
Remember which tool failed and its message.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tool
|
str
|
The tool's name. |
required |
message
|
str
|
The tool's error message. |
required |
Source code in src/solidworks_mcp/selftest/results.py
Methods:¶
Functions:¶
tool_reply ¶
A FastMCP client's tool result as the payload dict an agent sees.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
result
|
Any
|
The |
required |
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
dict[str, Any]: The tool's reply. |