Skip to main content
Glama

prepare_ai_model_for_print

Fix unit errors in AI-generated 3D models and prepare them for printing—corrects meters-to-millimeters mix-ups, scales to target height, validates, and recommends simplification or hollowing.

Instructions

Prepare any AI-generated model for printing — fixes the unit mix-up.

        AI model generators (Meshy, Tripo, Stability, Gemini) routinely
        export models in meters instead of millimeters, so a 60mm figurine
        reads as 0.06mm.  This tool corrects that by the real unit
        conversion when exactly one explains the size — never by scaling
        to an invented "reasonable" target — then runs the full validation
        pipeline and provides smart recommendations for simplification
        and hollowing.

        Pipeline:
            1. Run validate_and_prepare for baseline analysis
            2. Size — scale to target_height_mm when given; otherwise
               apply a unit correction only when exactly one real
               conversion (meters, centimeters, inches, microns) lands
               the model at a printable size.  A size several units
               could explain, or none can, is reported, never guessed at.
            3. Mesh simplification recommendation (if > 100K triangles)
            4. Smart hollow recommendation (only when appropriate)
            5. Re-validate the scaled model
            6. Return combined before/after comparison

        Works with STL, OBJ, and 3MF files.

        :param input_path: Path to the AI-generated model file.
        :param target_height_mm: Desired height in mm — an instruction,
            honored at any starting size.  If 0, only a unit mistake is
            ever fixed; the model's designed size is otherwise kept.
        :param printer_id: Optional printer model ID for bed-fit checking.
        :param material: Material name (default "PLA") for material checks.
        :returns: Dict with original/prepared comparison, actions taken,
            recommendations, and next_action for slicing.

INLINE 3D STAGE: on success this tool also 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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
materialNoPLA
input_pathYes
printer_idNo
target_height_mmNo
Install Server

TDQS

A4.7/5.0
Behavior5/5

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

No annotations are provided, so the description carries full burden. It transparently discloses the entire workflow: validation, scaling logic, simplification/hollow recommendations, re-validation, and combined before/after comparison. It also discloses side effects, such as opening an interactive 3D stage and automatic decimation for oversized meshes. It explicitly warns that the PNG preview is not the whole experience, covering user expectations.

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 long but well-structured, with a numbered pipeline and inline bolded steps. The opening sentence is a clear summary, and subsequent details are organized. While it is extensive, every section adds necessary behavioral or procedural context, and the effective use of lists keeps it scannable. It is slightly verbose but not overly 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?

Given the tool's complexity (multi-step pipeline, unit conversion, interaction with 3D stage, return data), the description is complete. It covers all major aspects: input types, supported formats, each pipeline step, parameter semantics, return value structure, and the interactive stage behavior. There is no output schema, so the description appropriately provides the return contract.

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?

Schema description coverage is 0%, but the description fully explains all four parameters. It provides detailed semantics for input_path, target_height_mm (with instruction that it is honored at any starting size), printer_id for bed-fit checking, and material with default 'PLA'. It also covers the return value structure. This compensates fully for the schema's bare definitions.

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?

The description clearly states the tool's purpose: 'Prepare any AI-generated model for printing — fixes the unit mix-up.' It specifies the target resource (AI-generated models) and the key action (unit correction), and distinguishes itself from general validation tools by mentioning the pipeline and the specific unit fix. Siblings like validate_and_prepare are broader, while this focuses on AI generator exports.

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?

The description explains when to use it: for models from AI generators (Meshy, Tripo, etc.) that often have meter/millimeter confusion. It also clarifies the scaling logic: only applies a unit correction when exactly one real conversion fits, never guessing. It implicitly contrasts with general validation by naming specific generators and the unit-fix purpose, though it does not explicitly name alternatives like validate_and_prepare_mesh. The context is clear and actionable.

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

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