Generate UI Preview
generate_ui_previewTurns natural-language UI descriptions into mockup images with Google Gemini, returning the preview inline and saving a PNG to disk for review.
Instructions
Generate a high-fidelity UI mockup image using Google Gemini image generation. Returns an inline image and saves the PNG to disk.
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>",
"component_name": "<component_name>"
},
"name": "generate_ui_preview"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | Gemini model to use for image generation | gemini-2.0-flash-exp |
| prompt | Yes | Description of the UI component or page to generate | |
| output_dir | No | Directory to save the generated image | ./previews |
| style_hints | No | Additional style guidance (e.g. 'dark mode', 'mobile layout', 'minimal') | |
| aspect_ratio | No | Aspect ratio for the generated image | 16:9 |
| component_name | Yes | Name for the component (used in the output filename) |