conductor-figma 1.0.0 → 1.0.2
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/package.json +1 -1
- package/src/server.js +14 -1
- package/src/tools/registry.js +31 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "conductor-figma",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Design-intelligent MCP server for Figma. 61 tools across 10 categories. 8px grid, type scale ratios, auto-layout, component reuse, accessibility — real design intelligence, not shape proxying.",
|
|
5
5
|
"author": "0xDragoon",
|
|
6
6
|
"license": "MIT",
|
package/src/server.js
CHANGED
|
@@ -72,8 +72,21 @@ async function handleMessage(msg) {
|
|
|
72
72
|
break;
|
|
73
73
|
|
|
74
74
|
case 'tools/list':
|
|
75
|
+
// Only expose high-level tools to Cursor.
|
|
76
|
+
// Low-level Figma commands (create_frame, create_text, etc.) are hidden
|
|
77
|
+
// because the orchestrator uses them internally via blueprints.
|
|
78
|
+
var HIDDEN_FROM_AI = new Set([
|
|
79
|
+
'create_frame', 'create_text', 'create_rect', 'create_ellipse', 'create_line',
|
|
80
|
+
'create_svg_node', 'create_card', 'create_form', 'create_table', 'create_modal', 'create_nav',
|
|
81
|
+
'layout_auto', 'layout_grid', 'layout_stack', 'layout_wrap', 'layout_constrain', 'layout_align', 'layout_nest',
|
|
82
|
+
'set_fills', 'set_strokes', 'set_effects', 'set_corner_radius', 'set_opacity',
|
|
83
|
+
'set_text_props', 'load_font', 'style_text_range',
|
|
84
|
+
'rename_node', 'move_node', 'resize_node', 'delete_node', 'clone_node', 'group_nodes', 'ungroup_node', 'reorder_node',
|
|
85
|
+
'find_nodes',
|
|
86
|
+
]);
|
|
87
|
+
var visibleTools = TOOLS.filter(function(t) { return !HIDDEN_FROM_AI.has(t.name); });
|
|
75
88
|
sendResult(id, {
|
|
76
|
-
tools:
|
|
89
|
+
tools: visibleTools.map(function(t) { return { name: t.name, description: t.description, inputSchema: t.inputSchema }; }),
|
|
77
90
|
});
|
|
78
91
|
break;
|
|
79
92
|
|
package/src/tools/registry.js
CHANGED
|
@@ -27,16 +27,40 @@ function opt(schema) { return { ...schema, optional: true }; }
|
|
|
27
27
|
export const TOOLS = [
|
|
28
28
|
// ═══ CREATE ═══
|
|
29
29
|
{ name: 'create_frame', category: 'create',
|
|
30
|
-
description: 'Create
|
|
31
|
-
inputSchema: { type: 'object', properties: { name: str('Frame name'), width: opt(num('Width')), height: opt(num('Height')), direction: opt(str('
|
|
30
|
+
description: 'Create a single auto-layout frame. IMPORTANT: For multi-element designs (pages, sections, dashboards), use create_page or create_section instead — they handle all nesting automatically. If using create_frame directly, ALWAYS set parentId to nest inside a parent frame, and ALWAYS set direction, padding, and gap for auto-layout.',
|
|
31
|
+
inputSchema: { type: 'object', properties: { name: str('Frame name'), width: opt(num('Width')), height: opt(num('Height')), direction: opt(str('VERTICAL or HORIZONTAL')), padding: opt(num('Padding in px (use multiples of 8)')), paddingTop: opt(num('Top padding')), paddingBottom: opt(num('Bottom padding')), paddingLeft: opt(num('Left padding')), paddingRight: opt(num('Right padding')), gap: opt(num('Gap between children (use multiples of 8)')), fill: opt(str('Background color hex')), cornerRadius: opt(num('Corner radius')), parentId: opt(str('REQUIRED for nesting: parent frame ID')), primaryAxisAlignItems: opt(str('MIN, CENTER, MAX, SPACE_BETWEEN')), counterAxisAlignItems: opt(str('MIN, CENTER, MAX, STRETCH')), primaryAxisSizingMode: opt(str('FIXED, HUG, FILL')), counterAxisSizingMode: opt(str('FIXED, HUG, FILL')) }, required: ['name'] } },
|
|
32
32
|
|
|
33
33
|
{ name: 'create_page', category: 'create',
|
|
34
|
-
description: '
|
|
35
|
-
inputSchema: { type: 'object', properties: {
|
|
34
|
+
description: 'THE PRIMARY TOOL FOR DESIGNING PAGES. Creates a complete, polished, production-ready page with all sections, components, and content — fully nested with auto-layout, proper spacing, and design-intelligent values. One call generates 40-80 Figma elements. Use this INSTEAD of calling create_frame/create_text individually. Supports: landing, pricing, dashboard page types. Pass brand color, title, features, stats, and other content as parameters.',
|
|
35
|
+
inputSchema: { type: 'object', properties: {
|
|
36
|
+
pageType: str('Page type: landing, pricing, dashboard'),
|
|
37
|
+
title: opt(str('Hero heading text')),
|
|
38
|
+
subtitle: opt(str('Hero subtitle text')),
|
|
39
|
+
brand: opt(str('Brand/company name (appears in nav and footer)')),
|
|
40
|
+
brandColor: opt(str('Primary brand color hex (default #6366f1)')),
|
|
41
|
+
ctaText: opt(str('Primary CTA button text')),
|
|
42
|
+
darkMode: opt(bool('Dark mode (default true)')),
|
|
43
|
+
width: opt(num('Page width (default 1440)')),
|
|
44
|
+
navItems: opt(arr('Navigation link labels')),
|
|
45
|
+
features: opt(arr('Feature objects with icon, title, desc fields')),
|
|
46
|
+
stats: opt(arr('Stat objects with value and label fields')),
|
|
47
|
+
tiers: opt(arr('Pricing tier objects with name, price, period, desc, features, cta, highlighted fields')),
|
|
48
|
+
metrics: opt(arr('Dashboard metric objects with label, value, change, positive fields')),
|
|
49
|
+
}, required: ['pageType'] } },
|
|
36
50
|
|
|
37
51
|
{ name: 'create_section', category: 'create',
|
|
38
|
-
description: '
|
|
39
|
-
inputSchema: { type: 'object', properties: {
|
|
52
|
+
description: 'Creates a complete page section with all child elements, auto-layout, and proper nesting. One call generates 5-20 Figma elements. Use this INSTEAD of manually building sections. Supports: hero, features, pricing, cta, testimonials, faq section types.',
|
|
53
|
+
inputSchema: { type: 'object', properties: {
|
|
54
|
+
sectionType: str('Section type: hero, features, testimonials, faq, cta, pricing'),
|
|
55
|
+
heading: opt(str('Section heading')),
|
|
56
|
+
subheading: opt(str('Section subtitle')),
|
|
57
|
+
brandColor: opt(str('Brand color hex')),
|
|
58
|
+
ctaText: opt(str('CTA button text')),
|
|
59
|
+
width: opt(num('Section width (default 1440)')),
|
|
60
|
+
features: opt(arr('Feature objects for features section')),
|
|
61
|
+
testimonials: opt(arr('Testimonial objects with quote, author, role')),
|
|
62
|
+
faqs: opt(arr('FAQ objects with q and a fields')),
|
|
63
|
+
}, required: ['sectionType'] } },
|
|
40
64
|
|
|
41
65
|
{ name: 'create_card', category: 'create',
|
|
42
66
|
description: 'Create a card with proper padding, radius, shadow depth, and content hierarchy.',
|
|
@@ -281,7 +305,7 @@ export const TOOLS = [
|
|
|
281
305
|
|
|
282
306
|
// ═══ DESIGN CRAFT ═══
|
|
283
307
|
{ name: 'get_design_craft_guide', category: 'craft',
|
|
284
|
-
description: '
|
|
308
|
+
description: 'CALL THIS FIRST before any design work. Returns professional design rules: typography scales, spacing systems (8px grid), color palettes, component patterns, and anti-patterns. Following these rules is the difference between amateur and production-quality output. Read the full guide before calling any create_ tools.',
|
|
285
309
|
inputSchema: { type: 'object', properties: {}, required: [] } },
|
|
286
310
|
|
|
287
311
|
// ═══ CREATE (additional) ═══
|