Skip to main content
Glama

Run Design Loop

design_loop

Use this when you need to run a CAD design loop over multiple attempts. Run an agent CAD design loop over one or more attempt scripts: review each attempt with review_cad, continue past functional attempts that still have unresolved review warnings, return structured repair prompts, and optionally write a Studio-compatible build record JSON for visual replay.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
goalYesOriginal user design goal. Fed into every review_cad repair prompt.
assemblyNo
attemptsYesOrdered design attempts. Each item is { id?, title?, file? OR code?, visualReview? } — provide file or code (at least one). File attempts can be replayed by Studio build records.
epsilonMm3NoForwarded to review_cad.
stopOnPassNoStop after the first attempt that is functional and passes the quality gate. Default true.
recordTitleNoOptional title for the build record.
combinatorialNoSample all 2^N limit-corner combinations across mates with declared limits. Capped at 8 mates with limits; combine with samplesPerMate for both interior coverage and worst-pose detection. Default false.
samplesPerMateNoPose-envelope samples per declared-limit mate. 1 (default) = corners only; >=3 adds uniform interior points between min and max. Total samples per non-locked mate = samplesPerMate.
gripperApertureNoOptional gripper aperture request forwarded to review_cad.
trackConnectorsNoConnector refs to track across sampled poses.
outputRecordPathNoOptional JSON path to write a Studio-compatible build record.
preserveInterfacesNoExternal mates, connector refs, part names, or behavioral interfaces the agent must preserve between attempts.
allowReviewWarningsNoWarning diagnostic codes the original prompt explicitly allows. Other review warnings keep the loop iterating even if review_cad is functionally ok.
includeInterferenceNoForwarded to review_cad. Default true.
includePoseEnvelopeNoForwarded to review_cad. Default true.
requireVisualReviewNoRequire screenshot-backed visualReview with structured checks before accepting an attempt. Default true; set false only for explicit non-visual batch checks.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYes
goalYesEchoed design goal.
recordNoStudio-compatible build record (when requested).
attemptsYesPer-attempt review results.
recordUrlNo
finalAttemptIdNo
nextActionPromptNo
outputRecordPathNo

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already indicate readOnlyHint=false, openWorldHint=false, destructiveHint=false. The description adds behavioral context: it iterates over attempts, uses review_cad, can write build records, and returns structured repair prompts. This complements the annotations effectively.

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

Conciseness5/5

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

The description is four concise sentences front-loaded with when to use. Every sentence adds value, and there is no redundancy or filler.

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 high number of parameters (16) and nested objects, the description provides a good high-level process. The schema covers most parameters and the output schema exists, so the description does not need to detail return values. Slightly more detail on the loop termination condition would enhance completeness.

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?

The schema covers 94% of parameters with descriptions, so the baseline is 3. The tool description does not add further meaning beyond what the schema provides, so no extra 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 action: 'run a CAD design loop over multiple attempts.' It specifies the process (review, continue, return repair prompts, optionally write build record) and distinguishes it from sibling tools like review_cad and individual add_* tools by its loop/orchestration nature.

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 opens with 'Use this when you need to run a CAD design loop over multiple attempts,' providing clear context. However, it does not explicitly state when not to use it or suggest alternatives, which would improve guidance.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

TDQS

A3.9/5.0
Disambiguation4/5

Tools are mostly distinct, with clear descriptions for each. However, there is some potential overlap between inspection tools like 'inspect' and 'mesh_summary', and between rendering tools 'render_preview' and 'get_latest_render', which could cause minor confusion.

Naming Consistency5/5

All tool names follow a consistent snake_case verb_noun pattern, making it predictable for an agent to infer functionality.

Tool Count2/5

44 tools is significantly higher than the typical well-scoped range of 3-15. While the domain is complex, the count feels excessive and could overwhelm an agent.

Completeness4/5

The tool set covers an extensive range of CAD operations including creation, inspection, rendering, export, and verification. Minor gaps exist, such as direct sketch editing tools, but overall it is comprehensive.