analyze_print_file
Read G-code file headers on the printer to extract slicer metadata like material, print time, temperatures, and filament usage. Useful when filenames lack meaning.
Instructions
Analyze a G-code file on the printer and extract its metadata.
Reads the file header to extract slicer-embedded metadata such as
material type, estimated print time, temperatures, layer height,
and filament usage. This is especially useful when filenames are
meaningless (e.g. ``test5112.gcode``) and the agent needs to
understand what a file will print.
.. note::
For multi-object .gcode.3mf files, also consider using
``list_plate_objects()`` to see individual objects on the plate.
Args:
filename: Name or path of the file as shown by ``printer_files()``.
Returns a JSON object with:
- ``filename``: the file name
- ``metadata``: extracted metadata (material, time, temps, slicer, etc.)
- ``has_metadata``: whether any metadata was found
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filename | Yes |