send_gcode
Send up to 20 lines of allowlisted G-code to a Bambu Lab printer for movement, homing, temperature, fan, speed, or flow changes; during prints, only temp/fan/speed commands are permitted.
Instructions
Send up to 20 lines of G-code. Only a safe allowlist is accepted (moves, homing, temps within model limits, fans, speed/flow). Not allowed during a print unless it is a temp/fan/speed command.
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 | ||
| printer_id | No | Printer id; may be omitted when only one printer is configured |