Skip to main content
Glama

iterate_design

Turn a prompt into a validated 3D-printable model. Detects printability issues, improves the design, and regenerates until validation passes, then returns the best result.

Instructions

Automated design iteration: generate -> validate -> improve -> regenerate.

        Runs a closed loop that generates a model, validates it for
        printability issues, and if issues are found, improves the prompt
        and regenerates.  Stops when the model passes validation or
        max_iterations is reached.  Returns the best result.

        :param prompt: Text description or OpenSCAD code.
        :param provider: Generation provider (default ``"openscad"``).
        :param max_iterations: Maximum improvement attempts (1-5).
        :param material: Optional material for design intelligence.
        :param printer_model: Optional printer model for constraints.
        :param brief_id: Optional saved-goal id from ``design_session``.
            When supplied AND the best iteration produced a mesh, a
            ``design_brief:<id>`` intent sidecar is written next to
            the produced file so the audit's "matches what you
            asked for" gate, the brief failure_history wiring, and
            the ``compare_design_versions`` intent diff all light
            up against the saved goal — without the user having to
            re-attach the brief after every iteration round.
            Best-effort: kiln-pro not installed silently skips.
        :returns: Dict with the best result and iteration history.

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
promptYes
brief_idNo
materialNo
providerNoopenscad
printer_modelNo
max_iterationsNo
Install Server

TDQS

A4.7/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. It discloses several important behaviors: the loop stops when validation passes or max_iterations is reached, it returns the best result, it writes a sidecar file when brief_id is supplied and a mesh is produced, it skips silently if kiln-pro is absent, and it opens an interactive 3D stage with automatic decimation for large meshes. This is exceptionally transparent.

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 verbose but well-structured: a concise process summary, then a parameter block, then a behavioral note about the 3D stage. Every sentence provides useful context, though the inline restructuredText parameter documentation could be slightly more compact.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers the algorithm, all parameters and defaults, the return value ('Dict with best result and iteration history'), side effects (sidecar file, 3D stage), and edge cases (best-effort skip, decimation). Given no output schema, this is complete enough for an agent to select and invoke 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?

Despite 0% schema description coverage, the description includes a full :param list for all six parameters, with defaults, types, and conditional semantics (especially brief_id's side-effect behavior). This adds substantial meaning beyond the schema's bare property titles.

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 process definition ('Automated design iteration: generate -> validate -> improve -> regenerate') and explains the closed-loop behavior, distinguishing it from single-shot generation or validation tools. The title and description together make the tool's purpose unmistakable.

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?

It states when to use the tool ('Runs a closed loop...') and specifies the stopping conditions. It also gives conditional guidance for brief_id and best-effort behavior. However, it does not explicitly mention alternatives like generate_model or validate_openscad_code, only implying this tool is for iterative design refinement.

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