gemini-design-mcp 3.12.7 → 3.12.8
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/build/index.js +39 -64
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -41,27 +41,28 @@ This tool is for creating NEW files that need HIGH-QUALITY DESIGN.
|
|
|
41
41
|
• Creating config files → You can do this yourself
|
|
42
42
|
|
|
43
43
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
44
|
-
⚠️
|
|
44
|
+
⚠️ MANDATORY: CHECK FOR design-system.md FIRST
|
|
45
45
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
46
46
|
|
|
47
|
-
|
|
48
|
-
─────────────────────────────
|
|
49
|
-
A) EMPTY REPO (no package.json):
|
|
50
|
-
→ Ask user: "What tech stack do you want?"
|
|
51
|
-
→ Help them initialize first
|
|
47
|
+
BEFORE calling this tool, check if design-system.md exists at project root.
|
|
52
48
|
|
|
53
|
-
|
|
54
|
-
|
|
49
|
+
IF IT DOES NOT EXIST:
|
|
50
|
+
1. Call generate_vibes first
|
|
51
|
+
2. Write the returned code to vibes-selection.tsx
|
|
52
|
+
3. Ask user to open the page and pick their favorite vibe
|
|
53
|
+
4. Extract THE ENTIRE CODE between <!-- VIBE_X_START --> and <!-- VIBE_X_END -->
|
|
54
|
+
5. Save it to design-system.md
|
|
55
|
+
6. THEN call this tool
|
|
55
56
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
→ Skip vibe selection
|
|
59
|
-
→ ⚠️ MUST pass CSS/globals file with design tokens in 'context' parameter
|
|
57
|
+
IF IT EXISTS:
|
|
58
|
+
Read it and pass its ENTIRE content in the designSystem parameter.
|
|
60
59
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
60
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
61
|
+
📋 PARAMETERS
|
|
62
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
63
|
+
|
|
64
|
+
• designSystem: Copy-paste the ENTIRE content of design-system.md (all the code)
|
|
65
|
+
• context: Functional/business context only (what it does, features, requirements)
|
|
65
66
|
|
|
66
67
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
67
68
|
📤 OUTPUT
|
|
@@ -98,13 +99,11 @@ Use this to REDESIGN existing UI elements that need better design.
|
|
|
98
99
|
• "Center this div" → Just add flex classes yourself
|
|
99
100
|
|
|
100
101
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
101
|
-
|
|
102
|
+
📋 PARAMETERS
|
|
102
103
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
103
104
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
Example: "Project uses: var(--font-heading), var(--bg-primary), .section-padding class"
|
|
105
|
+
• designSystem: Copy-paste the ENTIRE content of design-system.md (all the code)
|
|
106
|
+
• context: Functional/business context only (what the modification achieves)
|
|
108
107
|
|
|
109
108
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
110
109
|
📤 OUTPUT FORMAT
|
|
@@ -192,31 +191,12 @@ Use this for ANY new UI component that needs visual design:
|
|
|
192
191
|
| Loading spinner | ❌ NO | Too simple |
|
|
193
192
|
|
|
194
193
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
195
|
-
|
|
194
|
+
📋 PARAMETERS
|
|
196
195
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
197
196
|
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
2. Include CSS variables, classes, and color tokens in 'insertionContext'
|
|
202
|
-
3. Gemini will then use YOUR design system instead of creating standalone styles
|
|
203
|
-
|
|
204
|
-
Without this, the snippet will have:
|
|
205
|
-
❌ Hardcoded px values instead of your spacing variables
|
|
206
|
-
❌ Hardcoded colors instead of your color tokens
|
|
207
|
-
❌ New fonts instead of your font definitions
|
|
208
|
-
❌ Standalone styles that don't match your project
|
|
209
|
-
|
|
210
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
211
|
-
⚠️ REQUIRED: INSERTION CONTEXT
|
|
212
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
213
|
-
|
|
214
|
-
Tell Gemini WHERE and WHICH design tokens to use:
|
|
215
|
-
|
|
216
|
-
Good: "After the header in Dashboard. Use project tokens:
|
|
217
|
-
var(--font-heading) for titles, var(--bg-primary), .section-padding class."
|
|
218
|
-
|
|
219
|
-
Bad: "In the dashboard"
|
|
197
|
+
• designSystem: Copy-paste the ENTIRE content of design-system.md (all the code)
|
|
198
|
+
• context: Functional/business context only (what it does, features, requirements)
|
|
199
|
+
• insertionContext: WHERE in the file this snippet will go (after header, inside main, etc.)
|
|
220
200
|
|
|
221
201
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
222
202
|
📤 OUTPUT FORMAT
|
|
@@ -240,41 +220,36 @@ YOU (the agent) are responsible for:
|
|
|
240
220
|
- Inserting the returned snippet into the correct location in the file`, snippetFrontendSchema, snippetFrontend);
|
|
241
221
|
|
|
242
222
|
// TOOL 4: GENERATE_VIBES
|
|
243
|
-
server.tool("generate_vibes", `Generate 5 unique design vibes for
|
|
223
|
+
server.tool("generate_vibes", `Generate a visual page with 5 unique design vibes for user selection.
|
|
244
224
|
|
|
245
225
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
246
226
|
🎯 WHEN TO USE THIS TOOL
|
|
247
227
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
248
228
|
|
|
249
|
-
Use this tool
|
|
250
|
-
|
|
251
|
-
This tool generates creative, unique design vibes tailored to the project context.
|
|
252
|
-
The user then selects one, and you pass it to create_frontend.
|
|
229
|
+
Use this tool when design-system.md DOES NOT EXIST at project root.
|
|
253
230
|
|
|
254
231
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
255
|
-
📋 FLOW
|
|
232
|
+
📋 COMPLETE FLOW
|
|
256
233
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
257
234
|
|
|
258
|
-
1.
|
|
259
|
-
2.
|
|
260
|
-
3.
|
|
261
|
-
4. User
|
|
262
|
-
5.
|
|
235
|
+
1. Call generate_vibes with projectDescription
|
|
236
|
+
2. Write the returned code to vibes-selection.tsx (or .jsx)
|
|
237
|
+
3. Ask user: "Can you open vibes-selection and pick your favorite vibe?"
|
|
238
|
+
4. User opens the page, sees 5 distinct visual sections, picks one: "vibe 3"
|
|
239
|
+
5. Extract THE ENTIRE CODE between <!-- VIBE_X_START --> and <!-- VIBE_X_END -->
|
|
240
|
+
6. Save it to design-system.md
|
|
241
|
+
7. Ask: "Delete vibes-selection.tsx?"
|
|
242
|
+
8. Now you can call create_frontend, modify_frontend, snippet_frontend
|
|
263
243
|
|
|
264
244
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
265
245
|
📤 OUTPUT
|
|
266
246
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
267
247
|
|
|
268
|
-
Returns 5
|
|
269
|
-
|
|
270
|
-
- name: Memorable vibe name
|
|
271
|
-
- description: 2-3 evocative sentences
|
|
272
|
-
- keywords: Style keywords for the designer
|
|
248
|
+
Returns FULL CODE for a page with 5 visual sections (vibes).
|
|
249
|
+
Each vibe is wrapped in <!-- VIBE_X_START --> and <!-- VIBE_X_END --> markers.
|
|
273
250
|
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
An ultra-clean, 'white-cube' aesthetic focused on vast negative space.
|
|
277
|
-
Keywords: minimal, whitespace, gallery, clean, sophisticated`, generateVibesSchema, generateVibes);
|
|
251
|
+
The user opens this page in browser to visually compare all 5 vibes.
|
|
252
|
+
They pick one, you extract that vibe's code and save it to design-system.md.`, generateVibesSchema, generateVibes);
|
|
278
253
|
|
|
279
254
|
return server;
|
|
280
255
|
}
|