Skip to main content
Glama

run_reslice_and_print

Destructive

Slices and prints a model with custom slicer overrides for retries with adjusted settings. Tweak speed, brim, infill, or temperatures, then validate, slice, and start the print in one step.

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

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.)
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"``).
ams_mappingNoJSON string of AMS slot indices (e.g. ``"[0, 2]"``). Maps each extruder/filament to an AMS tray position.
slicer_pathNoExplicit path to the slicer binary.
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.

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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."
  2. 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
  3. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, so the safety bar is partly covered, but the description adds real context: the full pipeline order (validate → resolve profile → slice → safety check → upload → start print), the local slicer dependency, the idle-printer precondition, the human-approval requirement via preview_token, and the placement refusal behavior on an occupied plate. Minor gap: no note on partial failure semantics (e.g. what happens if validation passes but upload fails).

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?

Key information is front-loaded well: purpose, alternative, pipeline, and override format appear before the parameter list. However, the Args section largely duplicates the schema descriptions verbatim (material, placement, preview_token, skip_validation), which costs length without adding meaning. The override key table and the 3D stage note do earn their space.

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

Completeness5/5

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

For a 12-parameter destructive pipeline tool with no output schema, the description covers inputs, prerequisites, side effects, and the outcome (opens an interactive 3D stage; PNG preview is the floor; oversized meshes are decimated automatically). Nothing an agent needs in order to call this correctly or set expectations is missing.

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 baseline would be 3, but the description goes beyond the schema where it matters most: the free-form 'overrides' string is explained with a concrete example and a categorized key list (adhesion, temperature, speed, structure, support) that the schema does not provide. It also clarifies precedence for material vs overrides (

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?

The first line names a specific verb and resource ('Reslice with custom slicer overrides + print') and immediately frames the case ('use for retries with adjusted settings'). It also names the sibling it is not, run_quick_print, so an agent can distinguish the two 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?

Explicit routing is given: use this when tweaking slicer parameters, and 'For standard prints without overrides, use run_quick_print instead.' Prerequisites are stated too ('Requires PrusaSlicer or OrcaSlicer installed locally. The printer must be idle and connected'), which is the when-not half of the guidance.

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