Skip to main content
Glama

run_reslice_and_print

Destructive

Reslices a model with custom slicer overrides and prints it, letting you retry with adjusted settings such as speed, brim, infill, or temperature.

Instructions

Reslice with custom slicer overrides + print (use for retries with adjusted settings).

Use this when you need to tweak slicer parameters (speed, brim, infill, temps).
For standard prints without overrides, use ``run_quick_print`` instead.
One-shot pipeline: validate mesh → resolve profile with overrides →
slice → safety check → upload to printer → start print.

The overrides parameter is a JSON string of PrusaSlicer INI key-value pairs:
  {"brim_width": "8", "perimeter_speed": "30", "fill_density": "25%"}

Common override keys:
  Adhesion: brim_width (mm), skirts (count)
  Temperature: temperature, bed_temperature (degrees C)
  Speed: perimeter_speed, infill_speed, first_layer_speed (mm/s)
  Structure: fill_density (%), fill_pattern, layer_height (mm)
  Support: support_material (0/1)

Requires PrusaSlicer or OrcaSlicer installed locally.
The printer must be idle and connected.

Args:
    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.  The slice step's
        ``soft_nozzle`` says which filament goes through which nozzle.
    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 (``[2, 1]`` puts filament 1 on
        nozzle 2).  Leave unset to let the slicer map the filaments.  A
        map that does not fit the print or the printer is refused before
        slicing, as ``slice_model`` refuses it.
    model_path: Path to input model (STL, 3MF, STEP, OBJ).
    printer_name: Registered printer name in fleet.
    printer_id: Printer model ID for auto-profile selection
        (e.g. ``"ender3"``, ``"bambu_x1c"``, ``"klipper_generic"``).
    overrides: JSON string of PrusaSlicer INI key-value pairs to override.
    profile_path: Explicit slicer profile. Overrides printer_id auto-selection.
    slicer_path: Explicit path to the slicer binary.
    material: Filament material (e.g. ``"PLA"``).  It sets the slice's
        temperatures, melt rate and cooling -- a setting you also pass in
        ``overrides`` stays yours -- and its density weighs the print
        (omitted: the spool the printer reports loaded, then PLA — the
        slice step says which).
        For fully-auto raw-gcode reslices, AMS routing prefers a loaded
        tray of this material.  (3MF plates carry their own filament
        map, so routing defers to the adapter there.)
    use_ams: Enable AMS filament feeding (Bambu printers). If omitted,
        auto-detected from 3MF metadata.
    ams_mapping: JSON string of AMS slot indices (e.g. ``"[0, 2]"``).
        Maps each extruder/filament to an AMS tray position.
    skip_validation: Bypass the mesh-level pre-print validation step.
        Defaults to False — designs are pre-tested for printability
        before they reach 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 at the slice step and lists the spots that would work.
    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.
    version_id: The kept design version the model is, when there is one,
        so the print's record lands on that version's history (with
        ``design_id`` / ``branch_id``, as ``start_print`` takes them).
    design_id: The kept design the model belongs to.
    branch_id: The design branch the version is on.
    in_place_of: The plastic this print stands in for, when it is sliced
        for a loaded one instead (a spool-swap choice): kept with
        ``material`` on the print's own record.

INLINE 3D STAGE: on success this tool opens Kiln's interactive 3D stage — an inline viewer panel the user can orbit, zoom, and turn over — in hosts that render MCP Apps panels (Kiln's hosted connection attaches a browser stage link for hosts that don't). Oversized meshes are decimated automatically for the stage; the PNG preview is the floor, not the whole experience.

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

Input Schema

NameRequiredDescriptionDefault
use_amsNoEnable AMS filament feeding (Bambu printers). If omitted, auto-detected from 3MF metadata.
materialNoFilament material (e.g. ``"PLA"``). It sets the slice's temperatures, melt rate and cooling -- a setting you also pass in ``overrides`` stays yours -- and its density weighs the print (omitted: the spool the printer reports loaded, then PLA — the slice step says which). For fully-auto raw-gcode reslices, AMS routing prefers a loaded tray of this material. (3MF plates carry their own filament map, so routing defers to the adapter there.)
branch_idNoThe design branch the version is on.
design_idNoThe kept design the model belongs to.
overridesNoJSON string of PrusaSlicer INI key-value pairs to override.
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 at the slice step and lists the spots that would work.
model_pathYesPath to input model (STL, 3MF, STEP, OBJ).
printer_idNoPrinter model ID for auto-profile selection (e.g. ``"ender3"``, ``"bambu_x1c"``, ``"klipper_generic"``).
version_idNoThe kept design version the model is, when there is one, so the print's record lands on that version's history (with ``design_id`` / ``branch_id``, as ``start_print`` takes them).
ams_mappingNoJSON string of AMS slot indices (e.g. ``"[0, 2]"``). Maps each extruder/filament to an AMS tray position.
in_place_ofNoThe plastic this print stands in for, when it is sliced for a loaded one instead (a spool-swap choice): kept with ``material`` on the print's own record.
slicer_pathNoExplicit path to the slicer binary.
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 (``[2, 1]`` puts filament 1 on nozzle 2). Leave unset to let the slicer map the filaments. A map that does not fit the print or the printer is refused before slicing, as ``slice_model`` refuses it.
printer_nameNoRegistered printer name in fleet.
profile_pathNoExplicit slicer profile. Overrides printer_id auto-selection.
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_validationNoBypass the mesh-level pre-print validation step. Defaults to False — designs are pre-tested for printability before they reach the printer. Default: false.
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. The slice step's ``soft_nozzle`` says which filament goes through which nozzle. 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. Changed7 schema fields changedv1.6.0
    • addedInput schema / properties / branch_id
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "The design branch the version is on.",
      +  "title": "Branch Id"
      +}
    • addedInput schema / properties / design_id
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "The kept design the model belongs to.",
      +  "title": "Design Id"
      +}
    • 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 (``[2, 1]`` puts filament 1 on nozzle 2).  Leave unset to let the slicer map the filaments.  A map that does not fit the print or the printer is refused before slicing, as ``slice_model`` refuses it.",
      +  "title": "Filament Map"
      +}
    • addedInput schema / properties / in_place_of
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "The plastic this print stands in for, when it is sliced for a loaded one instead (a spool-swap choice): kept with ``material`` on the print's own record.",
      +  "title": "In Place Of"
      +}
    • 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"
      +}
    • 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.  The slice step's ``soft_nozzle`` says which filament goes through which nozzle. Default: false.",
      +  "title": "Soft Nozzle Confirmed",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / version_id
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "The kept design version the model is, when there is one, so the print's record lands on that version's history (with ``design_id`` / ``branch_id``, as ``start_print`` takes them).",
      +  "title": "Version Id"
      +}
  2. Changed12 schema fields changedv1.5.1
    • addedInput schema / properties / ams_mapping / description
      Added value: +"JSON string of AMS slot indices (e.g. ``\"[0, 2]\"``). Maps each extruder/filament to an AMS tray position."
    • addedInput schema / properties / material / description
      Added value: +"Filament material (e.g. ``\"PLA\"``).  It sets the slice's temperatures, melt rate and cooling -- a setting you also pass in ``overrides`` stays yours -- and its density weighs the print (omitted: the spool the printer reports loaded, then PLA — the slice step says which). For fully-auto raw-gcode reslices, AMS routing prefers a loaded tray of this material.  (3MF plates carry their own filament map, so routing defers to the adapter there.)"
    • addedInput schema / properties / model_path / description
      Added value: +"Path to input model (STL, 3MF, STEP, OBJ)."
    • addedInput schema / properties / overrides / description
      Added value: +"JSON string of PrusaSlicer INI key-value pairs to override."
    • 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 at the slice step and lists the spots that would work."
    • 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 auto-profile selection (e.g. ``\"ender3\"``, ``\"bambu_x1c\"``, ``\"klipper_generic\"``)."
    • addedInput schema / properties / printer_name / description
      Added value: +"Registered printer name in fleet."
    • addedInput schema / properties / profile_path / description
      Added value: +"Explicit slicer profile. Overrides printer_id auto-selection."
    • changedInput schema / properties / skip_validation / description
      Previous value: -"Default: false."New value: +"Bypass the mesh-level pre-print validation step. Defaults to False — designs are pre-tested for printability before they reach the printer. Default: false."
    • addedInput schema / properties / slicer_path / description
      Added value: +"Explicit path to the slicer binary."
    • addedInput schema / properties / use_ams / description
      Added value: +"Enable AMS filament feeding (Bambu printers). If omitted, auto-detected from 3MF metadata."
  3. Changed14 schema fields changedv1.5.0
    • changedInput schema / properties / ams_mapping / anyOf
      Previous value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "items": {
      +      "type": "integer"
      +    },
      +    "type": "array"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedInput schema / properties / ams_mapping / default
      Removed value: -null
    • removedInput schema / properties / material / default
      Removed value: -null
    • changedInput schema / properties / overrides / anyOf
      Previous value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "additionalProperties": true,
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedInput schema / properties / overrides / default
      Removed value: -null
    • addedInput schema / properties / placement
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "items": {
      +        "type": "number"
      +      },
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "title": "Placement"
      +}
    • addedInput schema / properties / preview_token
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "title": "Preview Token"
      +}
    • removedInput schema / properties / printer_id / default
      Removed value: -null
    • removedInput schema / properties / printer_name / default
      Removed value: -null
    • removedInput schema / properties / profile_path / default
      Removed value: -null
    • removedInput schema / properties / skip_validation / default
      Removed value: -false
    • addedInput schema / properties / skip_validation / description
      Added value: +"Default: false."
    • removedInput schema / properties / slicer_path / default
      Removed value: -null
    • removedInput schema / properties / use_ams / default
      Removed value: -null
  4. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

Annotations declare destructive=true and readOnly=false, but the description goes well beyond them: it enumerates the pipeline stages, discloses that an occupied plate refuses at the slice step and lists working spots, that specific refusal codes (MULTI_NOZZLE_MIXED_SIZES, ABRASIVE_ON_SOFT_NOZZLE) can be overridden only on the human's say-so, and that preview_token proves the model was shown before printing. It also discloses the post-success side effect of opening an interactive 3D stage and auto-decimating oversized meshes, which no annotation conveys.

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?

Front-loaded with purpose, alternative, and pipeline before the long argument block, and the override-key catalog is high-value reference material. It is long, though, and the per-parameter prose duplicates text already present in the schema, and the 'Requires PrusaSlicer... printer must be idle' line is somewhat buried below the override catalog rather than next to the usage guidance.

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 19-parameter print tool with no output schema, the description covers prerequisites, safety gates, refusal behavior, and the inline 3D stage on success. What it does not cover is what the tool returns on completion — job/print identifiers or the shape of the slice/print record — leaving the agent without expectations about the response payload.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description adds genuine meaning beyond the schema: a worked overrides example and a catalog of common INI keys with units grouped by Adhesion/Temperature/Speed/Structure/Support, which the schema's bare 'JSON string of PrusaSlicer INI key-value pairs' does not provide. The precedence note that material sets temps/melt/cooling while an explicit override stays the caller's is also clarifying. Remaining param text largely mirrors the schema descriptions, so not a full 5.

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+resource ('Reslice with custom slicer overrides + print') and immediately scopes it ('use for retries with adjusted settings'), then names the sibling it is not ('For standard prints without overrides, use run_quick_print instead'). The one-shot pipeline summary (validate mesh → resolve profile → slice → safety check → upload → start print) makes the exact operation unambiguous.

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?

Explicit when-to-use ('when you need to tweak slicer parameters (speed, brim, infill, temps)'), explicit when-not with a named alternative (run_quick_print), plus prerequisites (PrusaSlicer/OrcaSlicer installed, printer idle and connected). It also gives per-parameter gating guidance for the risky options, requiring the owner's explicit word before mixed_nozzle_experiment or soft_nozzle_confirmed.

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