Skip to main content
Glama

generate_model_with_provider

Generate a printable 3D model from a text description using an external AI provider, with automatic printability audit and corrective retries.

Instructions

Generate a printable design via an external AI provider.

        The cloud, provider-backed creation path: hands a natural-language
        description to an external idea-to-3D service, audits the candidate
        for printability and design correctness, and can perform one or
        more corrective retries using feedback from failed attempts.

        This is NOT the default. It needs a configured provider (the user
        supplies their own API key). For most custom objects the free,
        keyless path is to author the OpenSCAD yourself and compile it with
        ``compile_scad`` — no provider required. Reach for this tool when
        the shape is organic or photo-derived and hard to express in
        OpenSCAD AND a provider is configured.

        For the user-facing saved-goal flow (capturing duty / environment /
        materials / safety so the audit and post-print review can verify
        the result against the user's intent), call this through
        ``design_session(verb="generate", session_id=...)`` rather than
        calling ``generate_model_with_provider`` directly.

        Provider notes:
        - ``auto`` prefers Gemini for idea-to-CAD when available.
        - ``openscad`` is intentionally rejected here because it compiles
          code; it does not turn a natural-language idea into geometry.

        No-provider fallback:
        - If no cloud provider is configured this raises NO_PROVIDER. Do
          NOT ask the user to set an API key — fall back to writing the
          OpenSCAD yourself and compiling it with compile_scad. That free,
          local path is the default for custom objects; cloud providers are
          an opt-in the user supplies their own key for (best for organic
          or photo-based shapes OpenSCAD can't easily reach).

        Args:
            requirements: Natural-language description of the part to create.
            provider: ``auto``, ``gemini``, ``meshy``, ``tripo3d``, or ``stability``.
            material: Optional material target (e.g. ``"petg"``).
            printer_model: Optional printer model ID (e.g. ``"bambu_a1"``).
            style: Optional style hint for providers that support it.
            output_dir: Optional directory for generated files.
            build_volume_x: Optional build volume X override in mm.
            build_volume_y: Optional build volume Y override in mm.
            build_volume_z: Optional build volume Z override in mm.
            nozzle_diameter: Printer nozzle diameter in mm.
            layer_height: Printer layer height in mm.
            max_overhang_angle: Supportless overhang threshold in degrees.
            timeout: Max seconds to wait per generation attempt.
            max_attempts: Max corrective generation attempts.

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
styleNo
timeoutNo
materialNo
providerNoauto
output_dirNo
layer_heightNo
max_attemptsNo
requirementsYes
printer_modelNo
build_volume_xNo
build_volume_yNo
build_volume_zNo
nozzle_diameterNo
max_overhang_angleNo
Install Server

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden and does so thoroughly. It discloses the external AI provider call, auditing for printability, corrective retries, the NO_PROVIDER failure mode, provider-specific behavior (auto, openscad rejection), and the inline 3D stage behavior including mesh decimation and the caveat that the PNG preview is not the full experience.

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 clear sections (core purpose, usage guidance, provider notes, no-provider fallback, Args, and 3D stage behavior). There is some redundancy around the fallback path being mentioned more than once, but the repetition reinforces a critical decision rule and is acceptable given the tool's complexity.

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?

The description covers purpose, parameter semantics, edge cases, provider behavior, and post-success UX exceptionally well. The main gap is that it does not explicitly describe the tool's exact return value or output format beyond mentioning generated files and a preview, which could matter for an agent deciding how to use the result.

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 0% description coverage, but the Args section compensates by explaining every parameter: requirements, provider with its allowed values, material with an example, printer_model, timeout, max_attempts, build volumes, nozzle diameter, layer height, and max_overhang_angle. This adds real semantic meaning beyond the raw schema properties.

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 opening sentence clearly states a specific verb and object: "Generate a printable design via an external AI provider." It further distinguishes itself from alternative tools like compile_scad and identifies itself as the cloud provider-backed generation path, so there is no ambiguity about what the tool does or how it differs from siblings.

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

Usage Guidelines5/5

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

The description gives explicit when-to-use and when-not-to-use guidance: "This is NOT the default," use compile_scad for most custom objects, and "Reach for this tool when the shape is organic or photo-derived... AND a provider is configured." It also names design_session as the correct entry point for the saved-goal flow and instructs agents to fall back to OpenSCAD rather than asking users for an API key.

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