send_gcode
Sends one G-code line to a connected 3D printer and returns the firmware response, enabling motion, heating, calibration, or EEPROM commands. Unavailable while printing.
Instructions
Send any G-code line to the printer (motion, heating, calibration, saving to EEPROM...) and return the firmware's reply. Explain to the user what it does and wait for confirmation first. Not available while printing.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"gcode": "<gcode>"
},
"name": "send_gcode"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| gcode | Yes | One line of G-code, e.g. M115 | |
| timeout | No | Maximum seconds to wait for the printer's ok |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |