resonance.mcp.tools.motor_tools¶
resonance.mcp.tools.motor_tools
¶
MCP tools for motor positions and status.
list_motors()
async
¶
List all available motor names.
Returns:
| Type | Description |
|---|---|
dict
|
Response with motors list |
get_motor_positions(motors=None)
async
¶
Get current positions for motors.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
motors
|
list[str] | None
|
List of motor names to get positions for. If None or empty, gets all motors. |
None
|
Returns:
| Type | Description |
|---|---|
dict
|
Response with motor positions |
Raises:
| Type | Description |
|---|---|
RuntimeError
|
If server communication fails |
ValueError
|
If invalid motor names are provided |
Source code in src/resonance/mcp/tools/motor_tools.py
get_motor_status(motors=None)
async
¶
Get full status for motors including position, goal, and status bits.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
motors
|
list[str] | None
|
List of motor names to get status for. If None or empty, gets all motors. |
None
|
Returns:
| Type | Description |
|---|---|
dict
|
Response with motor status information |
Raises:
| Type | Description |
|---|---|
RuntimeError
|
If server communication fails |
ValueError
|
If invalid motor names are provided |