@sangheepark/figma-ds-mcp 0.1.0 → 0.1.1

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.
@@ -134,6 +134,8 @@ Supports:
134
134
  success: true,
135
135
  nodeId: result.nodeId,
136
136
  name: result.name,
137
+ warnings: result.warnings,
138
+ verification: result.verification,
137
139
  }, null, 2),
138
140
  }],
139
141
  };
@@ -76,6 +76,7 @@ If a component with the same name already exists, it will be updated in-place.`,
76
76
  nodeId: result.nodeId,
77
77
  name: result.name,
78
78
  warnings: result.warnings,
79
+ verification: result.verification,
79
80
  }, null, 2),
80
81
  }],
81
82
  };
@@ -108,6 +109,7 @@ Use this for incremental/step-by-step component building.`, {
108
109
  success: true,
109
110
  nodeId: result.nodeId,
110
111
  name: result.name,
112
+ warnings: result.warnings,
111
113
  }, null, 2),
112
114
  }],
113
115
  };
@@ -140,6 +142,8 @@ Use this for incremental/step-by-step component building.`, {
140
142
  success: true,
141
143
  nodeId: result.nodeId,
142
144
  name: result.name,
145
+ warnings: result.warnings,
146
+ verification: result.verification,
143
147
  }, null, 2),
144
148
  }],
145
149
  };
@@ -26,14 +26,18 @@ export function registerUtilityTools(server, bridge) {
26
26
  // Actually, we send it as a bridge-validate-spec message that the plugin will handle
27
27
  try {
28
28
  const result = await bridge.send('bridge-validate-spec', { spec });
29
+ const response = {
30
+ valid: true,
31
+ specType: result.specType || 'node',
32
+ message: result.message || 'Spec is valid',
33
+ };
34
+ if (result.semanticWarnings && result.semanticWarnings.length > 0) {
35
+ response.semanticWarnings = result.semanticWarnings;
36
+ }
29
37
  return {
30
38
  content: [{
31
39
  type: 'text',
32
- text: JSON.stringify({
33
- valid: true,
34
- specType: result.specType || 'node',
35
- message: result.message || 'Spec is valid',
36
- }, null, 2),
40
+ text: JSON.stringify(response, null, 2),
37
41
  }],
38
42
  };
39
43
  }
@@ -51,6 +55,30 @@ export function registerUtilityTools(server, bridge) {
51
55
  };
52
56
  }
53
57
  });
58
+ // get_node_info — Query a created node's actual state for verification
59
+ server.tool('get_node_info', 'Get detailed information about a Figma node by its ID. Returns layout dimensions, styles, fills, strokes, text properties, and children count. Use this after create_from_spec or add_child to verify the node was created correctly.', {
60
+ nodeId: z.string().describe('The nodeId of the Figma node to inspect'),
61
+ }, async ({ nodeId }) => {
62
+ try {
63
+ const result = await bridge.send('bridge-get-node-info', { nodeId });
64
+ return {
65
+ content: [{
66
+ type: 'text',
67
+ text: JSON.stringify(result, null, 2),
68
+ }],
69
+ };
70
+ }
71
+ catch (error) {
72
+ const msg = error instanceof Error ? error.message : 'Unknown error';
73
+ return {
74
+ content: [{
75
+ type: 'text',
76
+ text: JSON.stringify({ success: false, error: msg }, null, 2),
77
+ }],
78
+ isError: true,
79
+ };
80
+ }
81
+ });
54
82
  // generate_from_yaml — Legacy YAML passthrough for compatibility
55
83
  server.tool('generate_from_yaml', 'Generate Figma components from YAML text (legacy passthrough). Prefer using create_from_spec with JSON instead.', {
56
84
  yaml: z.string().describe('YAML spec text'),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sangheepark/figma-ds-mcp",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "MCP server for Code to Figma Bridge — bridges Claude Code to Figma plugin via WebSocket",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",