Skip to main content
Glama

scale_mesh_to_fit

Shrink an oversized 3D mesh to the largest size that fits your printer's build volume, preserving aspect ratio. Auto-scales STL files for 3D printing.

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.

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
max_x_mmNo
max_y_mmNo
max_z_mmNo
file_pathYes
printer_idNo
output_pathNo
Install Server

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It goes above and beyond by detailing the interactive 3D stage side effect, decimation of oversized meshes, and the fallback which behavior, plus the return dict. It does miss some side-effect warnings like the fact that it can overwrite the input file if no output_path is given (only mentioned in the param docstring, not in the main text) and doesn't discuss permission or error cases, but this is rich context for a complex tool.

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 front-loaded with the core purpose in the first sentence, followed by param docs and then a longer side note about the 3D stage. The 3D stage paragraph is thorough but slightly long; it could be condensed while retaining the key points. However, it is well-structured and every sentence adds value, justifying a high score.

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?

For a tool with 6 parameters, a mutating action (potentially overwriting input), and an unusual side effect (opening a 3D stage), the description covers all the bases: parameters, return value, and side effects. It doesn't explain what happens if both printer_id and explicit dimensions are provided (i.e., precedence), but given the complexity is high, the description is impressively complete for an AI agent to use it correctly.

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%, so the description must compensate, and it does. Each parameter is documented in the docstring: file_path (path to mesh), max_*_mm (build volume dimensions), printer_id (optional printer model to supply build volume), and output_path (defaults to overwriting input). It also explains the return value. This is exactly what the agent needs to invoke the tool correctly, especially noting the interaction between printer_id and the explicit dimension parameters.

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 opens with a clear and specific action: 'Auto-scale a mesh to fit within a build volume while maintaining aspect ratio.' It uses a specific verb (auto-scale), resource (mesh), and context (fit within a build volume). It also explains when it's useful ('when a model is too large for your printer') and includes the key behavior ('uniformly shrinks it to the largest size that fits'), which differentiates it from siblings like rescale_model or auto_orient_model.

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 states when to use the tool ('Useful when a model is too large for your printer') and clarifies that it shrinks the model, implying it's the right choice for size-constrained printing. However, it does not explicitly contrast with alternative tools (e.g., rescale_model or validate_and_prepare_mesh) or provide 'when not to use' guidance. Clear usage context is present, but exclusions are absent.

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