Inspect a CNC program (G-code, Heidenhain)
nc_inspectInspect a CNC program (G-code, Heidenhain). Reads an NC program and returns the dialect, units, cutting and total extents, every tool with cutting length, feeds and speeds, an estimated run time and warnings for codes it does not know. Same engine as the NC viewer page. Use when: An agent has a G-code or Heidenhain program and needs its size, tools or run time. Not for: Collision checks with fixtures, machine travel limits, exact controller timing. File types: nc, gcode, gc, g, ngc, tap, cnc, h, i, mpf, spf, eia, iso, ptp, txt, din, anc. Max 30 MB.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "nc_inspect"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| options | No | Tool options, if any (see the tool description). | |
| file_url | No | Public https URL of the file (preferred). | |
| filename | No | File name with its extension, e.g. part.step. | |
| file_base64 | No | The file as base64, for small files without a URL (give filename too). |