Skip to main content
Glama
orcaslicer-mcp

orcaslicer-mcp

Save G-code and record the slice

save_gcode

Save the last sliced G-code to a file while recording its model, settings, and estimates so later print results can be matched back to the slice. Returns the file path for printer tools.

Instructions

Save the last slice's G-code to a file and record the slice so the print can be learned from later; hand the path to the printer tools.

The record (model, a fingerprint of the objects' names and sizes, full settings snapshot, and OrcaSlicer's time and filament estimates) goes in the local outcome store under that filename. When that file is printed, list_print_history (or klipper-mcp's recorder) matches the finished job by filename, so the real result joins back to these settings. Returns the saved path; hand it to klipper-mcp's start_print. Default filename: _.gcode. Never overwrites an existing file: a name collision gets a -2, -3, ... suffix. Writes into a gcode folder under PRINT_OUTCOMES_DIR if set, else under ~/.orcaslicer-mcp; the folder is created if missing. If the store write fails, the file is still saved and outcome_recorded is False.

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": "save_gcode"
  }
}

Input Schema

NameRequiredDescriptionDefault
filenameNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.10

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only say the call is not read-only and not destructive; the description adds substantial behavior beyond that: never overwrites (collision gets -2/-3 suffix), writes into a gcode folder under PRINT_OUTCOMES_DIR else ~/.orcaslicer-mcp, creates the folder, and on store-write failure still saves the file with outcome_recorded False.

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 core action and the 'hand the path to the printer tools' instruction are front-loaded, and each later sentence adds distinct operational facts. It is dense and parenthetical (the fingerprint/settings snapshot aside is long) but nothing is plainly redundant.

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 output schema exists, and the description supplies the return value (the saved path) plus the degraded return case (outcome_recorded False). Storage location, naming, overwrite policy, and downstream matching are all covered for a one-parameter mutation tool.

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% and the sole parameter is documented only as a nullable string, so the description carries the load: it gives the default name pattern <object>_<timestamp>.gcode, the collision-suffix behavior, and where the name is resolved. It stops short of stating whether an absolute path would be accepted or rejected.

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?

Opens with a specific verb+resource+scope: save the last slice's G-code to a file AND record the slice. It also names the downstream consumers (list_print_history, klipper-mcp's start_print), so an agent can distinguish it from get_gcode or save_project without opening a 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?

Clear usage context: call it after a slice, then hand the returned path to the printer tools, and the file name is the key that later joins print history back to settings. It does not explicitly exclude alternatives such as get_gcode (read-only retrieval) or save_project, so the routing is strong but not fully closed.

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