Skip to main content
Glama

slice_model

Slice STL, 3MF, STEP, or OBJ models into G-code with PrusaSlicer or OrcaSlicer, auto-centering off-bed meshes and checking bed clearance before output.

Instructions

Slice a 3D model (STL/3MF/STEP) to G-code using PrusaSlicer or OrcaSlicer.

        Args:
            input_path: Path to the input file (STL, 3MF, STEP, OBJ, AMF).
            output_dir: Directory for the output G-code.  Defaults to
                the system temp directory.
            profile: Path to a slicer profile/config file (.ini or .json).
            printer_id: Optional printer model ID for bundled profile
                auto-selection (e.g. ``"prusa_mini"``).
            slicer_path: Explicit path to the slicer binary.  Auto-detected
                if omitted.
            material: Filament material for this slice (``"PLA"``,
                ``"PETG"``, ``"TPU"``, …, or a product such as
                ``"bambu_tpu_95a"``).  It sets the slice's temperatures,
                melt rate and cooling -- Kiln's settings for it on this
                printer, see ``build_material_overrides`` -- and its
                density weighs the print.  Omitted, the spool the printer
                reports loaded answers, then PLA; the response's
                ``filament`` block says which, and ``filament.settings``
                what the slice was set to and why.
            auto_center: When True (default), off-bed STLs are translated
                to a bed-centered copy before slicing.  This prevents the
                class of crash where origin-centered meshes (common from
                compose_part_from_primitives / OpenSCAD output) produce
                sliced gcode with negative X/Y moves that drive the
                nozzle into the printer frame.  Set False only if you've
                verified the input is already correctly positioned.
                A part too big for the bed as modelled is also turned a
                quarter turn when that makes it fit — an STL directly,
                a STEP file as Kiln's mesh of it — and the response's
                ``bed_fit`` block says so.
            printer_name: Registered printer this slice is FOR.  Omit for
                the default printer.  Naming a second machine resolves
                its profile, its bed and its safety limits — without it,
                a multi-printer install slices everything for whichever
                printer is the default.
            placement: Where the part goes when the plate still holds the
                last print.  ``[x, y]`` in mm (where the part's footprint
                origin lands), a named region (``"front-left"``,
                ``"centre"``, ``"back-right"``, …), or ``"keep"`` to leave
                it where the file puts it.  Omitted, an occupied plate
                refuses and lists the spots that would work; a clear
                plate slices as before.  The response's ``placement``
                block is the clearance verdict, and the sliced file is
                checked against the plate once more before it is handed
                on.  The clearance verdict is always given; placing and
                starting a second print on an occupied plate is included
                where the plan carries it.

        A bundled profile is sliced for the nozzle fitted to the machine --
        the nozzle on record for it, else the printer's own setting --
        rather than the model's stock size.  The response's ``nozzle``
        block names the size, where it came from and what was changed to
        suit it; tell the user when it is not the stock size.

        Returns a JSON object with the output G-code path.  The output file
        can then be uploaded to a printer with ``upload_file`` and printed
        with ``start_print``.  A skirt that would print past the edge of
        the bed is dropped and the part sliced again (``bed_fit``'s
        ``skirt_dropped`` says so); a brim that would is refused
        (``BRIM_PAST_BED``) with the width that fits.

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": {
      "input_path": "<input_path>"
    },
    "name": "slice_model"
  }
}

Input Schema

NameRequiredDescriptionDefault
profileNoPath to a slicer profile/config file (.ini or .json).
materialNoFilament material for this slice (``"PLA"``, ``"PETG"``, ``"TPU"``, …, or a product such as ``"bambu_tpu_95a"``). It sets the slice's temperatures, melt rate and cooling -- Kiln's settings for it on this printer, see ``build_material_overrides`` -- and its density weighs the print. Omitted, the spool the printer reports loaded answers, then PLA; the response's ``filament`` block says which, and ``filament.settings`` what the slice was set to and why.
placementNoWhere the part goes when the plate still holds the last print. ``[x, y]`` in mm (where the part's footprint origin lands), a named region (``"front-left"``, ``"centre"``, ``"back-right"``, …), or ``"keep"`` to leave it where the file puts it. Omitted, an occupied plate refuses and lists the spots that would work; a clear plate slices as before. The response's ``placement`` block is the clearance verdict, and the sliced file is checked against the plate once more before it is handed on. The clearance verdict is always given; placing and starting a second print on an occupied plate is included where the plan carries it.
input_pathYesPath to the input file (STL, 3MF, STEP, OBJ, AMF).
output_dirNoDirectory for the output G-code. Defaults to the system temp directory.
printer_idNoOptional printer model ID for bundled profile auto-selection (e.g. ``"prusa_mini"``).
auto_centerNoWhen True (default), off-bed STLs are translated to a bed-centered copy before slicing. This prevents the class of crash where origin-centered meshes (common from compose_part_from_primitives / OpenSCAD output) produce sliced gcode with negative X/Y moves that drive the nozzle into the printer frame. Set False only if you've verified the input is already correctly positioned. A part too big for the bed as modelled is also turned a quarter turn when that makes it fit — an STL directly, a STEP file as Kiln's mesh of it — and the response's ``bed_fit`` block says so. Default: true.
slicer_pathNoExplicit path to the slicer binary. Auto-detected if omitted.
printer_nameNoRegistered printer this slice is FOR. Omit for the default printer. Naming a second machine resolves its profile, its bed and its safety limits — without it, a multi-printer install slices everything for whichever printer is the default.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed9 schema fields changedv1.5.1
    • changedInput schema / properties / auto_center / description
      Previous value: -"Default: true."New value: +"When True (default), off-bed STLs are translated to a bed-centered copy before slicing.  This prevents the class of crash where origin-centered meshes (common from compose_part_from_primitives / OpenSCAD output) produce sliced gcode with negative X/Y moves that drive the nozzle into the printer frame.  Set False only if you've verified the input is already correctly positioned. A part too big for the bed as modelled is also turned a quarter turn when that makes it fit — an STL directly, a STEP file as Kiln's mesh of it — and the response's ``bed_fit`` block says so. Default: true."
    • addedInput schema / properties / input_path / description
      Added value: +"Path to the input file (STL, 3MF, STEP, OBJ, AMF)."
    • addedInput schema / properties / material / description
      Added value: +"Filament material for this slice (``\"PLA\"``, ``\"PETG\"``, ``\"TPU\"``, …, or a product such as ``\"bambu_tpu_95a\"``).  It sets the slice's temperatures, melt rate and cooling -- Kiln's settings for it on this printer, see ``build_material_overrides`` -- and its density weighs the print.  Omitted, the spool the printer reports loaded answers, then PLA; the response's ``filament`` block says which, and ``filament.settings`` what the slice was set to and why."
    • addedInput schema / properties / output_dir / description
      Added value: +"Directory for the output G-code.  Defaults to the system temp directory."
    • addedInput schema / properties / placement / description
      Added value: +"Where the part goes when the plate still holds the last print.  ``[x, y]`` in mm (where the part's footprint origin lands), a named region (``\"front-left\"``, ``\"centre\"``, ``\"back-right\"``, …), or ``\"keep\"`` to leave it where the file puts it.  Omitted, an occupied plate refuses and lists the spots that would work; a clear plate slices as before.  The response's ``placement`` block is the clearance verdict, and the sliced file is checked against the plate once more before it is handed on.  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 / printer_id / description
      Added value: +"Optional printer model ID for bundled profile auto-selection (e.g. ``\"prusa_mini\"``)."
    • addedInput schema / properties / printer_name / description
      Added value: +"Registered printer this slice is FOR.  Omit for the default printer.  Naming a second machine resolves its profile, its bed and its safety limits — without it, a multi-printer install slices everything for whichever printer is the default."
    • addedInput schema / properties / profile / description
      Added value: +"Path to a slicer profile/config file (.ini or .json)."
    • addedInput schema / properties / slicer_path / description
      Added value: +"Explicit path to the slicer binary.  Auto-detected if omitted."
  2. Changed9 schema fields changedv1.5.0
    • removedInput schema / properties / auto_center / default
      Removed value: -true
    • addedInput schema / properties / auto_center / description
      Added value: +"Default: true."
    • addedInput schema / properties / material
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "title": "Material"
      +}
    • removedInput schema / properties / output_dir / 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 / printer_id / default
      Removed value: -null
    • addedInput schema / properties / printer_name
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "title": "Printer Name"
      +}
    • removedInput schema / properties / profile / default
      Removed value: -null
    • removedInput schema / properties / slicer_path / default
      Removed value: -null
  3. First observedv0.1.0

TDQS

A4/5.0
Behavior5/5

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

Goes well past the annotations (readOnly=false, destructive=false, openWorld=false) by disclosing the material fallback chain (spool-reported, then PLA), bundled-profile nozzle substitution, automatic quarter-turn for oversized parts, skirt-dropped-and-reslice and BRIM_PAST_BED refusal behavior, and the side effect of opening an inline 3D stage in MCP Apps hosts. That is exactly the kind of consequence-and-side-effect detail the annotations cannot carry.

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

Conciseness2/5

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

The purpose is front-loaded, but roughly half the text is an Args block that duplicates the schema descriptions word for word — pure redundancy given 100% coverage. The placement paragraph in particular is a dense run-on about occupied plates, clearance verdicts, and second prints that is hard to parse and buries its actionable rule.

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?

With no output schema, the description carries the return contract itself and does so well: a JSON object with the G-code path, plus named response blocks (filament, filament.settings, bed_fit.skirt_dropped, placement, nozzle) and an error code. For a 9-parameter slicing tool with real physical consequences, nothing an agent needs to call it safely is missing.

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 documents all nine parameters, and the description's Args block largely restates them verbatim. Where it does add meaning (material's effect on temperatures/melt rate/density, placement's three accepted forms), that meaning is already present in the corresponding schema properties, so the marginal value is small. Baseline 3 applies.

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?

Opens with a specific verb+resource+toolchain: "Slice a 3D model (STL/3MF/STEP) to G-code using PrusaSlicer or OrcaSlicer." It also states the downstream handoff ("can then be uploaded to a printer with upload_file and printed with start_print"), which implicitly positions it against slice_and_print/run_reslice_and_print, but it never names those siblings explicitly.

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?

Gives concrete conditional guidance: auto_center=False "only if you've verified the input is already correctly positioned", printer_name needed on multi-printer installs, placement omitted on an occupied plate refuses and lists valid spots. Lacks an explicit statement of when to pick this over slice_and_print or reslice_with_overrides, so the alternative-selection cue is inferred rather than stated.

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