Skip to main content
Glama

improve_generation_prompt

Refine 3D printing prompts by adding physical constraints to fix structural issues while preserving original intent, with a sanity check to avoid contradictions.

Instructions

Generate an improved prompt from feedback.

        Adds physical constraints to the original prompt to address
        printability and structural issues, without modifying the
        creative intent.

        Patent KILN-010 claim 51 — the improved prompt is run
        through a three-check sanity gate (no contradictions, fits
        the provider budget, ≥70% original-token overlap so intent
        is preserved).  When ``enforce_sanity=True`` (default) and
        the gate fails, this tool refuses with
        ``code="SANITY_GATE_FAILED"`` and returns the failure list
        instead of a contradictory prompt.  Callers that genuinely
        want the failed prompt — for inspection, repair, or model
        self-correction — set ``enforce_sanity=False`` and read
        ``improved_prompt.sanity`` from the response.

        Args:
            original_prompt: The original generation prompt.
            failure_mode: Optional failure mode string.
            max_overhang_angle: Maximum overhang angle detected.
            min_wall_thickness: Minimum wall thickness detected.
            has_bridges: Whether bridges were detected.
            iteration: Which retry iteration this is.
            file_path: Optional path to the STL file for structural
                analysis.  When provided, the tool also analyzes
                structural risks and folds them into the improved
                prompt.
            enforce_sanity: When True (default), refuse the
                response if the prompt sanity gate fails.  Pass
                False to receive a contradictory prompt anyway —
                useful when the agent intends to repair it before
                sending to the generator.
        

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathNo
iterationNo
has_bridgesNo
failure_modeNo
enforce_sanityNo
original_promptYes
max_overhang_angleNo
min_wall_thicknessNo
Behavior4/5

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

With no annotations, the description fully discloses the sanity gate logic, refusal behavior on failure, and the effect of setting enforce_sanity=False. It does not mention potential side effects like logging, but covers the core behavioral traits comprehensively.

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 well-organized with paragraphs and an Args section, but is somewhat lengthy. Every sentence contributes value, and it front-loads the purpose effectively, though minor trimming could improve conciseness.

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 8 parameters and no output schema, the description adequately explains all parameters and behavior (sanity gate, failure mode). It references response fields like 'improved_prompt.sanity' but could elaborate on the exact output structure.

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?

Since schema description coverage is 0%, the description adds essential meaning for all 8 parameters, including context for file_path, enforce_sanity, and iteration. The Args block explains each parameter's role, greatly exceeding the schema's minimal info.

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 generates an improved prompt from feedback, adding physical constraints for printability without altering creative intent. It distinguishes itself from siblings like 'build_generation_prompt' by specifying it improves an existing prompt.

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 explains when to use the tool (to improve a prompt with feedback) and how to handle the sanity gate via the enforce_sanity parameter. It lacks explicit 'when not to use' guidance but provides clear context for its application.

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