analyze_print_file
Extracts slicer metadata from a G-code file on your 3D printer—including material, print time, temperatures, layer height, and filament use—so you can identify what a meaningless filename will print.
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
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": {
"filename": "<filename>"
},
"name": "analyze_print_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filename | Yes | Name or path of the file as shown by ``printer_files()``. |