Skip to main content
Glama

smart_generate_from_template

Generate a 3D-printable STL from a parametric template, analyze structural risks, apply auto-reinforcement, and return optimized slicer settings for functional parts.

Instructions

Generate from template + structural analysis + print settings (recommended for functional parts).

        Higher-level than ``generate_from_template`` — adds structural risk analysis
        and auto-reinforcement. This is the **one-step design-to-print-ready** pipeline:

        1. Generates STL from a parametric template (like ``generate_from_template``)
        2. Runs structural risk analysis (thin necks, cantilevers, sharp corners)
        3. Optionally auto-applies reinforcements (fillets, wall thickening, etc.)
        4. Infers optimal slicer settings tuned to the design's structural profile
        5. Returns the STL path + recommended settings ready for slicing

        The agent can take the output and directly call ``reslice_with_overrides``
        or ``run_reslice_and_print`` with the recommended settings.

        :param template_id: Template ID from ``list_design_templates``.
        :param parameters: Parameter overrides (e.g., ``{"phone_width": 80}``).
        :param material: Filament type for settings inference (PLA, PETG, ABS, etc.).
        :param auto_reinforce: If True, auto-apply structural reinforcements.
        :returns: Dict with STL path, structural grade, reinforcements, and print settings.

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
parametersNo
template_idYes
auto_reinforceNo
Install Server

TDQS

A4.2/5.0
Behavior3/5

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

The description discloses the key behavioral steps: structural risk analysis, optional auto-reinforcement, and inference of slicer settings. However, with no annotations, it does not mention potential side effects, latency, or any destructive actions (e.g., if it modifies files or requires locks). The description focuses on positive capabilities without noting risks or limitations, which is a moderate gap.

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 detailed and well-structured with a numbered list of steps, making it easy to follow. It is somewhat verbose but necessary for conveying the multi-step pipeline. No redundancy or filler is present, so it earns a high score for clarity despite length.

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 the tool's complexity and the lack of an output schema, the description explains the return (STL path and recommended settings) and how to chain with subsequent tools. It does not cover edge cases like failure during structural analysis or behavior when auto_reinforce is false, but these are self-explanatory from the description. Overall, it is sufficiently complete for an agent to use effectively.

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?

The input schema has zero descriptive text, so the description carries full burden. It thoroughly covers all four parameters: 'template_id' (from list_design_templates), 'parameters' (with JSON example), 'material' (with example PLA), and 'auto_reinforce' (explains the boolean effect). Each parameter's purpose is clarified beyond the schema, earning full credit.

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 primary function: generating STL from a template, adding structural analysis and print settings. It explicitly differentiates itself from the simpler 'generate_from_template' by being higher-level and describes the complete pipeline in numbered steps, making the purpose unambiguous.

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 provides guidance on when to use this tool: it is 'recommended for functional parts' and is a one-step design-to-print-ready pipeline. It also mentions that after using it, the agent can call 'reslice_with_overrides' or 'run_reslice_and_print', but it does not explicitly state when to use simpler alternatives like 'generate_from_template' (e.g., for non-functional parts). This is a minor gap in explicit exclusion.

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