Skip to main content
Glama

generate_model_with_provider

Destructive

Turn natural-language ideas into printable 3D models via a configured external AI provider, audit printability, and retry with corrective feedback for organic or photo-derived shapes.

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 make it with
        ``design_session(verb="generate", goal_id=..., scad_code=...)`` —
        or ``compile_scad`` on an install without ``design_session`` — 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", goal_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 making it through design_session (or
          compile_scad where design_session is not installed). 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:
            goal_id: The saved goal's id from ``design_session``, so this make
                is recorded against the goal and checked against it. Empty when
                there is no goal.
            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: Build volume X in mm.  Used only when X, Y and
                Z are all given; otherwise ``printer_model`` supplies the bed.
            build_volume_y: Build volume Y in mm.  Used only when X, Y and
                Z are all given; otherwise ``printer_model`` supplies the bed.
            build_volume_z: Build volume Z in mm.  Used only when X, Y and
                Z are all given; otherwise ``printer_model`` supplies the bed.
            nozzle_diameter: Printer nozzle diameter in mm.
            layer_height: Printer layer height in mm.
            max_overhang_angle: Supportless overhang threshold in degrees.
                Left out, the material's own limit.
            timeout: Max seconds to wait per generation attempt.
            max_attempts: Max corrective generation attempts.

INLINE 3D STAGE: on success this tool 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.

MAKE DOORS: design_session, Kiln's front door for making an object, is not installed here (signed in to Kiln it runs on Kiln's servers). On this install compile_scad IS the make → preview → iterate loop: make it, show the preview, iterate.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "requirements": "<requirements>"
    },
    "name": "generate_model_with_provider"
  }
}

Input Schema

NameRequiredDescriptionDefault
styleNoOptional style hint for providers that support it.
goal_idNoThe saved goal's id from ``design_session``, so this make is recorded against the goal and checked against it. Empty when there is no goal. Default: "".
timeoutNoMax seconds to wait per generation attempt. Default: 600.
materialNoOptional material target (e.g. ``"petg"``).
providerNo``auto``, ``gemini``, ``meshy``, ``tripo3d``, or ``stability``. Default: "auto".
output_dirNoOptional directory for generated files.
layer_heightNoPrinter layer height in mm.
max_attemptsNoMax corrective generation attempts. Default: 2.
requirementsYesNatural-language description of the part to create.
printer_modelNoOptional printer model ID (e.g. ``"bambu_a1"``).
build_volume_xNoBuild volume X in mm. Used only when X, Y and Z are all given; otherwise ``printer_model`` supplies the bed.
build_volume_yNoBuild volume Y in mm. Used only when X, Y and Z are all given; otherwise ``printer_model`` supplies the bed.
build_volume_zNoBuild volume Z in mm. Used only when X, Y and Z are all given; otherwise ``printer_model`` supplies the bed.
nozzle_diameterNoPrinter nozzle diameter in mm.
max_overhang_angleNoSupportless overhang threshold in degrees. Left out, the material's own limit.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed8 schema fields changedv1.6.0
    • removedInput schema / properties / brief_id
      Removed value: -{
      -  "description": "The saved goal's id from ``design_session``, so this make is recorded against the goal and checked against it. Empty when there is no goal. Default: \"\".",
      -  "title": "Brief Id",
      -  "type": "string"
      -}
    • addedInput schema / properties / goal_id
      Added value: +{
      +  "description": "The saved goal's id from ``design_session``, so this make is recorded against the goal and checked against it. Empty when there is no goal. Default: \"\".",
      +  "title": "Goal Id",
      +  "type": "string"
      +}
    • addedInput schema / properties / layer_height / anyOf
      Added value: +[
      +  {
      +    "type": "number"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / layer_height / description
      Previous value: -"Printer layer height in mm. Default: 0.2."New value: +"Printer layer height in mm."
    • removedInput schema / properties / layer_height / type
      Removed value: -"number"
    • addedInput schema / properties / max_overhang_angle / anyOf
      Added value: +[
      +  {
      +    "type": "number"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / max_overhang_angle / description
      Previous value: -"Supportless overhang threshold in degrees. Default: 45.0."New value: +"Supportless overhang threshold in degrees. Left out, the material's own limit."
    • removedInput schema / properties / max_overhang_angle / type
      Removed value: -"number"
  2. Changed15 schema fields changedv1.5.1
    • changedInput schema / properties / brief_id / description
      Previous value: -"Default: \"\"."New value: +"The saved goal's id from ``design_session``, so this make is recorded against the goal and checked against it. Empty when there is no goal. Default: \"\"."
    • addedInput schema / properties / build_volume_x / description
      Added value: +"Build volume X in mm.  Used only when X, Y and Z are all given; otherwise ``printer_model`` supplies the bed."
    • addedInput schema / properties / build_volume_y / description
      Added value: +"Build volume Y in mm.  Used only when X, Y and Z are all given; otherwise ``printer_model`` supplies the bed."
    • addedInput schema / properties / build_volume_z / description
      Added value: +"Build volume Z in mm.  Used only when X, Y and Z are all given; otherwise ``printer_model`` supplies the bed."
    • changedInput schema / properties / layer_height / description
      Previous value: -"Default: 0.2."New value: +"Printer layer height in mm. Default: 0.2."
    • addedInput schema / properties / material / description
      Added value: +"Optional material target (e.g. ``\"petg\"``)."
    • changedInput schema / properties / max_attempts / description
      Previous value: -"Default: 2."New value: +"Max corrective generation attempts. Default: 2."
    • changedInput schema / properties / max_overhang_angle / description
      Previous value: -"Default: 45.0."New value: +"Supportless overhang threshold in degrees. Default: 45.0."
    • addedInput schema / properties / nozzle_diameter / description
      Added value: +"Printer nozzle diameter in mm."
    • addedInput schema / properties / output_dir / description
      Added value: +"Optional directory for generated files."
    • addedInput schema / properties / printer_model / description
      Added value: +"Optional printer model ID (e.g. ``\"bambu_a1\"``)."
    • changedInput schema / properties / provider / description
      Previous value: -"Default: \"auto\"."New value: +"``auto``, ``gemini``, ``meshy``, ``tripo3d``, or ``stability``. Default: \"auto\"."
    • addedInput schema / properties / requirements / description
      Added value: +"Natural-language description of the part to create."
    • addedInput schema / properties / style / description
      Added value: +"Optional style hint for providers that support it."
    • changedInput schema / properties / timeout / description
      Previous value: -"Default: 600."New value: +"Max seconds to wait per generation attempt. Default: 600."
  3. Changed21 schema fields changedv1.5.0
    • addedInput schema / properties / brief_id
      Added value: +{
      +  "description": "Default: \"\".",
      +  "title": "Brief Id",
      +  "type": "string"
      +}
    • removedInput schema / properties / build_volume_x / default
      Removed value: -null
    • removedInput schema / properties / build_volume_y / default
      Removed value: -null
    • removedInput schema / properties / build_volume_z / default
      Removed value: -null
    • removedInput schema / properties / layer_height / default
      Removed value: -0.2
    • addedInput schema / properties / layer_height / description
      Added value: +"Default: 0.2."
    • removedInput schema / properties / material / default
      Removed value: -null
    • removedInput schema / properties / max_attempts / default
      Removed value: -2
    • addedInput schema / properties / max_attempts / description
      Added value: +"Default: 2."
    • removedInput schema / properties / max_overhang_angle / default
      Removed value: -45
    • addedInput schema / properties / max_overhang_angle / description
      Added value: +"Default: 45.0."
    • addedInput schema / properties / nozzle_diameter / anyOf
      Added value: +[
      +  {
      +    "type": "number"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedInput schema / properties / nozzle_diameter / default
      Removed value: -0.4
    • removedInput schema / properties / nozzle_diameter / type
      Removed value: -"number"
    • removedInput schema / properties / output_dir / default
      Removed value: -null
    • removedInput schema / properties / printer_model / default
      Removed value: -null
    • removedInput schema / properties / provider / default
      Removed value: -"auto"
    • addedInput schema / properties / provider / description
      Added value: +"Default: \"auto\"."
    • removedInput schema / properties / style / default
      Removed value: -null
    • removedInput schema / properties / timeout / default
      Removed value: -600
    • addedInput schema / properties / timeout / description
      Added value: +"Default: 600."
  4. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

Beyond the annotations it discloses the audit-then-corrective-retry loop, the NO_PROVIDER error condition, the deliberate rejection of provider="openscad", provider selection semantics for "auto", and side effects like inline stage opening and automatic mesh decimation. The gap is that destructiveHint=true is never explained — nothing says whether files in output_dir are overwritten or what state is lost — and openWorldHint=false sits in mild tension with "hands a natural-language description to an external idea-to-3D service" (defensible only because providers are a closed enumerated set).

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The core routing decision is front-loaded, which is good, but the text repeats itself: the free OpenSCAD fallback is explained three times (main paragraph, provider notes, no-provider fallback), and the Args block duplicates schema descriptions verbatim for all 15 parameters. The appended INLINE 3D STAGE and MAKE DOORS blocks add useful context but also bulk that could be tightened.

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 15-parameter, network-dependent, retry-driven tool with no output schema, the description covers prerequisites, failure modes, retry behavior, and the resulting user-visible stage. It stops short of saying what the tool returns (file paths? mesh handle? audit report?) and never explains the destructiveHint=true consequences, which is the one material omission.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% and the Args block largely restates the schema, so it adds little. The genuinely useful additions — build_volume_x/y/z being honored only when all three are supplied, otherwise printer_model supplies the bed, and max_overhang_angle falling back to the material's limit — are already present in the schema descriptions. Baseline 3 is correct.

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?

Opens with a specific verb+resource ("Generate a printable design via an external AI provider") and immediately positions it against siblings: the free keyless OpenSCAD path via design_session(verb="generate") or compile_scad. It also names what it is NOT ("This is NOT the default") and why (organic/photo-derived shapes plus a configured provider), so an agent can classify it without opening the schema.

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?

Gives explicit when-to-use (organic or photo-derived shapes hard to express in OpenSCAD AND a provider configured), when-not-to-use (default path is authoring OpenSCAD yourself), an alternative routing for saved-goal flows (call through design_session(verb="generate", goal_id=...) instead of directly), and a failure protocol (on NO_PROVIDER do NOT ask for an API key — fall back to design_session/compile_scad). This is about as complete as usage guidance gets.

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

Deploy Server

Other Tools