Skip to main content
Glama

generate_model_with_provider

Turns a natural-language description into a printable 3D model via an external AI provider, audits for printability, and retries with feedback from failed attempts.

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.
        

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
Behavior4/5

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

No annotations exist, so description carries full burden. Discloses use of external AI, audit for printability, corrective retries, NO_PROVIDER fallback, and provider preferences. Minor gaps on exact error modes or rate limits.

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?

Well-structured with a summary, usage guidance, provider notes, fallback, and parameter list. Some minor redundancy but every section adds value; appropriately sized for a complex tool.

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?

Covers purpose, usage, behavior, and parameters comprehensively given no output schema or annotations. Lacks explicit return value description but is otherwise sufficient for agent invocation.

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 description coverage is 0%, so description compensates with a list of all 14 parameters and brief meanings. Lacks detailed constraints or examples, but provides enough context beyond the schema types and defaults.

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?

Clearly states the tool generates a printable design via an external AI provider. Distinguishes from siblings by explicitly noting it's not the default and contrasting with compile_scad and design_session.

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?

Provides explicit guidance on when to use: for organic/photo-derived shapes hard in OpenSCAD and when a provider is configured. Alternative paths (compile_scad, design_session) are named with clear conditions.

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