Skip to main content
Glama

Slice G-code Submit

slice_gcode_submit

Submits a part or STL to PrusaSlicer CLI for asynchronous slicing, returning a job ID to poll for G-code paths, filament use, and 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?}.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "slice_gcode_submit"
  }
}

Input Schema

NameRequiredDescriptionDefault
bodyNo
materialNoPLA
stl_pathNo
supportsNo
workspaceNoRun this call in this named workspace
extra_argsNo
density_g_ccNo
infill_fractionNo
layer_height_mmNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.5.7
    • addedInput schema / properties / workspace
      Added value: +{
      +  "default": "",
      +  "description": "Run this call in this named workspace",
      +  "title": "Workspace",
      +  "type": "string"
      +}
  2. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Goes well beyond the annotations: discloses that the operation is asynchronous, requires an external PrusaSlicer install, and returns {ok:false, reason, install} rather than raising when absent. It also reveals cache_hit behavior and the deposited_ratio sanity check (cube lands ~1.008 due to the skirt), which is rich behavioral context an agent needs.

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-loads the core purpose and dependency, then layers parameter and return details logically. The parenthetical asides are informative but dense; it is appropriately sized for a 9-parameter async tool, with only mild verbosity in the return-field enumeration.

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?

No output schema exists, yet the description fully enumerates the return fields (gcode_path, filament_mm/g/cm3, print_time, layer_count, config, analytic, deposited_ratio) and the polling workflow. Combined with the documented failure mode, it is nearly complete, with the only gaps being the undocumented extra_args and layer_height_mm parameters.

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 coverage is only 11%, so the description must compensate. It clarifies body vs stl_path, infill_fraction's 0..1 range and 100% auto-switch, and material/density_g_cc driving gram conversion. But it leaves extra_args, layer_height_mm, and workspace undocumented, so roughly half the parameters lack meaning in either the schema or the description.

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 and resource ('Slice a real part with the PrusaSlicer CLI') and explicitly positions it as the 'external-CLI upgrade of the analytic slice_estimate', distinguishing it from that sibling. The added detail about real perimeters, infill, supports, and print-time model makes the capability boundary unambiguous.

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 context for when to use it (real slicing requiring a PrusaSlicer install) and names the alternative it upgrades (slice_estimate). It also routes the agent to poll job_result for results. However, it never states when to prefer the lighter analytic slice_estimate instead, so a full when-not comparison is missing.

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