Skip to main content
Glama

slice_model

Convert 3D model files (STL, 3MF, STEP) to printable G-code using PrusaSlicer or OrcaSlicer. Automatically centers off-bed models to prevent printer crashes.

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

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
profileNo
input_pathYes
output_dirNo
printer_idNo
auto_centerNo
slicer_pathNo
Behavior4/5

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

No annotations are provided, so the description carries the full burden. It discloses key behaviors: slicer auto-detection, auto_center crash prevention, and return format. However, it omits side effects, file modifications, or permission requirements.

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?

The description is well-structured with a brief intro and an Args section. The auto_center explanation is longer but justified. Overall concise, though slightly verbose.

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?

Given the complexity (6 params, 1 required, no output schema), the description covers most aspects: input, outputs, and follow-up tools. It lacks error handling or permission details, but is adequate for a slicing tool.

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

Parameters5/5

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

The description adds significant meaning to all 6 parameters beyond the schema (which has 0% coverage). It explains defaults, auto-detection, and the auto_center crash mechanism in detail, fully compensating for the lack of schema descriptions.

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?

The description clearly states the tool slices 3D models (STL/3MF/STEP) to G-code using specific slicers. It is specific about the verb and resource but does not differentiate from sibling tools like slice_and_estimate or reslice_with_overrides.

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

Usage Guidelines2/5

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

There is no explicit guidance on when to use this tool versus alternatives. The description implies it is for general slicing, but given many sibling tools also slice, it fails to provide context for selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/codeofaxel/kiln'

If you have feedback or need assistance with the MCP directory API, please join our Discord server