stitch-kit 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +139 -0
- package/CHANGELOG.md +86 -0
- package/README.md +167 -0
- package/agents/stitch-kit.md +93 -0
- package/bin/stitch-kit.mjs +430 -0
- package/docs/architecture.md +118 -0
- package/docs/color-prompt-guide.md +119 -0
- package/docs/mcp-naming-convention.md +64 -0
- package/docs/mcp-schemas/README.md +130 -0
- package/docs/mcp-schemas/apply_design_system.json +36 -0
- package/docs/mcp-schemas/create_design_system.json +78 -0
- package/docs/mcp-schemas/create_project.json +290 -0
- package/docs/mcp-schemas/delete_project.json +20 -0
- package/docs/mcp-schemas/edit_screens.json +46 -0
- package/docs/mcp-schemas/generate_screen_from_text.json +242 -0
- package/docs/mcp-schemas/generate_variants.json +77 -0
- package/docs/mcp-schemas/get_project.json +137 -0
- package/docs/mcp-schemas/get_screen.json +92 -0
- package/docs/mcp-schemas/list_design_systems.json +32 -0
- package/docs/mcp-schemas/list_projects.json +136 -0
- package/docs/mcp-schemas/list_screens.json +56 -0
- package/docs/mcp-schemas/update_design_system.json +32 -0
- package/docs/mcp-schemas/upload_screens_from_images.json +52 -0
- package/docs/prd-to-stitch-workflow.md +137 -0
- package/docs/skills-index.md +108 -0
- package/docs/tailwind-reference.md +207 -0
- package/package.json +41 -0
- package/skills/stitch-a11y/SKILL.md +428 -0
- package/skills/stitch-a11y/resources/audit-checklist.md +102 -0
- package/skills/stitch-animate/SKILL.md +371 -0
- package/skills/stitch-animate/resources/animation-patterns.md +248 -0
- package/skills/stitch-design-md/SKILL.md +215 -0
- package/skills/stitch-design-md/examples/DESIGN.md +54 -0
- package/skills/stitch-design-md/examples/usage.md +67 -0
- package/skills/stitch-design-md/scripts/fetch-stitch.sh +35 -0
- package/skills/stitch-design-system/SKILL.md +314 -0
- package/skills/stitch-design-system/resources/tokens-template.css +237 -0
- package/skills/stitch-html-components/SKILL.md +344 -0
- package/skills/stitch-html-components/resources/architecture-checklist.md +74 -0
- package/skills/stitch-html-components/scripts/fetch-stitch.sh +45 -0
- package/skills/stitch-loop/SKILL.md +183 -0
- package/skills/stitch-loop/examples/SITE.md +39 -0
- package/skills/stitch-loop/examples/next-prompt.md +24 -0
- package/skills/stitch-loop/examples/usage.md +77 -0
- package/skills/stitch-mcp-apply-design-system/SKILL.md +82 -0
- package/skills/stitch-mcp-create-design-system/SKILL.md +117 -0
- package/skills/stitch-mcp-create-project/SKILL.md +77 -0
- package/skills/stitch-mcp-delete-project/SKILL.md +62 -0
- package/skills/stitch-mcp-edit-screens/SKILL.md +121 -0
- package/skills/stitch-mcp-generate-screen-from-text/SKILL.md +102 -0
- package/skills/stitch-mcp-generate-screen-from-text/examples/desktop.md +53 -0
- package/skills/stitch-mcp-generate-screen-from-text/examples/mobile.md +71 -0
- package/skills/stitch-mcp-generate-variants/SKILL.md +124 -0
- package/skills/stitch-mcp-get-project/SKILL.md +67 -0
- package/skills/stitch-mcp-get-screen/SKILL.md +117 -0
- package/skills/stitch-mcp-get-screen/scripts/fetch-stitch.sh +35 -0
- package/skills/stitch-mcp-list-design-systems/SKILL.md +84 -0
- package/skills/stitch-mcp-list-projects/SKILL.md +77 -0
- package/skills/stitch-mcp-list-screens/SKILL.md +69 -0
- package/skills/stitch-mcp-update-design-system/SKILL.md +82 -0
- package/skills/stitch-mcp-upload-screens-from-images/SKILL.md +95 -0
- package/skills/stitch-mcp-upload-screens-from-images/scripts/encode-image.sh +43 -0
- package/skills/stitch-nextjs-components/SKILL.md +181 -0
- package/skills/stitch-nextjs-components/resources/architecture-checklist.md +65 -0
- package/skills/stitch-nextjs-components/resources/component-template.tsx +101 -0
- package/skills/stitch-nextjs-components/scripts/fetch-stitch.sh +45 -0
- package/skills/stitch-orchestrator/SKILL.md +337 -0
- package/skills/stitch-orchestrator/examples/workflow.md +173 -0
- package/skills/stitch-react-components/SKILL.md +236 -0
- package/skills/stitch-react-components/references/tailwind-to-react.md +117 -0
- package/skills/stitch-react-components/resources/architecture-checklist.md +34 -0
- package/skills/stitch-react-components/resources/component-template.tsx +35 -0
- package/skills/stitch-react-components/scripts/fetch-stitch.sh +35 -0
- package/skills/stitch-react-native-components/SKILL.md +333 -0
- package/skills/stitch-react-native-components/resources/architecture-checklist.md +74 -0
- package/skills/stitch-react-native-components/resources/component-template.tsx +104 -0
- package/skills/stitch-react-native-components/scripts/fetch-stitch.sh +45 -0
- package/skills/stitch-remotion/SKILL.md +280 -0
- package/skills/stitch-setup/SKILL.md +183 -0
- package/skills/stitch-shadcn-ui/SKILL.md +255 -0
- package/skills/stitch-skill-creator/SKILL.md +257 -0
- package/skills/stitch-skill-creator/references/output-patterns.md +71 -0
- package/skills/stitch-skill-creator/scripts/init_stitch_skill.py +229 -0
- package/skills/stitch-svelte-components/SKILL.md +282 -0
- package/skills/stitch-svelte-components/resources/architecture-checklist.md +62 -0
- package/skills/stitch-svelte-components/resources/component-template.svelte +193 -0
- package/skills/stitch-svelte-components/scripts/fetch-stitch.sh +36 -0
- package/skills/stitch-swiftui-components/SKILL.md +424 -0
- package/skills/stitch-swiftui-components/resources/architecture-checklist.md +83 -0
- package/skills/stitch-swiftui-components/resources/component-template.swift +131 -0
- package/skills/stitch-swiftui-components/resources/layout-mapping.md +155 -0
- package/skills/stitch-swiftui-components/scripts/fetch-stitch.sh +45 -0
- package/skills/stitch-ued-guide/SKILL.md +124 -0
- package/skills/stitch-ui-design-spec-generator/SKILL.md +115 -0
- package/skills/stitch-ui-design-spec-generator/examples/usage.md +79 -0
- package/skills/stitch-ui-design-variants/SKILL.md +127 -0
- package/skills/stitch-ui-prompt-architect/SKILL.md +196 -0
- package/skills/stitch-ui-prompt-architect/references/KEYWORDS.md +170 -0
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# Stitch MCP Naming Convention
|
|
2
|
+
|
|
3
|
+
## Rule
|
|
4
|
+
|
|
5
|
+
MCP wrapper skills follow the pattern: `stitch-mcp-<tool>` where `<tool>` is the MCP tool name with underscores replaced by hyphens.
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
MCP tool name (snake_case) → skill name (kebab-case)
|
|
9
|
+
generate_screen_from_text → stitch-mcp-generate-screen-from-text
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Tool → skill mapping
|
|
13
|
+
|
|
14
|
+
| MCP tool name | Skill name |
|
|
15
|
+
|---------------|-----------|
|
|
16
|
+
| `create_project` | `stitch-mcp-create-project` |
|
|
17
|
+
| `list_projects` | `stitch-mcp-list-projects` |
|
|
18
|
+
| `get_project` | `stitch-mcp-get-project` |
|
|
19
|
+
| `generate_screen_from_text` | `stitch-mcp-generate-screen-from-text` |
|
|
20
|
+
| `list_screens` | `stitch-mcp-list-screens` |
|
|
21
|
+
| `get_screen` | `stitch-mcp-get-screen` |
|
|
22
|
+
|
|
23
|
+
## ID formats — the most common source of errors
|
|
24
|
+
|
|
25
|
+
Different Stitch MCP tools expect different ID formats. **Agents fail this constantly without explicit guidance.**
|
|
26
|
+
|
|
27
|
+
### projectId formats
|
|
28
|
+
|
|
29
|
+
| Tool | projectId format | Example |
|
|
30
|
+
|------|-----------------|---------|
|
|
31
|
+
| `get_project` | `projects/NUMERIC_ID` | `projects/3780309359108792857` |
|
|
32
|
+
| `list_screens` | `projects/NUMERIC_ID` | `projects/3780309359108792857` |
|
|
33
|
+
| `generate_screen_from_text` | **numeric only** | `3780309359108792857` |
|
|
34
|
+
| `get_screen` | **numeric only** | `3780309359108792857` |
|
|
35
|
+
|
|
36
|
+
### screenId formats
|
|
37
|
+
|
|
38
|
+
| Tool | screenId format | Example |
|
|
39
|
+
|------|----------------|---------|
|
|
40
|
+
| `get_screen` | **numeric/alphanumeric only** | `88805abc123def456` |
|
|
41
|
+
|
|
42
|
+
**Never pass `projects/ID` to `generate_screen_from_text` or `get_screen`.**
|
|
43
|
+
|
|
44
|
+
### Correct vs. wrong
|
|
45
|
+
|
|
46
|
+
```
|
|
47
|
+
✅ generate_screen_from_text projectId: "3780309359108792857"
|
|
48
|
+
❌ generate_screen_from_text projectId: "projects/3780309359108792857"
|
|
49
|
+
|
|
50
|
+
✅ get_screen projectId: "3780309359108792857", screenId: "88805abc123def456"
|
|
51
|
+
❌ get_screen projectId: "projects/3780309359108792857", screenId: "screens/88805abc123def456"
|
|
52
|
+
|
|
53
|
+
✅ list_screens projectId: "projects/3780309359108792857"
|
|
54
|
+
❌ list_screens projectId: "3780309359108792857"
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Tool prefix discovery
|
|
58
|
+
|
|
59
|
+
The MCP tool namespace prefix varies by client configuration (e.g. `stitch:`, `mcp__stitch__`, `mcp_stitch__stitch:`). Always run `list_tools` first to discover the prefix, then use it for all subsequent calls.
|
|
60
|
+
|
|
61
|
+
## References
|
|
62
|
+
|
|
63
|
+
- Stitch MCP setup: https://stitch.withgoogle.com/docs/mcp/guide/
|
|
64
|
+
- `skills-index.md` — full skills table
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
# Stitch MCP API Schemas
|
|
2
|
+
|
|
3
|
+
Formal JSON Schema definitions for all 14 Stitch MCP tools.
|
|
4
|
+
|
|
5
|
+
Each file documents the full `arguments` (input) and `outputSchema` (output) for one tool.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Files
|
|
10
|
+
|
|
11
|
+
### Project management
|
|
12
|
+
|
|
13
|
+
| File | Tool | Purpose |
|
|
14
|
+
|------|------|---------|
|
|
15
|
+
| `create_project.json` | `create_project` | Create a new project. Returns `projects/{id}` in `name`. |
|
|
16
|
+
| `get_project.json` | `get_project` | Get full project details. Input: `projects/{id}` format. |
|
|
17
|
+
| `list_projects.json` | `list_projects` | List owned/shared projects. Filter: `view=owned` or `view=shared`. |
|
|
18
|
+
| `delete_project.json` | `delete_project` | Permanently delete a project. Input: `projects/{id}` format. Irreversible. |
|
|
19
|
+
|
|
20
|
+
### Screen operations
|
|
21
|
+
|
|
22
|
+
| File | Tool | Purpose |
|
|
23
|
+
|------|------|---------|
|
|
24
|
+
| `generate_screen_from_text.json` | `generate_screen_from_text` | Generate a screen from a prompt. Input: **numeric project ID only**. |
|
|
25
|
+
| `upload_screens_from_images.json` | `upload_screens_from_images` | Upload images as new screens. Input: **numeric project ID**, base64 images. |
|
|
26
|
+
| `edit_screens.json` | `edit_screens` | Edit existing screens with text prompts. Input: **numeric IDs only**. |
|
|
27
|
+
| `generate_variants.json` | `generate_variants` | Generate design variants. Input: **numeric IDs**, variant options. |
|
|
28
|
+
| `list_screens.json` | `list_screens` | List screens in a project. Input: `projects/{id}` format. |
|
|
29
|
+
| `get_screen.json` | `get_screen` | Get screen HTML + screenshot. Input: **numeric IDs only**. |
|
|
30
|
+
|
|
31
|
+
### Design systems
|
|
32
|
+
|
|
33
|
+
| File | Tool | Purpose |
|
|
34
|
+
|------|------|---------|
|
|
35
|
+
| `create_design_system.json` | `create_design_system` | Create a reusable design system. Optional numeric `projectId`. |
|
|
36
|
+
| `update_design_system.json` | `update_design_system` | Update an existing design system. Requires asset `name`. |
|
|
37
|
+
| `list_design_systems.json` | `list_design_systems` | List available design systems. Optional numeric `projectId`. |
|
|
38
|
+
| `apply_design_system.json` | `apply_design_system` | Apply a design system to screens. **Numeric IDs** + `assetId`. |
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## Key insights from the schemas
|
|
43
|
+
|
|
44
|
+
### DesignTheme — 28 available fonts
|
|
45
|
+
|
|
46
|
+
All tools that return design data include a `DesignTheme` object. The `font` field accepts these enum values:
|
|
47
|
+
|
|
48
|
+
**Sans-serif (modern):**
|
|
49
|
+
`INTER`, `GEIST`, `DM_SANS`, `MANROPE`, `PLUS_JAKARTA_SANS`, `WORK_SANS`,
|
|
50
|
+
`PUBLIC_SANS`, `SOURCE_SANS_THREE`, `NUNITO_SANS`, `SPACE_GROTESK`,
|
|
51
|
+
`BE_VIETNAM_PRO`, `LEXEND`, `EPILOGUE`, `HANKEN_GROTESK`, `SPLINE_SANS`,
|
|
52
|
+
`RUBIK`, `ARIMO`, `SORA`, `METROPOLIS`, `MONTSERRAT`, `IBM_PLEX_SANS`
|
|
53
|
+
|
|
54
|
+
**Serif:**
|
|
55
|
+
`NOTO_SERIF`, `NEWSREADER`, `DOMINE`, `LIBRE_CASLON_TEXT`, `EB_GARAMOND`,
|
|
56
|
+
`LITERATA`, `SOURCE_SERIF_FOUR`
|
|
57
|
+
|
|
58
|
+
### DesignTheme — roundness values
|
|
59
|
+
|
|
60
|
+
| Enum | Meaning | Use for |
|
|
61
|
+
|------|---------|---------|
|
|
62
|
+
| `ROUND_FOUR` | `border-radius: 4px` | Sharp / enterprise |
|
|
63
|
+
| `ROUND_EIGHT` | `border-radius: 8px` | Modern / balanced |
|
|
64
|
+
| `ROUND_TWELVE` | `border-radius: 12px` | Friendly / consumer |
|
|
65
|
+
| `ROUND_FULL` | `border-radius: 9999px` | Pill buttons |
|
|
66
|
+
| `ROUND_TWO` | — | **Deprecated / unused** |
|
|
67
|
+
|
|
68
|
+
### DesignTheme — saturation
|
|
69
|
+
|
|
70
|
+
Integer 1–4. Higher = more vivid colors. Default (unset) is neutral.
|
|
71
|
+
|
|
72
|
+
### outputComponents pattern
|
|
73
|
+
|
|
74
|
+
Multiple tools (`generate_screen_from_text`, `edit_screens`, `generate_variants`) return `outputComponents[]`. Each item has one of:
|
|
75
|
+
- `text` — agent text response, return to user
|
|
76
|
+
- `suggestion` — follow-up prompt suggestion, present to user; if accepted, use as next prompt
|
|
77
|
+
- `design` — the generated design object containing `screens[]` with `theme`, `deviceType`
|
|
78
|
+
|
|
79
|
+
### generate_variants — variantOptions
|
|
80
|
+
|
|
81
|
+
| Field | Type | Values |
|
|
82
|
+
|-------|------|--------|
|
|
83
|
+
| `variantCount` | int | 1–5 |
|
|
84
|
+
| `creativeRange` | enum | `REFINE`, `EXPLORE`, `REIMAGINE` |
|
|
85
|
+
| `aspects` | array | `LAYOUT`, `COLOR_SCHEME`, `IMAGES`, `TEXT_FONT`, `TEXT_CONTENT` |
|
|
86
|
+
|
|
87
|
+
### Model selection
|
|
88
|
+
|
|
89
|
+
| modelId | Description |
|
|
90
|
+
|---------|-------------|
|
|
91
|
+
| `GEMINI_3_FLASH` | Default. Faster. |
|
|
92
|
+
| `GEMINI_3_PRO` | Thinking model. Higher quality. Slower. |
|
|
93
|
+
|
|
94
|
+
### ScreenMetadata — agentType
|
|
95
|
+
|
|
96
|
+
`GEMINI_3_AGENT` = the Gemini 3.0 Thinking model (maps to `GEMINI_3_PRO` model selection).
|
|
97
|
+
|
|
98
|
+
### componentRegions
|
|
99
|
+
|
|
100
|
+
`generate_screen_from_text` responses include `componentRegions[]` in `screenMetadata`.
|
|
101
|
+
Each region has:
|
|
102
|
+
- `type` — `COMPONENT_TYPE_IMAGE | TEXT | BUTTON | INPUT | CONTAINER`
|
|
103
|
+
- `boundingBox` — `{x, y, width, height}` in pixels relative to screen dimensions
|
|
104
|
+
- `xpath` — XPath to locate the element in the HTML
|
|
105
|
+
- `description` — human-readable label
|
|
106
|
+
|
|
107
|
+
Useful for: targeted HTML extraction, component-level conversion, design audits.
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
## ID format reference (the #1 source of bugs)
|
|
112
|
+
|
|
113
|
+
| Tool | projectId format | screenId format | Other IDs |
|
|
114
|
+
|------|-----------------|----------------|-----------|
|
|
115
|
+
| `create_project` | — (returns `projects/NUMERIC`) | — | — |
|
|
116
|
+
| `get_project` | `projects/NUMERIC` | — | — |
|
|
117
|
+
| `list_projects` | — | — | — |
|
|
118
|
+
| `delete_project` | `projects/NUMERIC` | — | — |
|
|
119
|
+
| `generate_screen_from_text` | **NUMERIC only** | — | — |
|
|
120
|
+
| `upload_screens_from_images` | **NUMERIC only** | — | — |
|
|
121
|
+
| `edit_screens` | **NUMERIC only** | **NUMERIC array** | — |
|
|
122
|
+
| `generate_variants` | **NUMERIC only** | **NUMERIC array** | — |
|
|
123
|
+
| `list_screens` | `projects/NUMERIC` | — | — |
|
|
124
|
+
| `get_screen` | **NUMERIC only** | **NUMERIC only** | — |
|
|
125
|
+
| `create_design_system` | **NUMERIC** (optional) | — | Returns Asset `name` |
|
|
126
|
+
| `update_design_system` | — | — | Asset `name` required |
|
|
127
|
+
| `list_design_systems` | **NUMERIC** (optional) | — | Returns Asset names |
|
|
128
|
+
| `apply_design_system` | **NUMERIC only** | **NUMERIC array** | `assetId` required |
|
|
129
|
+
|
|
130
|
+
See `../mcp-naming-convention.md` for the full breakdown.
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "apply_design_system",
|
|
3
|
+
"description": "Applies a Stitch Design System to one or more existing screens, updating their visual theme.\n\n**Input Requirements (CRITICAL):**\n1. **`projectId` (string - MANDATORY):** Numeric ID only.\n2. **`selectedScreenIds` (array - MANDATORY):** Numeric screen IDs.\n3. **`assetId` (string - MANDATORY):** Design system asset identifier.\n",
|
|
4
|
+
"arguments": {
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"projectId": {
|
|
8
|
+
"description": "Required. Numeric project ID only — do NOT include 'projects/' prefix.",
|
|
9
|
+
"type": "string"
|
|
10
|
+
},
|
|
11
|
+
"selectedScreenIds": {
|
|
12
|
+
"description": "Required. Array of numeric screen IDs to apply the design system to.",
|
|
13
|
+
"type": "array",
|
|
14
|
+
"items": { "type": "string" }
|
|
15
|
+
},
|
|
16
|
+
"assetId": {
|
|
17
|
+
"description": "Required. The design system asset identifier from list or create operations.",
|
|
18
|
+
"type": "string"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"required": ["projectId", "selectedScreenIds", "assetId"],
|
|
22
|
+
"description": "Request message for ApplyDesignSystem."
|
|
23
|
+
},
|
|
24
|
+
"outputSchema": {
|
|
25
|
+
"type": "object",
|
|
26
|
+
"properties": {
|
|
27
|
+
"outputComponents": {
|
|
28
|
+
"description": "Array of output components with updated screen data.",
|
|
29
|
+
"type": "array"
|
|
30
|
+
},
|
|
31
|
+
"projectId": { "type": "string" },
|
|
32
|
+
"sessionId": { "type": "string" }
|
|
33
|
+
},
|
|
34
|
+
"description": "Response message for ApplyDesignSystem."
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "create_design_system",
|
|
3
|
+
"description": "Creates a new Stitch Design System — a reusable theme configuration (colors, fonts, roundness, saturation) that can be applied to screens.\n",
|
|
4
|
+
"arguments": {
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"designSystem": {
|
|
8
|
+
"$ref": "#/$defs/DesignSystemInput",
|
|
9
|
+
"description": "Required. The design system to create."
|
|
10
|
+
},
|
|
11
|
+
"projectId": {
|
|
12
|
+
"description": "Optional. Numeric project ID to associate with. No 'projects/' prefix.",
|
|
13
|
+
"type": "string"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"required": ["designSystem"],
|
|
17
|
+
"description": "Request message for CreateDesignSystem.",
|
|
18
|
+
"$defs": {
|
|
19
|
+
"DesignSystemInput": {
|
|
20
|
+
"description": "A design system definition.",
|
|
21
|
+
"properties": {
|
|
22
|
+
"displayName": {
|
|
23
|
+
"description": "Required. Human-readable name.",
|
|
24
|
+
"type": "string"
|
|
25
|
+
},
|
|
26
|
+
"theme": {
|
|
27
|
+
"$ref": "#/$defs/DesignTheme",
|
|
28
|
+
"description": "Required. Visual theme configuration."
|
|
29
|
+
},
|
|
30
|
+
"designTokens": {
|
|
31
|
+
"description": "Optional. CSS custom properties or token definitions.",
|
|
32
|
+
"type": "string"
|
|
33
|
+
},
|
|
34
|
+
"styleGuidelines": {
|
|
35
|
+
"description": "Optional. Natural-language design rules.",
|
|
36
|
+
"type": "string"
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"required": ["displayName", "theme"],
|
|
40
|
+
"type": "object"
|
|
41
|
+
},
|
|
42
|
+
"DesignTheme": {
|
|
43
|
+
"description": "Visual theme configuration.",
|
|
44
|
+
"properties": {
|
|
45
|
+
"colorMode": { "enum": ["COLOR_MODE_UNSPECIFIED", "LIGHT", "DARK"], "type": "string" },
|
|
46
|
+
"font": {
|
|
47
|
+
"enum": [
|
|
48
|
+
"FONT_UNSPECIFIED", "BE_VIETNAM_PRO", "EPILOGUE", "INTER", "LEXEND", "MANROPE",
|
|
49
|
+
"NEWSREADER", "NOTO_SERIF", "PLUS_JAKARTA_SANS", "PUBLIC_SANS", "SPACE_GROTESK",
|
|
50
|
+
"SPLINE_SANS", "WORK_SANS", "DOMINE", "LIBRE_CASLON_TEXT", "EB_GARAMOND",
|
|
51
|
+
"LITERATA", "SOURCE_SERIF_FOUR", "MONTSERRAT", "METROPOLIS", "SOURCE_SANS_THREE",
|
|
52
|
+
"NUNITO_SANS", "ARIMO", "HANKEN_GROTESK", "RUBIK", "GEIST", "DM_SANS",
|
|
53
|
+
"IBM_PLEX_SANS", "SORA"
|
|
54
|
+
],
|
|
55
|
+
"type": "string"
|
|
56
|
+
},
|
|
57
|
+
"roundness": { "enum": ["ROUNDNESS_UNSPECIFIED", "ROUND_FOUR", "ROUND_EIGHT", "ROUND_TWELVE", "ROUND_FULL"], "type": "string" },
|
|
58
|
+
"saturation": { "type": "integer", "minimum": 1, "maximum": 4 },
|
|
59
|
+
"customColor": { "description": "Primary color (hex).", "type": "string" },
|
|
60
|
+
"backgroundLight": { "description": "Light mode background (hex).", "type": "string" },
|
|
61
|
+
"backgroundDark": { "description": "Dark mode background (hex).", "type": "string" },
|
|
62
|
+
"preset": { "type": "string" },
|
|
63
|
+
"description": { "type": "string" }
|
|
64
|
+
},
|
|
65
|
+
"type": "object"
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"outputSchema": {
|
|
70
|
+
"type": "object",
|
|
71
|
+
"properties": {
|
|
72
|
+
"name": { "description": "Asset identifier. Format: assets/{asset_id}", "type": "string" },
|
|
73
|
+
"displayName": { "type": "string" },
|
|
74
|
+
"designSystem": { "description": "The created design system object.", "type": "object" }
|
|
75
|
+
},
|
|
76
|
+
"description": "Asset response for CreateDesignSystem."
|
|
77
|
+
}
|
|
78
|
+
}
|
|
@@ -0,0 +1,290 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "create_project",
|
|
3
|
+
"description": "Creates a new Stitch project. A project is a container for UI designs and frontend code.\n",
|
|
4
|
+
"arguments": {
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"title": {
|
|
8
|
+
"description": "Optional. The title of the project.",
|
|
9
|
+
"type": "string"
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
"description": "Request message for CreateProject."
|
|
13
|
+
},
|
|
14
|
+
"outputSchema": {
|
|
15
|
+
"type": "object",
|
|
16
|
+
"properties": {
|
|
17
|
+
"backgroundTheme": {
|
|
18
|
+
"description": "Optional. The background theme of the project.",
|
|
19
|
+
"type": "string"
|
|
20
|
+
},
|
|
21
|
+
"createTime": {
|
|
22
|
+
"description": "Output only. The time when the project was created.",
|
|
23
|
+
"format": "date-time",
|
|
24
|
+
"readOnly": true,
|
|
25
|
+
"type": "string"
|
|
26
|
+
},
|
|
27
|
+
"designTheme": {
|
|
28
|
+
"$ref": "#/$defs/DesignTheme",
|
|
29
|
+
"description": "Output only. The theme used to generate the first design in the project.",
|
|
30
|
+
"readOnly": true
|
|
31
|
+
},
|
|
32
|
+
"deviceType": {
|
|
33
|
+
"description": "Output only. The device type of the project.",
|
|
34
|
+
"enum": [
|
|
35
|
+
"DEVICE_TYPE_UNSPECIFIED",
|
|
36
|
+
"MOBILE",
|
|
37
|
+
"DESKTOP",
|
|
38
|
+
"TABLET",
|
|
39
|
+
"AGNOSTIC"
|
|
40
|
+
],
|
|
41
|
+
"readOnly": true,
|
|
42
|
+
"type": "string",
|
|
43
|
+
"x-google-enum-descriptions": [
|
|
44
|
+
"Unspecified device type.",
|
|
45
|
+
"A design for a mobile device.",
|
|
46
|
+
"A design for a desktop device.",
|
|
47
|
+
"A design for a tablet device.",
|
|
48
|
+
"A design that is not tied to a specific device."
|
|
49
|
+
]
|
|
50
|
+
},
|
|
51
|
+
"metadata": {
|
|
52
|
+
"$ref": "#/$defs/ProjectMetadata",
|
|
53
|
+
"description": "Metadata of the project."
|
|
54
|
+
},
|
|
55
|
+
"name": {
|
|
56
|
+
"description": "Identifier. The resource name of the project. Format: projects/{project}",
|
|
57
|
+
"type": "string",
|
|
58
|
+
"x-google-identifier": true
|
|
59
|
+
},
|
|
60
|
+
"origin": {
|
|
61
|
+
"description": "Output only. The origin of the project.",
|
|
62
|
+
"enum": [
|
|
63
|
+
"ORIGIN_UNSPECIFIED",
|
|
64
|
+
"STITCH",
|
|
65
|
+
"IMPORTED_FROM_GALILEO"
|
|
66
|
+
],
|
|
67
|
+
"readOnly": true,
|
|
68
|
+
"type": "string",
|
|
69
|
+
"x-google-enum-descriptions": [
|
|
70
|
+
"Unspecified origin. By default, the project is created from Stitch.",
|
|
71
|
+
"The project is created from Stitch.",
|
|
72
|
+
"The project is imported from Galileo."
|
|
73
|
+
]
|
|
74
|
+
},
|
|
75
|
+
"projectType": {
|
|
76
|
+
"description": "Optional. The type of the project. If not specified, the project is a text to UI project.",
|
|
77
|
+
"enum": [
|
|
78
|
+
"PROJECT_TYPE_UNSPECIFIED",
|
|
79
|
+
"TEXT_TO_UI",
|
|
80
|
+
"TEXT_TO_UI_PRO",
|
|
81
|
+
"TEXT_TO_UI_PRO_IMAGE_SPACE",
|
|
82
|
+
"IMAGE_TO_UI",
|
|
83
|
+
"IMAGE_TO_UI_PRO",
|
|
84
|
+
"PROJECT_DESIGN"
|
|
85
|
+
],
|
|
86
|
+
"type": "string",
|
|
87
|
+
"x-google-enum-descriptions": [
|
|
88
|
+
"Unspecified project type. By default, the project is a text to UI project.",
|
|
89
|
+
"A text to UI project.",
|
|
90
|
+
"Pro version of text to UI project.",
|
|
91
|
+
"Deprecated. Pro version of text to UI project using image space for edits.",
|
|
92
|
+
"An image to UI project.",
|
|
93
|
+
"Deprecated.",
|
|
94
|
+
"A new design project."
|
|
95
|
+
]
|
|
96
|
+
},
|
|
97
|
+
"readTime": {
|
|
98
|
+
"description": "Output only. The time the project was last read. Populated only when listing recently viewed projects.",
|
|
99
|
+
"format": "date-time",
|
|
100
|
+
"readOnly": true,
|
|
101
|
+
"type": "string"
|
|
102
|
+
},
|
|
103
|
+
"screenInstances": {
|
|
104
|
+
"description": "Output only. The screen instances on this project.",
|
|
105
|
+
"items": {
|
|
106
|
+
"$ref": "#/$defs/ScreenInstance"
|
|
107
|
+
},
|
|
108
|
+
"readOnly": true,
|
|
109
|
+
"type": "array"
|
|
110
|
+
},
|
|
111
|
+
"thumbnailScreenshot": {
|
|
112
|
+
"$ref": "#/$defs/File",
|
|
113
|
+
"description": "Optional. The screenshot to be used as the thumbnail for the project."
|
|
114
|
+
},
|
|
115
|
+
"title": {
|
|
116
|
+
"description": "Optional. The title of the project.",
|
|
117
|
+
"type": "string"
|
|
118
|
+
},
|
|
119
|
+
"updateTime": {
|
|
120
|
+
"description": "Output only. The time when the project was last updated.",
|
|
121
|
+
"format": "date-time",
|
|
122
|
+
"readOnly": true,
|
|
123
|
+
"type": "string"
|
|
124
|
+
},
|
|
125
|
+
"visibility": {
|
|
126
|
+
"description": "Optional. The visibility setting of the project.",
|
|
127
|
+
"enum": [
|
|
128
|
+
"VISIBILITY_UNSPECIFIED",
|
|
129
|
+
"PUBLIC",
|
|
130
|
+
"PRIVATE"
|
|
131
|
+
],
|
|
132
|
+
"type": "string",
|
|
133
|
+
"x-google-enum-descriptions": [
|
|
134
|
+
"Unspecified visibility. By default, the project is private.",
|
|
135
|
+
"The project is visible to all users, and may be featured in the feed.",
|
|
136
|
+
"The project is visible to only the creator."
|
|
137
|
+
]
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
"$defs": {
|
|
141
|
+
"DesignTheme": {
|
|
142
|
+
"description": "The theme of the design.",
|
|
143
|
+
"properties": {
|
|
144
|
+
"backgroundDark": {
|
|
145
|
+
"description": "Optional. The background color for dark mode (hex format, e.g., \"#1a1a1a\").",
|
|
146
|
+
"type": "string"
|
|
147
|
+
},
|
|
148
|
+
"backgroundLight": {
|
|
149
|
+
"description": "Optional. The background color for light mode (hex format, e.g., \"#f8f8f8\").",
|
|
150
|
+
"type": "string"
|
|
151
|
+
},
|
|
152
|
+
"colorMode": {
|
|
153
|
+
"description": "Optional. The mode of appearance of the design.",
|
|
154
|
+
"enum": [
|
|
155
|
+
"COLOR_MODE_UNSPECIFIED",
|
|
156
|
+
"LIGHT",
|
|
157
|
+
"DARK"
|
|
158
|
+
],
|
|
159
|
+
"type": "string"
|
|
160
|
+
},
|
|
161
|
+
"customColor": {
|
|
162
|
+
"description": "Optional. A custom theme primary color (hex).",
|
|
163
|
+
"type": "string"
|
|
164
|
+
},
|
|
165
|
+
"description": {
|
|
166
|
+
"description": "Optional. A brief description of the theme aesthetic.",
|
|
167
|
+
"type": "string"
|
|
168
|
+
},
|
|
169
|
+
"font": {
|
|
170
|
+
"description": "Optional. The font of the design.",
|
|
171
|
+
"enum": [
|
|
172
|
+
"FONT_UNSPECIFIED",
|
|
173
|
+
"BE_VIETNAM_PRO",
|
|
174
|
+
"EPILOGUE",
|
|
175
|
+
"INTER",
|
|
176
|
+
"LEXEND",
|
|
177
|
+
"MANROPE",
|
|
178
|
+
"NEWSREADER",
|
|
179
|
+
"NOTO_SERIF",
|
|
180
|
+
"PLUS_JAKARTA_SANS",
|
|
181
|
+
"PUBLIC_SANS",
|
|
182
|
+
"SPACE_GROTESK",
|
|
183
|
+
"SPLINE_SANS",
|
|
184
|
+
"WORK_SANS",
|
|
185
|
+
"DOMINE",
|
|
186
|
+
"LIBRE_CASLON_TEXT",
|
|
187
|
+
"EB_GARAMOND",
|
|
188
|
+
"LITERATA",
|
|
189
|
+
"SOURCE_SERIF_FOUR",
|
|
190
|
+
"MONTSERRAT",
|
|
191
|
+
"METROPOLIS",
|
|
192
|
+
"SOURCE_SANS_THREE",
|
|
193
|
+
"NUNITO_SANS",
|
|
194
|
+
"ARIMO",
|
|
195
|
+
"HANKEN_GROTESK",
|
|
196
|
+
"RUBIK",
|
|
197
|
+
"GEIST",
|
|
198
|
+
"DM_SANS",
|
|
199
|
+
"IBM_PLEX_SANS",
|
|
200
|
+
"SORA"
|
|
201
|
+
],
|
|
202
|
+
"type": "string"
|
|
203
|
+
},
|
|
204
|
+
"preset": {
|
|
205
|
+
"description": "Optional. The preset color of the design.",
|
|
206
|
+
"type": "string"
|
|
207
|
+
},
|
|
208
|
+
"roundness": {
|
|
209
|
+
"description": "Optional. The roundness of the design. ROUND_TWO is deprecated/unused.",
|
|
210
|
+
"enum": [
|
|
211
|
+
"ROUNDNESS_UNSPECIFIED",
|
|
212
|
+
"ROUND_TWO",
|
|
213
|
+
"ROUND_FOUR",
|
|
214
|
+
"ROUND_EIGHT",
|
|
215
|
+
"ROUND_TWELVE",
|
|
216
|
+
"ROUND_FULL"
|
|
217
|
+
],
|
|
218
|
+
"type": "string"
|
|
219
|
+
},
|
|
220
|
+
"saturation": {
|
|
221
|
+
"description": "Optional. The saturation of the design between 1 and 4.",
|
|
222
|
+
"format": "int32",
|
|
223
|
+
"type": "integer"
|
|
224
|
+
}
|
|
225
|
+
},
|
|
226
|
+
"type": "object"
|
|
227
|
+
},
|
|
228
|
+
"File": {
|
|
229
|
+
"description": "A File resource.",
|
|
230
|
+
"properties": {
|
|
231
|
+
"downloadUrl": {
|
|
232
|
+
"description": "Optional. The URL of the file for download. For image files, this would be FIFE base URLs.",
|
|
233
|
+
"type": "string"
|
|
234
|
+
},
|
|
235
|
+
"name": {
|
|
236
|
+
"description": "Identifier. The resource name of the file. Format: projects/{project}/files/{file}",
|
|
237
|
+
"type": "string"
|
|
238
|
+
}
|
|
239
|
+
},
|
|
240
|
+
"type": "object"
|
|
241
|
+
},
|
|
242
|
+
"ProjectMetadata": {
|
|
243
|
+
"description": "Metadata relating to the project.",
|
|
244
|
+
"properties": {
|
|
245
|
+
"isRemixed": {
|
|
246
|
+
"description": "Whether this project was remixed or not.",
|
|
247
|
+
"type": "boolean"
|
|
248
|
+
},
|
|
249
|
+
"userRole": {
|
|
250
|
+
"description": "The Role of the user accessing the project.",
|
|
251
|
+
"enum": [
|
|
252
|
+
"ROLE_UNSPECIFIED",
|
|
253
|
+
"OWNER",
|
|
254
|
+
"READER"
|
|
255
|
+
],
|
|
256
|
+
"type": "string"
|
|
257
|
+
}
|
|
258
|
+
},
|
|
259
|
+
"type": "object"
|
|
260
|
+
},
|
|
261
|
+
"ScreenInstance": {
|
|
262
|
+
"description": "An instance of a screen on the project canvas.",
|
|
263
|
+
"properties": {
|
|
264
|
+
"groupId": {
|
|
265
|
+
"description": "Optional. Group identifier for Genie Agent output grouping.",
|
|
266
|
+
"type": "string"
|
|
267
|
+
},
|
|
268
|
+
"groupName": {
|
|
269
|
+
"description": "Optional. Human-readable name for the group (e.g., \"Warm Minimalism\").",
|
|
270
|
+
"type": "string"
|
|
271
|
+
},
|
|
272
|
+
"height": { "format": "int32", "type": "integer" },
|
|
273
|
+
"hidden": { "description": "User hid this screen from canvas.", "type": "boolean" },
|
|
274
|
+
"id": { "type": "string" },
|
|
275
|
+
"label": { "type": "string" },
|
|
276
|
+
"sourceScreen": {
|
|
277
|
+
"description": "Format: projects/{project}/screens/{screen}",
|
|
278
|
+
"type": "string"
|
|
279
|
+
},
|
|
280
|
+
"variantScreenInstance": { "$ref": "#/$defs/ScreenInstance" },
|
|
281
|
+
"width": { "format": "int32", "type": "integer" },
|
|
282
|
+
"x": { "format": "int32", "type": "integer" },
|
|
283
|
+
"y": { "format": "int32", "type": "integer" }
|
|
284
|
+
},
|
|
285
|
+
"type": "object"
|
|
286
|
+
}
|
|
287
|
+
},
|
|
288
|
+
"description": "A project is a single app."
|
|
289
|
+
}
|
|
290
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "delete_project",
|
|
3
|
+
"description": "Permanently deletes a Stitch project and all its screens, designs, and history. This action is irreversible.\n",
|
|
4
|
+
"arguments": {
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"name": {
|
|
8
|
+
"description": "Required. The resource name of the project to delete. Format: projects/{project}",
|
|
9
|
+
"type": "string"
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
"required": ["name"],
|
|
13
|
+
"description": "Request message for DeleteProject."
|
|
14
|
+
},
|
|
15
|
+
"outputSchema": {
|
|
16
|
+
"type": "object",
|
|
17
|
+
"properties": {},
|
|
18
|
+
"description": "Empty response on success."
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "edit_screens",
|
|
3
|
+
"description": "Edits existing screens within a project using a text prompt. The primary iteration tool — modify colors, layout, content, or style without regenerating from scratch.\n\n**Input Requirements (CRITICAL):**\n1. **`projectId` (string - MANDATORY):** Numeric ID only.\n2. **`selectedScreenIds` (array - MANDATORY):** Numeric screen IDs, no prefix.\n3. **`prompt` (string - MANDATORY):** The edit instruction.\n\n**Instructions:**\n* This action can take a few minutes. DO NOT RETRY.\n* If `output_components` contains suggestions, present them to the user.\n",
|
|
4
|
+
"arguments": {
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"projectId": {
|
|
8
|
+
"description": "Required. Numeric project ID only — do NOT include 'projects/' prefix.",
|
|
9
|
+
"type": "string"
|
|
10
|
+
},
|
|
11
|
+
"selectedScreenIds": {
|
|
12
|
+
"description": "Required. Array of numeric screen IDs to edit. No 'projects/' or 'screens/' prefix.",
|
|
13
|
+
"type": "array",
|
|
14
|
+
"items": { "type": "string" }
|
|
15
|
+
},
|
|
16
|
+
"prompt": {
|
|
17
|
+
"description": "Required. The text prompt describing the desired edits.",
|
|
18
|
+
"type": "string"
|
|
19
|
+
},
|
|
20
|
+
"deviceType": {
|
|
21
|
+
"description": "Optional. The device type context for the edit.",
|
|
22
|
+
"enum": ["DEVICE_TYPE_UNSPECIFIED", "MOBILE", "DESKTOP", "TABLET", "AGNOSTIC"],
|
|
23
|
+
"type": "string"
|
|
24
|
+
},
|
|
25
|
+
"modelId": {
|
|
26
|
+
"description": "Optional. GEMINI_3_PRO for complex edits, GEMINI_3_FLASH for simple changes.",
|
|
27
|
+
"enum": ["MODEL_ID_UNSPECIFIED", "GEMINI_3_PRO", "GEMINI_3_FLASH"],
|
|
28
|
+
"type": "string"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"required": ["projectId", "selectedScreenIds", "prompt"],
|
|
32
|
+
"description": "Request message for EditScreens."
|
|
33
|
+
},
|
|
34
|
+
"outputSchema": {
|
|
35
|
+
"type": "object",
|
|
36
|
+
"properties": {
|
|
37
|
+
"outputComponents": {
|
|
38
|
+
"description": "Array of output components. May contain text responses, design objects, or suggestions.",
|
|
39
|
+
"type": "array"
|
|
40
|
+
},
|
|
41
|
+
"projectId": { "type": "string" },
|
|
42
|
+
"sessionId": { "type": "string" }
|
|
43
|
+
},
|
|
44
|
+
"description": "Response message for EditScreens."
|
|
45
|
+
}
|
|
46
|
+
}
|