Skip to main content
Glama

dreamlayer_generate

Generate original images, edits, cutouts, upscales, or sprite animations from a text prompt or reference image, with paid work capped by your credit budget.

Instructions

Use when the user needs an original image, raster logo concept, product or marketing visual, an edit, transparent cutout, upscale, or reference-based sprite animation. Starts paid work within the user's authorized scope and budget. Text-to-image needs a prompt; other operations need input_asset_id. Select operation explicitly. Image operations cost one credit; sprite beta accepts 7–100 frames and returns a ZIP. Read sprite_pricing, round the whole quote upward once to 0.1 credit and set max_credits. Returns execution_id, status, asset, question and last_event_id. needs_input is a question; running work must be resumed, not replaced. No sprite cancellation; failed/expired holds are restored. Not a vector-logo, print-validation, product-fidelity or animation-quality guarantee.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
promptNoWhat to generate, or how to change the reference, in plain language (1–4000 characters). Required unless respond is used; text_to_image needs it, and a short statement of intent is enough for background_remove or upscale.
optionsNoSprites: supply exactly one of action (legacy preset) or animation_prompt (any subject/action, including turntables). animation_mode defaults to loop for presets, once for custom prompts. Broad requests do not guarantee quality; partial transparency depends on background removal.
respondNoAnswer a previous question. Requires conversation_id.
operationNoName it to run deterministically and skip interpretation, so the request cannot come back as a question. Omit it to let DreamLayer read the prompt.
max_creditsNoSpending cap for this request in credits (0.1–100, default 1). Image operations require exactly 1. Sprite jobs must be capped at or above the sprite_pricing quote rounded up to one decimal.
aspect_ratioNoOutput aspect ratio (default 1:1).
input_asset_idNoFrom dreamlayer_upload_image. Required for every operation except text_to_image.
conversation_idNoUUID of an existing conversation to continue, as returned by an earlier dreamlayer_generate call. Required with respond; omit to start a new conversation.
idempotency_keyNoChoose and save one key per logical request before calling. Reuse that key AND identical arguments after an uncertain response. If omitted, a generated key is returned for recovery.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
assetNo
errorNo
eventsNo
statusNo
questionNo
execution_idNo
last_event_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed8 schema fields changed
    • changedInput schema / properties / aspect_ratio / description
      Previous value: -"One of 1:1, 16:9, 9:16, 4:3, 3:4."New value: +"Output aspect ratio (default 1:1)."
    • addedInput schema / properties / aspect_ratio / enum
      Added value: +[
      +  "1:1",
      +  "16:9",
      +  "9:16",
      +  "4:3",
      +  "3:4"
      +]
    • addedInput schema / properties / conversation_id / description
      Added value: +"UUID of an existing conversation to continue, as returned by an earlier dreamlayer_generate call. Required with respond; omit to start a new conversation."
    • changedInput schema / properties / idempotency_key / description
      Previous value: -"Optional. Generated automatically. Supply the SAME one to retry safely."New value: +"Choose and save one key per logical request before calling. Reuse that key AND identical arguments after an uncertain response. If omitted, a generated key is returned for recovery."
    • addedInput schema / properties / max_credits
      Added value: +{
      +  "description": "Spending cap for this request in credits (0.1–100, default 1). Image operations require exactly 1. Sprite jobs must be capped at or above the sprite_pricing quote rounded up to one decimal.",
      +  "maximum": 100,
      +  "minimum": 0.1,
      +  "type": "number"
      +}
    • addedInput schema / properties / options
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "Sprites: supply exactly one of action (legacy preset) or animation_prompt (any subject/action, including turntables). animation_mode defaults to loop for presets, once for custom prompts. Broad requests do not guarantee quality; partial transparency depends on background removal.",
      +  "oneOf": [
      +    {
      +      "required": [
      +        "action"
      +      ]
      +    },
      +    {
      +      "required": [
      +        "animation_prompt"
      +      ]
      +    }
      +  ],
      +  "properties": {
      +    "action": {
      +      "description": "Legacy motion preset. Use either action or animation_prompt, not both.",
      +      "enum": [
      +        "walk",
      +        "run",
      +        "idle"
      +      ],
      +      "type": "string"
      +    },
      +    "animation_mode": {
      +      "description": "loop for a seamless cycle, once for a single pass. Defaults to loop for presets and once for custom prompts.",
      +      "enum": [
      +        "loop",
      +        "once"
      +      ],
      +      "type": "string"
      +    },
      +    "animation_prompt": {
      +      "description": "The motion to animate, in plain language (1–4000 characters), e.g. a jump or a turntable.",
      +      "maxLength": 4000,
      +      "minLength": 1,
      +      "type": "string"
      +    },
      +    "frame_count": {
      +      "default": 12,
      +      "description": "Number of frames in the sheet (7–100). The sprite price depends only on this value.",
      +      "maximum": 100,
      +      "minimum": 7,
      +      "type": "integer"
      +    },
      +    "frame_size": {
      +      "default": 512,
      +      "description": "Square export canvas, not source detail. Larger exports may be enlarged. Pricing depends only on frame count.",
      +      "enum": [
      +        32,
      +        64,
      +        128,
      +        256,
      +        512,
      +        720,
      +        1080
      +      ],
      +      "type": "integer"
      +    }
      +  },
      +  "type": "object"
      +}
    • addedInput schema / properties / prompt / description
      Added value: +"What to generate, or how to change the reference, in plain language (1–4000 characters). Required unless respond is used; text_to_image needs it, and a short statement of intent is enough for background_remove or upscale."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "properties": {
      +    "asset": {
      +      "type": [
      +        "object",
      +        "null"
      +      ]
      +    },
      +    "error": {
      +      "properties": {
      +        "execution_id": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "idempotency_key": {
      +          "type": "string"
      +        },
      +        "reason": {
      +          "type": "string"
      +        },
      +        "request_id": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "retryable": {
      +          "type": "boolean"
      +        }
      +      },
      +      "required": [
      +        "reason",
      +        "retryable"
      +      ],
      +      "type": "object"
      +    },
      +    "events": {
      +      "items": {
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "execution_id": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "last_event_id": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "question": {
      +      "type": [
      +        "object",
      +        "null"
      +      ]
      +    },
      +    "status": {
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
  2. First observedv0.2.0

TDQS

A4.6/5.0
Behavior5/5

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

The description adds substantial behavioral context beyond the annotations: paid work and credit costs, sprite ZIP output, round-up-to-0.1-credit rule, returned fields (execution_id, status, asset, question, last_event_id), 'needs_input' as a question, requirement to resume rather than replace running work, and the no-cancellation/restore policy for sprite holds. This is far richer than the minimal annotation hints and contains no contradictions.

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 dense but well-structured: it front-loads the primary use cases, then systematically covers prerequisites, costs, response fields, and caveats. Every sentence serves a purpose; there is minimal fluff, though the length is warranted by the tool's complexity.

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?

For a 9-parameter tool with nested options and an output schema, the description covers operational context (when to use), financial impact (credits and rounding), input requirements (prompt vs asset), output shape (ZIP for sprites, key return fields), and exception handling (questions, resume, cancellation/restore). The presence of an output schema reduces the need to explain return values, and the description still goes beyond that.

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 100%, so the baseline is 3. The description adds valuable cross-parameter relationships: it pairs prompt with text_to_image, input_asset_id with all other operations, and explains how max_credits must be computed from sprite_pricing (round up to 0.1). These semantics are not present in the input schema and materially help correct parameter selection.

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 explicitly names a wide but specific set of deliverables (original image, raster logo concept, product or marketing visual, edit, transparent cutout, upscale, sprite animation) and states the start-up action 'Starts paid work.' This clearly distinguishes it from siblings like upload/download/execution, which handle transport and status rather than generation.

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 opens with 'Use when the user needs...' which provides a clear trigger. It also gives conditional prerequisites ('Text-to-image needs a prompt; other operations need input_asset_id') and explicit exclusions ('Not a vector-logo, print-validation, product-fidelity or animation-quality guarantee'). It does not name sibling tools as alternatives, but the usage context is sufficiently clear for an agent to decide when to invoke this tool.

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