send_gcode
Send G-code commands to control CNC machine movement and operations through the CNCjs server. Execute precise toolpaths by transmitting single or multiple G-code instructions to GRBL-based machines.
Instructions
Send one or more G-code lines to the machine. HIGH RISK — causes physical motion.
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 | G-code line(s) to send (string or array of strings) |