Skip to main content
Glama

slice_gcode_submit

Submit a 3D model or STL to the PrusaSlicer CLI for real G-code generation; returns a job ID to poll for filament usage, layer count, and estimated print time.

Instructions

Slice a real part with the PrusaSlicer CLI, asynchronous — the external-CLI upgrade of the analytic slice_estimate: real perimeters, infill patterns, supports, travel/acceleration, and the slicer's own print-time model. Requires a PrusaSlicer install ('apt install prusa-slicer' / the AppImage); when absent this returns {ok:false, reason, install} rather than raising.

Pass a body handle (exported to STL in the modeller) or a prepared stl_path. infill_fraction is 0..1 (full infill auto-switches the fill pattern — PrusaSlicer's default refuses 100%); material/density_g_cc set the filament density used to turn the sliced volume into grams. With a body the result also carries the analytic estimate and the deposited_ratio between them (a 20 mm cube at 100% lands ~1.008 — the skirt).

Returns the degradation dict or {job_id, status, cache_hit}; poll job_result for {ok, gcode_path, filament_mm, filament_cm3, filament_g, print_time_s, print_time_text, layer_count, config (the slicer's echoed settings), analytic?, deposited_ratio?}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bodyNo
materialNoPLA
stl_pathNo
supportsNo
extra_argsNo
density_g_ccNo
infill_fractionNo
layer_height_mmNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations present, the description carries the full burden and does so: it declares the tool is asynchronous, discloses the graceful degradation path instead of raising, mentions cache_hit, and explains the new deposited_ratio field with a concrete sanity example (20 mm cube at 100% infill lands ~1.008, the skirt). These are behavioral traits nothing else in the definition supplies.

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 the core action and its relationship to slice_estimate, then the install prerequisite, then input modes, then parameter notes, then return shape. The parentheticals are dense but each carries real information (install commands, the 100%-infill quirk, the deposited_ratio example). Slightly long, but little is wasted.

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?

No annotations and no output schema exist, so the description must cover behavior and returns on its own, and it does: it names the immediate return shape (degradation dict or {job_id, status, cache_hit}) and the full downstream payload from job_result including gcode_path, filament_mm/cm3/g, print_time_s/text, layer_count, echoed config, and the optional analytic/deposited_ratio fields. Nothing essential for correct invocation 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 0%, so the description must supply parameter meaning and largely does: body vs stl_path as alternate inputs, infill_fraction is 0..1 with the important quirk that full infill auto-switches the fill pattern because PrusaSlicer's default refuses 100%, and material/density_g_cc control filament density for gram conversion. It leaves supports, extra_args, and layer_height_mm unexplained, but the high-value parameters are covered with semantics 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 specific verb+resource (slice a real part with the PrusaSlicer CLI) and positions itself against a named sibling: 'the external-CLI upgrade of the analytic slice_estimate'. It also enumerates what makes it different (real perimeters, infill patterns, supports, travel/acceleration, the slicer's own print-time model), so an agent can distinguish it from slice_estimate 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 Guidelines4/5

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

Gives clear operating context: it requires a PrusaSlicer install, and when the install is absent it returns {ok:false, reason, install} rather than raising. It also tells the agent how to feed geometry (body handle or prepared stl_path) and to poll job_result afterwards. It stops short of an explicit 'prefer slice_estimate when you only need a fast analytic number' rule, leaving that routing to inference.

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