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
- Read capabilities and balance.
- Confirm the requested operation and its cost with the user. Image operations cost one credit; sprites require their quoted
max_credits. - For a reference operation, upload the selected file once.
- Choose and save an
idempotency_key, then calldreamlayer_generatewith the operation and inputs. - Read
status. If it asks a question, collect the missing input. If still running, resume events or read execution state. - Download only after completion.
Recovery rules
Usedreamlayer_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.