stitch_to_compose
Convert Stitch screen HTML into a Jetpack Compose Material 3 composable and report off-token colors and warnings.
Instructions
Convert a Stitch screen to a Jetpack Compose (Material 3) composable. Reports off-token colours and warnings.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "stitch_to_compose"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | HTTPS download URL of the screen HTML (a public https URL; Stitch downloadUrls need OAuth, so pass that HTML via html instead). | |
| html | No | Stitch screen HTML (the export, including the tailwind-config script). | |
| mode | No | state: stateless screen with a State struct + sample, Identifiable rows, a tab Picker, localized keys and callbacks (no ViewModel). | layout |
| name | No | Generated view/composable name. | StitchScreen |
| path | No | Path to a Stitch HTML file. Used when html is not given. | |
| config | No | stitch-native.json contents: {"targets": ["swiftui","compose","html"], "colors": {token|#hex: expr}, "colorsHtml": {token|#hex: cssValue}, "fonts": {token: expr}, "icons": {material: sfSymbol}, "iconsCompose": {material: "Icons.X.Y"}, "iconsHtml": {material: text or inline svg}, "preview": {"colorScheme": "dark|light"}}. Alias: map. Without config, config_path or map, the server looks for stitch-native.json next to `path` and in its parent directories (first one found). | |
| config_path | No | Path to a stitch-native.json. Used when config is not given. |