generate_component_variants
Analyzes a screen to identify a component, then generates multiple visual variants for A/B testing or component libraries.
Instructions
Analyses a screen to identify a target component (button, card, hero, form, navigation) and generates multiple visual variants of it as separate screens. Useful for A/B testing or building component libraries.
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": {
"projectId": "<projectId>",
"screenId": "<screenId>",
"componentType": "<componentType>"
},
"name": "generate_component_variants"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| screenId | Yes | The source screen ID containing the component. | |
| projectId | Yes | The Stitch project ID. | |
| deviceType | No | Target device type. | DESKTOP |
| variantCount | No | Number of variants to generate (1-5). | |
| componentType | Yes | The type of component to generate variants for. | |
| variantStyles | No | Specific visual styles for the variants. If omitted, a diverse mix is used. |