Skip to main content
Glama

optimize_print_orientation

Destructive

Rotates a mesh and tests candidate orientations to reduce overhangs, increase bed contact, and place it flat on the build plate for reliable 3D printing.

Instructions

Auto-rotate a mesh to minimize overhangs and maximize bed contact.

        Tests multiple candidate orientations and picks the one with the
        fewest overhangs and the most bed contact.  Re-orients the mesh
        and places it flat on the build plate (z_min = 0).

        ``printability_verdict`` / ``printability_verdict_text`` are the
        chosen orientation's verdict from ``analyze_printability`` itself,
        judged for ``material`` and ``printer_id`` — pass the same ones
        you gave ``analyze_printability`` and the two match.

        :param file_path: Path to the STL file.
        :param output_path: Output path.  Defaults to overwriting the input.
        :param material: Material the verdict is judged for (default ``"pla"``).
        :param printer_id: Optional printer the verdict is judged for.
        :returns: Dict with rotation angles, overhang stats, the
            printability verdict, and new dimensions.

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": {
      "file_path": "<file_path>"
    },
    "name": "optimize_print_orientation"
  }
}

Input Schema

NameRequiredDescriptionDefault
materialNoMaterial the verdict is judged for (default ``"pla"``). Default: "pla".
file_pathYesPath to the STL file.
printer_idNoOptional printer the verdict is judged for. Default: "".
output_pathNoOutput path. Defaults to overwriting the input. Default: "".

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.6.0
    • changedInput schema / properties / material / description
      Previous value: -"Material the score is judged for (default ``\"pla\"``). Default: \"pla\"."New value: +"Material the verdict is judged for (default ``\"pla\"``). Default: \"pla\"."
    • changedInput schema / properties / printer_id / description
      Previous value: -"Optional printer the score is judged for. Default: \"\"."New value: +"Optional printer the verdict is judged for. Default: \"\"."
  2. Changed4 schema fields changedv1.5.1
    • addedInput schema / properties / file_path / description
      Added value: +"Path to the STL file."
    • changedInput schema / properties / material / description
      Previous value: -"Default: \"pla\"."New value: +"Material the score is judged for (default ``\"pla\"``). Default: \"pla\"."
    • changedInput schema / properties / output_path / description
      Previous value: -"Default: \"\"."New value: +"Output path.  Defaults to overwriting the input. Default: \"\"."
    • changedInput schema / properties / printer_id / description
      Previous value: -"Default: \"\"."New value: +"Optional printer the score is judged for. Default: \"\"."
  3. Changed4 schema fields changedv1.5.0
    • addedInput schema / properties / material
      Added value: +{
      +  "description": "Default: \"pla\".",
      +  "title": "Material",
      +  "type": "string"
      +}
    • removedInput schema / properties / output_path / default
      Removed value: -""
    • addedInput schema / properties / output_path / description
      Added value: +"Default: \"\"."
    • addedInput schema / properties / printer_id
      Added value: +{
      +  "description": "Default: \"\".",
      +  "title": "Printer Id",
      +  "type": "string"
      +}
  4. First observedv0.1.0

TDQS

A3.6/5.0
Behavior4/5

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

Annotations declare destructiveHint=true, and the description substantiates it by stating `output_path` defaults to overwriting the input, which is exactly the risk an agent needs to know. It also discloses behavior absent from annotations: oversized meshes are decimated for the interactive stage, and the tool opens an inline viewer panel on success. It stops short of noting permissions or whether the source file can be recovered.

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

Conciseness3/5

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

The core purpose and the overwrite caveat are front-loaded, which is good. However, the RST `:param:` block restates the input schema almost verbatim and the inline-stage paragraph is long relative to the operation itself, so some sentences do not earn their place.

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?

There is no output schema, and the description compensates by summarizing the return dict (rotation angles, overhang stats, printability verdict, new dimensions). Combined with the destructive-default warning and the stage side effect, an agent has enough to call this safely. The only gap is guidance on choosing this over `check_orientation`.

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 100%, so the schema already documents all four parameters and the baseline is 3. The description adds real meaning on top: the overwrite default for `output_path` and the fact that `material`/`printer_id` determine how the returned verdict is judged and must mirror the `analyze_printability` call. That is modest but genuine added value beyond the schema.

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?

States a specific verb and resource with an explicit goal: 'Auto-rotate a mesh to minimize overhangs and maximize bed contact', and adds that it tests multiple candidates and re-places the mesh at z_min = 0. That distinguishes it from pure analysis tools. It does not contrast against the close sibling `check_orientation`, so the agent must infer which one mutates the file.

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

Usage Guidelines3/5

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

The description gives one concrete usage rule: pass the same `material` and `printer_id` you gave `analyze_printability` so the verdicts match. That is useful cross-tool guidance. It never states when to use this instead of `check_orientation` or `analyze_printability`, so usage is only implied.

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