validate_gcode
Validate G-code syntax and basic safety, returning parsed commands, errors, warnings, and blocked commands to preview what send_gcode would accept or reject.
Instructions
Validate G-code syntax and basic safety (generic, no printer-specific limits).
For printer-specific safety validation (PTFE temp caps, speed limits),
use ``validate_gcode_safe`` with a ``printer_id`` instead.
Args:
commands: One or more G-code commands separated by newlines.
Returns a JSON object with:
- ``valid``: whether all commands passed safety checks
- ``commands``: the parsed command list
- ``errors``: blocking issues (temperature limits, firmware commands)
- ``warnings``: non-blocking advisories (Z below bed, high feedrate)
- ``blocked_commands``: specific commands that were blocked
Use this to preview what ``send_gcode`` would accept or reject.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| commands | Yes |