Skip to main content
Glama

retry_print_with_fix

Destructive

Diagnose the last print failure, merge recommended slicer overrides, validate the mesh, re-slice, and start a corrected print.

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:
            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.
        

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"``).
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.
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.

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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."
  2. 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."
  3. Changed1 schema field changedv1.3.1
    • addedInput schema / properties / preview_token
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Preview Token"
      +}
  4. 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 only declare destructive/non-read-only; the description adds the actual pipeline (live state read, mesh analysis, AMS auto-detect, override merge precedence, re-validation gate, upload, print start) and the consent gate via preview_token. It also discloses a real failure mode: an occupied plate without placement refuses before slicing and lists valid spots.

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 pipeline is front-loaded and earns its place, but the Args section duplicates parameter descriptions already present in the schema character-for-character, inflating the definition. Several sentences (e.g. the mesh-validation rationale) are padded with justification prose an agent does not need to invoke the tool.

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 destructive 9-parameter tool with no output schema, the description covers the flow, override precedence, consent requirement, and refusal behavior on an occupied plate. It omits any description of what the tool returns or how partial failures (diagnosis succeeds, slicing fails) are reported, which matters for a multi-stage destructive operation.

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 parameters are already documented and the Args block largely restates the schema verbatim. The description does add a little meaning — why the validation gate exists ('a retry path that re-sends a broken mesh is the highest-value place to validate') and that custom overrides beat diagnosis recommendations — but the mechanical parameter facts add nothing beyond the schema.

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 concrete compound action ('diagnose the last print failure and re-slice + print with fixes') and explicitly positions itself against the sibling chain diagnose_print_failure_live → slice_and_print. An agent can distinguish it from analyse_print_failure, reslice_with_overrides, and start_print from the first sentence alone.

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?

Gives an explicit trigger ('when a print fails') and an explicit alternative it replaces, along with the conditions that alter that path (skip_diagnosis, skip_validation). The preview_token sentence states the consent precondition for printing.

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