Skip to main content
Glama

retry_print_with_fix

Destructive

Diagnose the last 3D print failure, merge recommended slicer fixes, re-validate the mesh, then re-slice and restart the print automatically.

Instructions

Diagnose the last print failure and re-slice + print with fixes.

        When a print fails, call this tool instead of manually chaining
        ``diagnose_print_failure_live`` → ``slice_and_print``.  It:

        1. Reads live printer state and analyses the model geometry to
           diagnose the failure (unless ``skip_diagnosis`` is True).
        2. Auto-detects the loaded material from the AMS when
           ``material`` is omitted and the printer supports it.
        3. Merges diagnosis-recommended slicer overrides with any
           ``custom_overrides`` you supply (your overrides win on
           conflict).
        4. Re-validates the mesh's printability before re-slicing.  A
           retry path that re-sends a broken mesh is the highest-
           value place to validate — the previous attempt already
           failed, and slicer overrides can't fix mesh-level issues.
           Bypass with ``skip_validation=True`` if the caller already
           validated.
        5. Re-slices the (possibly auto-repaired) mesh with the merged
           overrides, uploads the result, and starts the print.

        Args:
            keep_record: ``False`` only when the person asks for this print not to
                be kept ("print this privately", "don't keep a record of this");
                never suggest it.  Kiln then keeps nothing of the print once it
                ends, and the answer carries one line saying so.  ``True`` keeps it,
                for a start a team's rule held (``TEAM_KEEPS_PRINTS``) after the
                person agreed.  Omit otherwise: the print is kept the way the
                account says.
            mixed_nozzle_experiment: The person has said yes, for this print, to a slice refused
                with ``MULTI_NOZZLE_MIXED_SIZES`` (nozzles of different sizes at once, an
                experiment). Only on their yes, each time; ``slice_model`` says what follows.
            soft_nozzle_confirmed: The owner has said to print anyway a
                slice refused with ``ABRASIVE_ON_SOFT_NOZZLE`` (an
                abrasive filament through a nozzle on record that is not
                wear-resistant).  Only on their word, never on your own
                judgement.
            filament_map: Only for a printer with more than one nozzle:
                the nozzle (1 for the first) each filament prints from,
                one number per filament in filament order.  Leave unset
                to let the slicer choose; a map that does not fit is
                refused before slicing, as ``slice_model`` refuses it.
            model_path: Path to the model that failed (STL, OBJ, 3MF,
                STEP, ...).  One the diagnosis cannot read is said in
                ``printability_note``.
            printer_name: Target printer name.  Omit for the default
                printer.
            material: Filament material (e.g. ``"PLA"``, ``"ABS"``); the
                reslice is set for it (temperatures, melt rate,
                cooling).  Auto-detected from AMS when omitted.
            printer_id: Printer model ID for intelligence lookup
                (e.g. ``"bambu_a1"``).
            custom_overrides: JSON object of additional slicer overrides
                to merge on top of the diagnosis recommendations
                (e.g. ``'{"brim_width": "8"}'``).  Your values win on
                conflict.
            skip_diagnosis: If True, skip the failure diagnosis step and
                re-slice using only ``custom_overrides``.
            skip_validation: If True, bypass the pre-print mesh
                validation gate.  Defaults to False — designs are
                pre-tested for printability before the retry reaches
                the printer.
            placement: Where the part goes when the plate still holds
                the last print: ``[x, y]`` in mm, a named region
                (``"front-left"``, ``"centre"``, …), or ``"keep"``.
                Omitted, an occupied plate refuses before slicing and
                lists the spots that would work.
                The clearance verdict is always given; placing and
                starting a second print on an occupied plate is included
                where the plan carries it.
            preview_token: Token from ``issue_preview_token`` proving this
                model was shown to the person before printing.  Required
                beside their go-ahead: a print is shown to its owner
                before it starts.  Placed beside a part on the plate,
                the model is the same part, so the token and the yes
                for ``model_path`` cover it; a mesh the check repairs
                or rescales is another part, and the refusal names the
                file to show and ask about once.
        

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": {
      "model_path": "<model_path>"
    },
    "name": "retry_print_with_fix"
  }
}

Input Schema

NameRequiredDescriptionDefault
materialNoFilament material (e.g. ``"PLA"``, ``"ABS"``); the reslice is set for it (temperatures, melt rate, cooling). Auto-detected from AMS when omitted.
placementNoWhere the part goes when the plate still holds the last print: ``[x, y]`` in mm, a named region (``"front-left"``, ``"centre"``, …), or ``"keep"``. Omitted, an occupied plate refuses before slicing and lists the spots that would work. The clearance verdict is always given; placing and starting a second print on an occupied plate is included where the plan carries it.
model_pathYesPath to the model that failed (STL, OBJ, 3MF, STEP, ...). One the diagnosis cannot read is said in ``printability_note``.
printer_idNoPrinter model ID for intelligence lookup (e.g. ``"bambu_a1"``).
keep_recordNo``False`` only when the person asks for this print not to be kept ("print this privately", "don't keep a record of this"); never suggest it. Kiln then keeps nothing of the print once it ends, and the answer carries one line saying so. ``True`` keeps it, for a start a team's rule held (``TEAM_KEEPS_PRINTS``) after the person agreed. Omit otherwise: the print is kept the way the account says.
filament_mapNoOnly for a printer with more than one nozzle: the nozzle (1 for the first) each filament prints from, one number per filament in filament order. Leave unset to let the slicer choose; a map that does not fit is refused before slicing, as ``slice_model`` refuses it.
printer_nameNoTarget printer name. Omit for the default printer.
preview_tokenNoToken from ``issue_preview_token`` proving this model was shown to the person before printing. Required beside their go-ahead: a print is shown to its owner before it starts. Placed beside a part on the plate, the model is the same part, so the token and the yes for ``model_path`` cover it; a mesh the check repairs or rescales is another part, and the refusal names the file to show and ask about once.
skip_diagnosisNoIf True, skip the failure diagnosis step and re-slice using only ``custom_overrides``. Default: false.
skip_validationNoIf True, bypass the pre-print mesh validation gate. Defaults to False — designs are pre-tested for printability before the retry reaches the printer. Default: false.
custom_overridesNoJSON object of additional slicer overrides to merge on top of the diagnosis recommendations (e.g. ``'{"brim_width": "8"}'``). Your values win on conflict.
soft_nozzle_confirmedNoThe owner has said to print anyway a slice refused with ``ABRASIVE_ON_SOFT_NOZZLE`` (an abrasive filament through a nozzle on record that is not wear-resistant). Only on their word, never on your own judgement. Default: false.
mixed_nozzle_experimentNoThe person has said yes, for this print, to a slice refused with ``MULTI_NOZZLE_MIXED_SIZES`` (nozzles of different sizes at once, an experiment). Only on their yes, each time; ``slice_model`` says what follows. Default: false.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv1.6.0
    • addedInput schema / properties / filament_map
      Added value: +{
      +  "anyOf": [
      +    {
      +      "items": {
      +        "type": "integer"
      +      },
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Only for a printer with more than one nozzle: the nozzle (1 for the first) each filament prints from, one number per filament in filament order.  Leave unset to let the slicer choose; a map that does not fit is refused before slicing, as ``slice_model`` refuses it.",
      +  "title": "Filament Map"
      +}
    • addedInput schema / properties / keep_record
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "boolean"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "``False`` only when the person asks for this print not to be kept (\"print this privately\", \"don't keep a record of this\"); never suggest it.  Kiln then keeps nothing of the print once it ends, and the answer carries one line saying so.  ``True`` keeps it, for a start a team's rule held (``TEAM_KEEPS_PRINTS``) after the person agreed.  Omit otherwise: the print is kept the way the account says.",
      +  "title": "Keep Record"
      +}
    • addedInput schema / properties / mixed_nozzle_experiment
      Added value: +{
      +  "description": "The person has said yes, for this print, to a slice refused with ``MULTI_NOZZLE_MIXED_SIZES`` (nozzles of different sizes at once, an experiment). Only on their yes, each time; ``slice_model`` says what follows. Default: false.",
      +  "title": "Mixed Nozzle Experiment",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / preview_token / description
      Previous value: -"Token from ``issue_preview_token`` proving this model was shown to the person before printing.  Required beside their go-ahead: a print is shown to its owner before it starts."New value: +"Token from ``issue_preview_token`` proving this model was shown to the person before printing.  Required beside their go-ahead: a print is shown to its owner before it starts.  Placed beside a part on the plate, the model is the same part, so the token and the yes for ``model_path`` cover it; a mesh the check repairs or rescales is another part, and the refusal names the file to show and ask about once."
    • addedInput schema / properties / soft_nozzle_confirmed
      Added value: +{
      +  "description": "The owner has said to print anyway a slice refused with ``ABRASIVE_ON_SOFT_NOZZLE`` (an abrasive filament through a nozzle on record that is not wear-resistant).  Only on their word, never on your own judgement. Default: false.",
      +  "title": "Soft Nozzle Confirmed",
      +  "type": "boolean"
      +}
  2. Changed9 schema fields changedv1.5.1
    • addedInput schema / properties / custom_overrides / description
      Added value: +"JSON object of additional slicer overrides to merge on top of the diagnosis recommendations (e.g. ``'{\"brim_width\": \"8\"}'``).  Your values win on conflict."
    • addedInput schema / properties / material / description
      Added value: +"Filament material (e.g. ``\"PLA\"``, ``\"ABS\"``); the reslice is set for it (temperatures, melt rate, cooling).  Auto-detected from AMS when omitted."
    • addedInput schema / properties / model_path / description
      Added value: +"Path to the model that failed (STL, OBJ, 3MF, STEP, ...).  One the diagnosis cannot read is said in ``printability_note``."
    • addedInput schema / properties / placement / description
      Added value: +"Where the part goes when the plate still holds the last print: ``[x, y]`` in mm, a named region (``\"front-left\"``, ``\"centre\"``, …), or ``\"keep\"``. Omitted, an occupied plate refuses before slicing and lists the spots that would work. The clearance verdict is always given; placing and starting a second print on an occupied plate is included where the plan carries it."
    • addedInput schema / properties / preview_token / description
      Added value: +"Token from ``issue_preview_token`` proving this model was shown to the person before printing.  Required beside their go-ahead: a print is shown to its owner before it starts."
    • addedInput schema / properties / printer_id / description
      Added value: +"Printer model ID for intelligence lookup (e.g. ``\"bambu_a1\"``)."
    • addedInput schema / properties / printer_name / description
      Added value: +"Target printer name.  Omit for the default printer."
    • changedInput schema / properties / skip_diagnosis / description
      Previous value: -"Default: false."New value: +"If True, skip the failure diagnosis step and re-slice using only ``custom_overrides``. Default: false."
    • changedInput schema / properties / skip_validation / description
      Previous value: -"Default: false."New value: +"If True, bypass the pre-print mesh validation gate.  Defaults to False — designs are pre-tested for printability before the retry reaches the printer. Default: false."
  3. Changed11 schema fields changedv1.5.0
    • changedInput schema / properties / custom_overrides / anyOf
      Previous value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "additionalProperties": true,
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedInput schema / properties / custom_overrides / default
      Removed value: -null
    • removedInput schema / properties / material / default
      Removed value: -null
    • addedInput schema / properties / placement
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "items": {
      +        "type": "number"
      +      },
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "title": "Placement"
      +}
    • removedInput schema / properties / preview_token / default
      Removed value: -null
    • removedInput schema / properties / printer_id / default
      Removed value: -null
    • removedInput schema / properties / printer_name / default
      Removed value: -null
    • removedInput schema / properties / skip_diagnosis / default
      Removed value: -false
    • addedInput schema / properties / skip_diagnosis / description
      Added value: +"Default: false."
    • removedInput schema / properties / skip_validation / default
      Removed value: -false
    • addedInput schema / properties / skip_validation / description
      Added value: +"Default: false."
  4. Changed1 schema field changedv1.3.1
    • addedInput schema / properties / preview_token
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Preview Token"
      +}
  5. First observedv0.1.0

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already flag destructiveHint=true and readOnlyHint=false, but the description adds substantial context beyond that: the five-step sequence, the auto-repair/validation gate before re-slicing, the consent requirements for ``mixed_nozzle_experiment``, ``soft_nozzle_confirmed`` and ``preview_token``, and the privacy semantics of ``keep_record``. It also discloses refusal behavior (occupied plate, unfit filament map) that an agent cannot infer from the schema.

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

Conciseness3/5

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

The numbered workflow is front-loaded and easy to scan, but roughly two-thirds of the text is an Args section that duplicates schema descriptions word for word, adding length without information. The prose is also dense and clause-heavy in places (``preview_token``, ``placement``).

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?

For a 13-parameter destructive tool with no output schema, the description covers prerequisites, gating, side effects, and refusal cases well. What it does not fully sketch is the shape of the result (only fragments like ``printability_note`` and a one-line privacy note), leaving the agent to guess the return payload.

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%, so the schema already carries all 13 parameter meanings, and the Args block in the description reproduces those descriptions nearly verbatim. It adds a little connective nuance (e.g. the plate-occupancy refusal path for ``placement``), but the bulk is restatement rather than added meaning.

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

Purpose5/5

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

States a specific verb and resource (diagnose the last print failure, re-slice, and print with fixes) and explicitly names the sibling chain it replaces (``diagnose_print_failure_live`` → ``slice_and_print``). An agent can distinguish it from those siblings without opening either schema.

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

Usage Guidelines5/5

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

Explicitly says when to call it ("When a print fails, call this tool instead of manually chaining ...") and names the alternative it supersedes. It also documents the two escape hatches with conditions: ``skip_diagnosis`` when diagnosis is unnecessary and ``skip_validation`` only when the caller already validated.

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