Skip to main content
Requires version 0.4.0-beta.2 or later. Install this beta explicitly with npx -y @dreamlayer/mcp@0.4.0-beta.3. Connect the Image Agent MCP Server, then let your client call tools/list. The generation operation enum is narrowed using the hosted API’s capabilities. A temporary capability lookup failure falls back to the built-in image operations; it does not prove account access.

First successful workflow

  1. Read capabilities and balance.
  2. Confirm the requested operation and its cost with the user. Image operations cost one credit; sprites require their quoted max_credits.
  3. For a reference operation, upload the selected file once.
  4. Choose and save an idempotency_key, then call dreamlayer_generate with the operation and inputs.
  5. Read status. If it asks a question, collect the missing input. If still running, resume events or read execution state.
  6. Download only after completion.

Recovery rules

Use dreamlayer_execution, not a fresh generation, after a dropped connection. Pass the last processed event ID to dreamlayer_events. Reuse the same input asset ID, key, and arguments if replay is necessary. A new upload changes the request. Errors return isError: true and a JSON error with reason, retryable, and request_id. Do not treat a question or a stream boundary as a failed generation. The protocol’s text content remains available to clients that do not consume structured results. Use the installed package’s tools/list response as the authority for metadata available in that version. Tool annotations describe effects; clients still own permission decisions. See limits, retry handling, and CLI automation.