generate_image
Generate an image from a text prompt on a remote server and save it as a local PNG file, receiving the file path in response.
Instructions
Generate an image from a text prompt on the remote server.
The image is saved as a local PNG file; the returned text includes the absolute path of the saved file.
Args: prompt: Text description of the image to generate. model: Model id (from list_models). Defaults to MLX_SERVE_IMAGE_MODEL (or the built-in default if unset). size: Output dimensions, e.g. "512x512" or "1024x1024". seed: Optional random seed for reproducibility. steps: Sampling steps (backend-specific). cfg_scale: Classifier-free guidance scale (SDXL/Flux style). guidance_scale: Guidance scale (MAGE-Flow style).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"prompt": "<prompt>"
},
"name": "generate_image"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| seed | No | ||
| size | No | ||
| model | No | ||
| steps | No | ||
| prompt | Yes | ||
| cfg_scale | No | ||
| guidance_scale | No |