send_gcode
Send raw G-code commands directly to a 3D printer with built-in safety validation. Commands are checked for temperature limits and firmware modifications before execution.
Instructions
Send raw G-code commands directly to the printer.
Args:
commands: One or more G-code commands separated by newlines or spaces.
Examples: ``"G28"`` (home all axes), ``"G28\nG1 Z10 F300"``
(home then move Z up 10mm), ``"M104 S200"`` (set hotend to 200C).
dry_run: When ``True``, run the full validation pipeline (auth,
rate-limit, G-code safety) but do **not** actually send commands
to the printer. Returns what *would* have been sent.
The commands are sent sequentially in order. The printer must be
connected (unless ``dry_run`` is ``True``).
G-code is validated before sending. Commands that exceed temperature
limits or modify firmware settings are blocked. Use ``validate_gcode``
to preview what would be allowed without actually sending.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dry_run | No | ||
| commands | Yes |