servomotor-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| GEAROTONS_LIMITS | No | JSON object mapping motor alias to position/speed limits (e.g., '{"x":{"min_deg":-180,"max_deg":180,"max_speed":300}}'). | |
| GEAROTONS_SERIAL_PORT | No | Serial port path (e.g., /dev/ttyUSB0) required when backend is serial. | |
| GEAROTONS_MOTOR_ALIASES | No | Comma-separated alias allow-list for motors (e.g., 'x,y,z'). | |
| GEAROTONS_MOTOR_BACKEND | No | Backend type: 'mock' (default) or 'serial' for real hardware. | mock |
| GEAROTONS_MOCK_SIM_SECONDS | No | Simulated move duration in seconds for mock backend (e.g., '0.4'). |
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 |
|---|---|
| list_serial_portsA | List the serial ports on this computer so one can be chosen for Call this FIRST in any session. USB-RS485 adapters show up with a USB VID:PID and usually a telling description/manufacturer (FTDI, CH340, CP210x...). If several adapters are present, connect to the most likely one and check whether motors are detected; it is cheap to connect to another port and look again. Relay the options to the user in plain English if it is ambiguous. |
| connectA | Open a serial port (230400 baud) and auto-detect the motors on that RS-485 bus.
Detection reboots every motor on the bus (positions re-zero at the current shaft location, MOSFETs turn off) and takes ~3 s per attempt. If no motors are found, the adapter may be the wrong one — try another port. Connecting to a different port replaces the previous connection, but only once the new port opens successfully — a failed attempt leaves the old connection intact. |
| disconnectA | Close the serial port (e.g. to free it for another program, or before unplugging). |
| detect_devicesA | Re-scan the connected bus for motors using the firmware's "Detect devices" command. Use after plugging in / powering on motors, or when a motor seems missing. Runs
|
| list_motorsA | List the detected motors with live position, voltage, temperature, and status. Call after |
| move_toA | Move one motor to an ABSOLUTE angle in degrees and wait for it to finish. Use when the user names a target position ("go to 90 degrees", "one full turn" =
360). Angles are unbounded multi-turn (720 = two full turns). motor: an alias number (e.g. 88) or a 16-hex-digit unique ID from list_motors. |
| move_relativeA | Move one motor by a RELATIVE amount in degrees (+/-) and wait for it to finish. Use for "turn a bit more", "back off 10 degrees", or incremental jogging. Any
magnitude is allowed, including multiple full turns. motor: an alias number (e.g. 88) or a 16-hex-digit unique ID from list_motors. |
| stopA | Immediately halt one motor, or ALL motors if Use for "stop", "halt", or any sign something is wrong. Sends the firmware's
emergency stop: motion halts and the move queue empties; holding torque remains.
Use |
| get_motor_statusA | One motor's live snapshot: position, supply voltage, temperature, decoded status. Call after moves to CONFIRM completion, or when the user asks "where is it / is it
okay". Includes any fatal error decoded to plain English with suggested fixes
(clear faults with |
| run_sequenceA | Execute a choreographed sequence of steps, e.g. "draw a square" or "wave". Each step is one of: {"action": "move_to", "motor": "88", "degrees": 90, "speed_dps": 120} {"action": "move_relative", "motor": "88", "degrees": -30} {"action": "stop"} # motor optional -> all {"action": "wait", "seconds": 0.5} {"action": "command", "motor": "88", "name": "vibrate", "params": [1]} Steps run in order; "command" runs any raw catalog command by tool name. Returns the final state of every detected motor. |
| disable_mosfetsA | Disables the MOSFETS (note that MOSFETs are disabled after initial power on). [Firmware command "Disable MOSFETs", group: Basic Control.] Returns: success confirmation. motor: an alias number (e.g. 88), a 16-hex-digit unique ID (e.g. "0123456789ABCDEF"), or "all" to broadcast to every motor on the bus (broadcasts get no responses back). |
| enable_mosfetsA | Enables the MOSFETS. [Firmware command "Enable MOSFETs", group: Basic Control.] Returns: success confirmation. motor: an alias number (e.g. 88), a 16-hex-digit unique ID (e.g. "0123456789ABCDEF"), or "all" to broadcast to every motor on the bus (broadcasts get no responses back). |
| trapezoid_moveA | Move immediately to the given position using the currently set speed (the speed is set by a separate command) [Firmware command "Trapezoid move", group: Motion Control.] NOTE: The displacement is RELATIVE to the current position. This QUEUES the move and returns immediately; poll get_n_queued_items for completion, or use move_to/move_relative which wait. Requires enable_mosfets first. Parameters:
|
| set_maximum_velocityB | Sets maximum velocity (this is not used at this time) [Firmware command "Set maximum velocity", group: Configuration.] Parameters:
|
| go_to_positionA | Move to this new given position in the amount of time specified. Acceleration and deceleration will be applied to make the move smooth. [Firmware command "Go to position", group: Motion Control.] This QUEUES the move and returns immediately; poll get_n_queued_items for completion, or use move_to/move_relative which wait. Requires enable_mosfets first. Parameters:
|
| set_maximum_accelerationA | Sets max acceleration [Firmware command "Set maximum acceleration", group: Configuration.] Parameters:
|
| start_calibrationA | Starts a calibration, which will determine the average values of the hall sensors and will determine if they are working correctly [Firmware command "Start calibration", group: Configuration.] NOTE: The motor spins through a calibration routine; the shaft must be free to rotate. Takes some seconds; the motor won't respond until done. Returns: success confirmation. motor: an alias number (e.g. 88), a 16-hex-digit unique ID (e.g. "0123456789ABCDEF"), or "all" to broadcast to every motor on the bus (broadcasts get no responses back). |
| capture_hall_sensor_dataB | Start sending hall sensor data (work in progress; don't send this command) [Firmware command "Capture hall sensor data", group: Other.] Parameters:
|
| reset_timeA | Resets the absolute time to zero (call this first before issuing any movement commands) [Firmware command "Reset time", group: Basic Control.] Returns: success confirmation. motor: an alias number (e.g. 88), a 16-hex-digit unique ID (e.g. "0123456789ABCDEF"), or "all" to broadcast to every motor on the bus (broadcasts get no responses back). |
| get_current_timeA | Gets the current absolute time [Firmware command "Get current time", group: Status & Monitoring.] Returns:
|
| time_syncC | Sends the master time to the motor so that it can sync its own clock (do this 10 times per second). [Firmware command "Time sync", group: Device Management.] Parameters:
|
| get_n_queued_itemsA | Get the number of items currently in the movement queue (if this gets too large, don't queue any more movement commands) [Firmware command "Get n queued items", group: Status & Monitoring.] Returns:
|
| emergency_stopA | Emergency stop (stop all movement, disable MOSFETS, clear the queue) [Firmware command "Emergency stop", group: Basic Control.] Returns: success confirmation. motor: an alias number (e.g. 88), a 16-hex-digit unique ID (e.g. "0123456789ABCDEF"), or "all" to broadcast to every motor on the bus (broadcasts get no responses back). |
| zero_positionA | Make the current position the position zero (origin) [Firmware command "Zero position", group: Basic Control.] NOTE: Redefines the current shaft location as 0 degrees (no movement). Returns: success confirmation. motor: an alias number (e.g. 88), a 16-hex-digit unique ID (e.g. "0123456789ABCDEF"), or "all" to broadcast to every motor on the bus (broadcasts get no responses back). |
| homingA | Homing (or in other words, move until a crash and then stop immediately) [Firmware command "Homing", group: Motion Control.] NOTE: The motor moves until it hits a physical obstruction, then zeroes there. Ensure a hard stop exists within maxDistance. Parameters:
|
| get_hall_sensor_positionB | Get the position as measured by the hall sensors (this should be the actual position of the motor and if everything is ok then it will be about the same as the desired position) [Firmware command "Get hall sensor position", group: Status & Monitoring.] Returns:
|
| get_statusA | Gets the status of the motor [Firmware command "Get status", group: Status & Monitoring.] Returns:
|
| go_to_closed_loopB | Go to closed loop position control mode [Firmware command "Go to closed loop", group: Motion Control.] Returns: success confirmation. motor: an alias number (e.g. 88), a 16-hex-digit unique ID (e.g. "0123456789ABCDEF"), or "all" to broadcast to every motor on the bus (broadcasts get no responses back). |
| get_product_specsA | Get the update frequency (reciprocal of the time step) [Firmware command "Get product specs", group: Device Management.] Returns:
|
| move_with_accelerationA | Rotates the motor with the specified acceleration [Firmware command "Move with acceleration", group: Motion Control.] This QUEUES the move and returns immediately; poll get_n_queued_items for completion, or use move_to/move_relative which wait. Requires enable_mosfets first. Parameters:
|
| set_device_aliasA | Sets device alias [Firmware command "Set device alias", group: Device Management.] NOTE: Changes how the motor is addressed (takes effect immediately). Re-run detect_devices afterwards. Parameters:
|
| get_product_infoC | Get product information [Firmware command "Get product info", group: Device Management.] Returns:
|
| firmware_upgradeA | This command will upgrade the flash memory of the servo motor. Before issuing a firmware upgrade command, you must do some calculations as shown in the examples. [Firmware command "Firmware upgrade", group: Device Management.] NOTE: Flashes a firmware page (hex-encoded bytes). Wrong data can brick the motor. Only use with a valid firmware file and the user's explicit go-ahead. Parameters:
|
| get_product_descriptionB | Get the product description. [Firmware command "Get product description", group: Device Management.] Returns:
|
| get_firmware_versionA | Get the firmware version or the bootloader version depending on what mode we are in. This command also returns the status bits, where the least significan bit teels us if we are currently in the bootloader (=1) or the main firmware (=0) [Firmware command "Get firmware version", group: Device Management.] Returns:
|
| move_with_velocityA | Rotates the motor with the specified velocity. [Firmware command "Move with velocity", group: Motion Control.] This QUEUES the move and returns immediately; poll get_n_queued_items for completion, or use move_to/move_relative which wait. Requires enable_mosfets first. Parameters:
|
| system_resetA | System reset / go to the bootloader. The motor will reset immediately and will enter the bootloader. If there is no command sent within a short time, the motor will exit the bootloader and run the application from the beginning. [Firmware command "System reset", group: Basic Control.] NOTE: Reboots the motor (~2 s): position re-zeroes at the current shaft location, MOSFETs disable, fatal errors clear. Returns: success confirmation. motor: an alias number (e.g. 88), a 16-hex-digit unique ID (e.g. "0123456789ABCDEF"), or "all" to broadcast to every motor on the bus (broadcasts get no responses back). |
| set_maximum_motor_currentA | Set the maximum motor current and maximum regeneration current. The values take effect immediately but are not saved to non-volatile memory, so they revert to the firmware default after a reset. [Firmware command "Set maximum motor current", group: Configuration.] NOTE: Higher current = more torque AND more heat; excessive settings can overheat the motor. Parameters:
|
| multimoveA | The multimove command allows you to compose multiple moves one after another. Please note that when the queue becomes empty after all the moves are executed and the motor is not at a standstill then a fatal error will be triggered. [Firmware command "Multimove", group: Motion Control.] NOTE: moveList is a list of [value, duration_seconds] pairs (max 32): value is degrees/s^2 for acceleration moves (moveTypes bit = 0) or degrees/s for velocity moves (bit = 1); this server converts to firmware units. The final move must bring the motor to a standstill or the firmware raises a fatal error when the queue empties. This QUEUES the move and returns immediately; poll get_n_queued_items for completion, or use move_to/move_relative which wait. Requires enable_mosfets first. Parameters:
|
| set_safety_limitsB | Set safety limits (to prevent motion from exceeding set bounds) [Firmware command "Set safety limits", group: Configuration.] NOTE: Sets firmware position limits; moves beyond them fault the motor. Parameters:
|
| pingB | Send a payload containing any data and the device will respond with the same data back [Firmware command "Ping", group: Device Management.] Parameters:
|
| control_hall_sensor_statisticsA | Turn on or off the gathering of statistics for the hall sensors and reset the statistics [Firmware command "Control hall sensor statistics", group: Status & Monitoring.] Parameters:
|
| get_hall_sensor_statisticsA | Read back the statistics gathered from the hall sensors. Useful for checking the hall sensor health and noise in the system. [Firmware command "Get hall sensor statistics", group: Status & Monitoring.] Returns:
|
| get_positionA | Get the current desired position (which may differ a bit from the actual position as measured by the hall sensors) [Firmware command "Get position", group: Status & Monitoring.] Returns:
|
| read_multipurpose_bufferA | Read whatever is in the multipurpose buffer (the buffer is used for data generated during calibration, going to closed loop mode, and when capturing hall sensor data) [Firmware command "Read multipurpose buffer", group: Other.] Returns:
|
| test_modeA | Set or trigger a certain test mode. This is a bit undocumented at the moment. Don't use this unless you are a developer working on test cases. Notable modes: 0 = clear all test modes; 1-9 = motor test modes; 10-13 = LED test modes (locks up the device); 14-73 = trigger fatal errors 0-59; 74 = set the overvoltage-protection threshold to 22 V (production test, should trip on a 24 V supply); 75 = set the overvoltage-protection threshold to 26 V (production test, should not trip on a 24 V supply). A system reset restores the default overvoltage threshold. [Firmware command "Test mode", group: Configuration.] NOTE: Developer/diagnostic modes; behavior depends on firmware internals. Parameters:
|
| get_comprehensive_positionA | Get the desired motor position, hall sensor position, and external encoder position all in one shot [Firmware command "Get comprehensive position", group: Status & Monitoring.] Returns:
|
| get_supply_voltageA | Get the measured voltage of the power supply. [Firmware command "Get supply voltage", group: Status & Monitoring.] Returns:
|
| get_max_pid_errorA | Get the minimum and maximum error value ovserved in the PID control loop since the last read. [Firmware command "Get max PID error", group: Status & Monitoring.] Returns:
|
| vibrateB | Cause the motor to start to vary the voltage quickly and therefore to vibrate (or stop). [Firmware command "Vibrate", group: Device Management.] Parameters:
|
| identifyA | Identify your motor by sending this command. The motor's green LED will flash rapidly for 3 seconds. [Firmware command "Identify", group: Device Management.] Returns: success confirmation. motor: an alias number (e.g. 88), a 16-hex-digit unique ID (e.g. "0123456789ABCDEF"), or "all" to broadcast to every motor on the bus (broadcasts get no responses back). |
| get_temperatureA | Get the measured temperature of the motor. [Firmware command "Get temperature", group: Status & Monitoring.] Returns:
|
| set_pid_constantsB | Set PID constants for the control loop that will try to maintain the motion trajectory. [Firmware command "Set PID constants", group: Configuration.] NOTE: Bad gains can make the motor oscillate violently. Parameters:
|
| set_max_allowable_position_deviationA | Set the amount of microsteps that the actual motor position (as measured by the hall sensors) is allowed to deviate from the desired position. Throw a fatal error if this is exceeded. [Firmware command "Set max allowable position deviation", group: Configuration.] Parameters:
|
| get_debug_valuesB | Get debug values including motor control parameters, profiler times, hall sensor data, and other diagnostic information. [Firmware command "Get debug values", group: Status & Monitoring.] Returns:
|
| crc32_controlA | Enable or disable CRC32 checking for commands [Firmware command "CRC32 control", group: Configuration.] NOTE: Changes protocol framing for ALL subsequent commands; only disable CRC32 if you know why. Parameters:
|
| get_communication_statisticsA | Get and optionally reset the CRC32 error counter [Firmware command "Get communication statistics", group: Status & Monitoring.] Parameters:
|
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 57 tools
The tool set has significant overlap among movement commands (move_to, go_to_position, move_relative, trapezoid_move, move_with_velocity, move_with_acceleration, multimove) and position getters (get_position, get_hall_sensor_position, get_comprehensive_position). Although descriptions clarify queue-vs-wait and absolute-vs-relative behavior, an agent could easily select the wrong tool. Many status/device-management tools are distinct, but the same action is exposed through multiple similar command names.
Most tools follow a consistent verb_noun snake_case pattern (get_, set_, enable_, disable_, move_, etc.). There are minor deviations like 'multimove' instead of 'multi_move', 'trapezoid_move' instead of 'move_trapezoid', and bare verbs ('stop', 'ping', 'identify'}), but the overall style is readable and predictable enough.
57 tools is far more than an agent can efficiently handle for a motor control domain. Many are low-level firmware directives (e.g. capture_hall_sensor_data, test_mode, crc32_control, get_debug_values) that add little to typical use cases and bloat the API surface. The count feels like a raw protocol dump rather than a curated MCP surface.
The tool set thoroughly covers the motor lifecycle: connection, detection, high-level moves, queued low-level moves, homing, calibration, status/telemetry, safety limits, error recovery, and device management. It is reasonably complete for a motor-control server, with minor gaps like a dedicated set-saved-configuration command and high-level helper for complex motion expressed through raw commands.