Skip to main content
Glama

scale_mesh_to_fit

Automatically scale a 3D mesh to fit within a printer's build volume while preserving aspect ratio, solving oversized model issues.

Instructions

Auto-scale a mesh to fit within a build volume while maintaining aspect ratio.

        Useful when a model is too large for your printer -- this uniformly
        shrinks it to the largest size that fits.

        :param file_path: Path to mesh file (.stl).
        :param max_x_mm: Maximum X dimension of build volume.
        :param max_y_mm: Maximum Y dimension of build volume.
        :param max_z_mm: Maximum Z dimension of build volume.
        :param printer_id: Optional supported printer model id.  When
            provided, printer intelligence supplies the build volume.
        :param output_path: Output path. Defaults to overwriting input.
        :returns: Dict with original/new dimensions and scale factor.
        

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
max_x_mmNo
max_y_mmNo
max_z_mmNo
file_pathYes
printer_idNo
output_pathNo
Behavior4/5

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

With no annotations, the description carries the full burden. It discloses uniform scaling, aspect ratio preservation, default output behavior (overwriting input), and return value. However, it does not clarify what happens if the mesh already fits (e.g., no scaling) or precedence when both printer_id and explicit dimensions are given.

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 well-structured with a clear introductory sentence and parameter list. It is concise but could be slightly more streamlined by removing the Python docstring style (e.g., ':returns:'), which adds minor verbosity. Overall, every sentence adds value.

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?

Given 6 parameters (1 required), no output schema, and no annotations, the description covers the main use case, parameter meanings, and return value. It lacks details on edge cases (e.g., mesh already fits, error handling, file format validation) but is adequate for most scenarios.

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%, but the description explains each parameter with added context beyond the schema, such as printer_id supplying build volume from printer intelligence and output_path defaulting to overwriting. This compensates for the lack of schema descriptions, though some details (e.g., units) are implicit.

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 auto-scales a mesh to fit within a build volume while maintaining aspect ratio. It uses a specific verb ('scale'), resource ('mesh'), and condition, distinguishing it from generic rescale tools like 'rescale_model' which may not constrain to a build volume.

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 explicitly says 'Useful when a model is too large for your printer' and that it 'uniformly shrinks it to the largest size that fits', providing clear guidance on when to use. It does not explicitly state when not to use or mention alternatives, but the context is strong enough to infer appropriate usage.

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

Install Server

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