send_gcode
Send G-code commands to a printer
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": {
"printer_id": "<printer_id>"
},
"name": "send_gcode"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| gcode | No | Array of G-code commands to send. Either gcode, macro, macros, or snippet_id is required. | |
| macro | No | Predefined macro name to execute. Either gcode, macro, macros, or snippet_id is required. | |
| macros | No | Predefined macro names, sent as one G-code block in this order. Either gcode, macro, macros, or snippet_id is required. | |
| printer_id | Yes | The printer IDs (comma-separated for multiple) | |
| snippet_id | No | ID of a gcode snippet to send. Either gcode, macro, macros, or snippet_id is required. | |
| macro_context | No | Optional context data for macro execution. |