ui_to_artifact
Convert UI screenshots into frontend code, AI prompts, design specs, or text descriptions. Use it to turn visual designs into build-ready artifacts for coding agents.
Instructions
Convert UI screenshots into various artifacts: code, prompts, design specifications, or descriptions.
Use this tool ONLY when the user wants to:
Generate frontend code from UI design (output_type='code')
Create AI prompts for UI generation (output_type='prompt')
Extract design specifications (output_type='spec')
Get natural language description of the UI (output_type='description')
Do NOT use for: screenshots containing text/code to extract, error messages, diagrams, or data visualizations.
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": {
"image_source": "<image_source>",
"output_type": "<output_type>",
"prompt": "<prompt>"
},
"name": "ui_to_artifact"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes | Detailed instructions describing what to generate from this UI image. Should clearly state the desired output and any specific requirements. | |
| output_type | Yes | Type of output to generate. Options: 'code' (generate frontend code), 'prompt' (generate AI prompt for recreating this UI), 'spec' (generate design specification document), 'description' (natural language description of the UI). | |
| image_source | Yes | Local file path or remote URL to the image |