Skip to main content
Glama

preflight_check

Read-only

Verify printer readiness and local or remote print-file safety before starting a print, catching connection, temperature, material, and file issues early.

Instructions

Run pre-print safety checks to verify the printer is ready.

Checks performed:
- Printer is connected and operational
- Printer is not currently printing
- No error flags are set
- Temperatures are within safe limits
- (Optional) Material loaded matches expected material
- (Optional) Local G-code file is valid and readable
- (Optional) Remote file exists on the printer
- (Optional) For a model file (STL, OBJ, 3MF, STEP, GLB), whether the
  part prints: this fails exactly where the print door would refuse the
  file, and passes wherever the door would print it.
- Multi-material: what unit the printer carries (AMS, a Klipper MMU)
  and, with ``file_path``, whether the file's filaments are loaded.
  Advisory for a unit Kiln drives (the print gate decides at start);
  a FAILURE when a multi-filament file needs more colours than a
  unit Kiln does not drive has loaded — that print comes out wrong
  and nothing downstream stops it.  Absent for a single-feed printer;
  a read that failed is reported as such, never as "no unit".

Args:
    file_path: Optional path to a local print file (``.gcode``,
        ``.gco``, ``.g`` or ``.3mf``) to validate before upload; a model
        file (STL, OBJ, STEP) fails the ``file_valid`` check.  If
        omitted, only printer-state checks are performed.
    expected_material: Optional material type (e.g. "PLA", "ABS", "PETG").
        If provided and a material is loaded, checks for a mismatch.

    remote_file: Optional filename to verify exists on the printer.
        If provided, checks the printer's file list for a matching file.
    accept_paused: When ``True``, the ``printer_idle`` check wants
        the ``paused`` state instead of ``idle``: a resume continues a
        paused job, so an idle printer has nothing to resume.  Used by
        ``start_print`` for a resume the printer has backed.
        Default ``False`` — only ``idle`` is accepted.
    start_door_gates_plate: Set by Kiln's own start doors, which judge
        the plate themselves (with the resume and print-beside-a-part
        exceptions) before they run this check.  Leave it unset: then
        this check asks the plate question a start would, so it is
        answered before the start instead of as a refusal after it.
    printer_name: Which printer to check.  Omit for the default
        printer.
        The state, the temperature ceilings and the material profile
        all follow the named machine — a readiness verdict is about
        one printer, and it has to be the printer that will print.

Call this before ``start_print()`` to catch problems early.  The result
includes a ``ready`` boolean and detailed per-check breakdowns.

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": "preflight_check"
  }
}

Input Schema

NameRequiredDescriptionDefault
file_pathNoOptional path to a local print file (``.gcode``, ``.gco``, ``.g`` or ``.3mf``) to validate before upload; a model file (STL, OBJ, STEP) fails the ``file_valid`` check. If omitted, only printer-state checks are performed.
remote_fileNoOptional filename to verify exists on the printer. If provided, checks the printer's file list for a matching file.
printer_nameNoWhich printer to check. Omit for the default printer. The state, the temperature ceilings and the material profile all follow the named machine — a readiness verdict is about one printer, and it has to be the printer that will print.
accept_pausedNoWhen ``True``, the ``printer_idle`` check wants the ``paused`` state instead of ``idle``: a resume continues a paused job, so an idle printer has nothing to resume. Used by ``start_print`` for a resume the printer has backed. Default ``False`` — only ``idle`` is accepted. Default: false.
expected_materialNoOptional material type (e.g. "PLA", "ABS", "PETG"). If provided and a material is loaded, checks for a mismatch.
start_door_gates_plateNoSet by Kiln's own start doors, which judge the plate themselves (with the resume and print-beside-a-part exceptions) before they run this check. Leave it unset: then this check asks the plate question a start would, so it is answered before the start instead of as a refusal after it. Default: false.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.6.0
    • changedInput schema / properties / accept_paused / description
      Previous value: -"When ``True``, the ``printer_idle`` check accepts the ``paused`` state in addition to ``idle``.  Used by ``start_print(resume_from_paused=True)`` for mid-print resume 3MFs (which start from a paused-state printer). Default ``False`` — only ``idle`` is accepted. Default: false."New value: +"When ``True``, the ``printer_idle`` check wants the ``paused`` state instead of ``idle``: a resume continues a paused job, so an idle printer has nothing to resume.  Used by ``start_print`` for a resume the printer has backed. Default ``False`` — only ``idle`` is accepted. Default: false."
  2. Changed6 schema fields changedv1.5.1
    • changedInput schema / properties / accept_paused / description
      Previous value: -"Default: false."New value: +"When ``True``, the ``printer_idle`` check accepts the ``paused`` state in addition to ``idle``.  Used by ``start_print(resume_from_paused=True)`` for mid-print resume 3MFs (which start from a paused-state printer). Default ``False`` — only ``idle`` is accepted. Default: false."
    • addedInput schema / properties / expected_material / description
      Added value: +"Optional material type (e.g. \"PLA\", \"ABS\", \"PETG\"). If provided and a material is loaded, checks for a mismatch."
    • addedInput schema / properties / file_path / description
      Added value: +"Optional path to a local print file (``.gcode``, ``.gco``, ``.g`` or ``.3mf``) to validate before upload; a model file (STL, OBJ, STEP) fails the ``file_valid`` check.  If omitted, only printer-state checks are performed."
    • addedInput schema / properties / printer_name / description
      Added value: +"Which printer to check.  Omit for the default printer. The state, the temperature ceilings and the material profile all follow the named machine — a readiness verdict is about one printer, and it has to be the printer that will print."
    • addedInput schema / properties / remote_file / description
      Added value: +"Optional filename to verify exists on the printer. If provided, checks the printer's file list for a matching file."
    • addedInput schema / properties / start_door_gates_plate
      Added value: +{
      +  "description": "Set by Kiln's own start doors, which judge the plate themselves (with the resume and print-beside-a-part exceptions) before they run this check.  Leave it unset: then this check asks the plate question a start would, so it is answered before the start instead of as a refusal after it. Default: false.",
      +  "title": "Start Door Gates Plate",
      +  "type": "boolean"
      +}
  3. Changed6 schema fields changedv1.5.0
    • removedInput schema / properties / accept_paused / default
      Removed value: -false
    • addedInput schema / properties / accept_paused / description
      Added value: +"Default: false."
    • removedInput schema / properties / expected_material / default
      Removed value: -null
    • removedInput schema / properties / file_path / default
      Removed value: -null
    • removedInput schema / properties / printer_name / default
      Removed value: -null
    • removedInput schema / properties / remote_file / default
      Removed value: -null
  4. Changed1 schema field changedv1.3.1
    • addedInput schema / properties / printer_name
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Printer Name"
      +}
  5. First observedv0.1.0

TDQS

A4.1/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already establish readOnlyHint=true and destructiveHint=false, and the description goes well beyond that: it discloses the precise failure semantics of the multi-material check (advisory for a unit Kiln drives, a hard FAILURE when filament count exceeds what an undriven unit has loaded), that a failed read is never reported as 'no unit', and that model files (STL/OBJ/STEP) fail the file_valid check rather than erroring. That is exactly the kind of consequence-level detail annotations cannot convey.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose and check list are front-loaded in a scannable bullet block, and the Args section is clearly delimited. It runs long, and a few passages (the multi-material paragraph, the trailing clause 'a readiness verdict is about one printer, and it has to be the printer that will print') are more editorialising than specification, but most sentences carry real information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description correctly closes the loop by stating that the result includes a `ready` boolean and detailed per-check breakdowns, and it documents every parameter. The exact shape of the per-check breakdown is left vague, which is the only meaningful gap for a six-parameter diagnostic tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% and all six parameters are documented in the schema itself; the description's Args block reproduces the schema text almost verbatim, so it adds little meaning beyond it. The baseline 3 applies, with the caveat that the duplication is wasted space rather than misinformation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb and resource ('Run pre-print safety checks') and then enumerates exactly which checks are performed, so an agent knows precisely what the tool validates. It does not, however, distinguish itself from similarly named read-only siblings such as check_print_readiness or check_printer_health, which an agent could easily confuse it with.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives a clear trigger ('Call this before start_print() to catch problems early') and explains conditional behaviour — file_path omitted means printer-state-only checks, accept_paused is for the resume path used by start_print, and start_door_gates_plate should be left unset by callers. It stops short of stating when to prefer it over the neighbouring readiness/health checks, so the alternative-selection guidance is incomplete.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools