validate_gcode
Check G-code syntax and basic safety before sending, catching temperature-limit violations, firmware commands and risky moves. Preview what a printer would accept or reject.
Instructions
Validate G-code syntax and basic safety (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: a newline-separated
string, or a list of command strings.
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
for a printer whose model Kiln does not know: temperatures are
judged against the same floor ``set_temperature`` holds that
printer to.
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": {
"commands": "<commands>"
},
"name": "validate_gcode"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| commands | Yes | One or more G-code commands: a newline-separated string, or a list of command strings. |