@liner-fe/figma-mcp 1.0.3 → 1.0.4

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.
@@ -157,6 +157,33 @@ var { connectToFigma, sendCommandToFigma } = createFigmaClient({
157
157
  serverUrl,
158
158
  wsUrlBase: WS_URL
159
159
  });
160
+ server.tool(
161
+ "get_document_info",
162
+ "Get detailed information about the current Figma document",
163
+ {},
164
+ async () => {
165
+ try {
166
+ const result = await sendCommandToFigma("get_document_info");
167
+ return {
168
+ content: [
169
+ {
170
+ type: "text",
171
+ text: JSON.stringify(result)
172
+ }
173
+ ]
174
+ };
175
+ } catch (error) {
176
+ return {
177
+ content: [
178
+ {
179
+ type: "text",
180
+ text: `Error getting document info: ${error instanceof Error ? error.message : String(error)}`
181
+ }
182
+ ]
183
+ };
184
+ }
185
+ }
186
+ );
160
187
  server.registerTool(
161
188
  "get_selection",
162
189
  {
@@ -186,68 +213,6 @@ server.registerTool(
186
213
  }
187
214
  }
188
215
  );
189
- server.registerPrompt(
190
- "design system components",
191
- {
192
- description: "help analyze design system common components"
193
- },
194
- () => {
195
- return {
196
- messages: [
197
- {
198
- role: "assistant",
199
- content: {
200
- type: "text",
201
- text: `\uACF5\uD1B5 \uCEF4\uD3EC\uB10C\uD2B8\uC758 \uAD6C\uD604 \uC815\uBCF4\uB97C \uD30C\uC545\uD558\uC5EC \uCF54\uB4DC \uC81C\uC791\uC5D0 \uD65C\uC6A9\uD574\uC57C \uD569\uB2C8\uB2E4. \uCF54\uB4DC \uC0AC\uC6A9 \uC608\uC2DC, \uC124\uBA85 \uB4F1\uC744 \uC815\uD655\uD558\uAC8C \uD30C\uC545\uD558\uC5EC \uC2E4\uC81C \uCF54\uB4DC \uC81C\uC791\uC5D0 \uC815\uD655\uD558\uAC8C \uD65C\uC6A9\uD560 \uC218 \uC788\uC5B4\uC57C \uD569\uB2C8\uB2E4.
202
- \uD2B9\uD788 Figma \uC778\uD130\uD398\uC774\uC2A4\uC640 \uCF54\uB4DC \uAC04\uC758 \uAD6C\uD604 \uCC28\uC774\uB97C \uC815\uD655\uD558\uAC8C \uD30C\uC545\uD558\uACE0 \uCF54\uB4DC\uC5D0 \uB9DE\uAC8C \uD65C\uC6A9\uD574\uC57C \uD569\uB2C8\uB2E4.`
203
- }
204
- }
205
- ],
206
- description: "Troubleshooting guide for connection issues between Figma plugin and MCP server"
207
- };
208
- }
209
- );
210
- server.registerPrompt(
211
- "data_analysis_strategy",
212
- {
213
- description: "Best practices for analyzing Figma design data"
214
- },
215
- () => {
216
- return {
217
- messages: [
218
- {
219
- role: "assistant",
220
- content: {
221
- type: "text",
222
- text: `When analyzing Figma design data, follow these strategies
223
-
224
- 1. Data Extraction Workflow:
225
- - Use get_selection() to focus on specific areas of interest
226
- - Use get_document_info() when connection is enabled
227
-
228
- 2. Component Analysis:
229
- - Identify reusable components vs one-off elements
230
- - Look for design system patterns (colors, typography, spacing)
231
- - Note component variants and their properties
232
- - Extract design tokens (colors, fonts, spacing values)
233
-
234
- 3. Layout Analysis:
235
- - Analyze auto-layout settings and constraints
236
- - Document spacing patterns and grid systems
237
- - Identify responsive design patterns
238
- - Note alignment and positioning strategies
239
-
240
-
241
-
242
-
243
- `
244
- }
245
- }
246
- ],
247
- description: "Best practices for working with Figma designs"
248
- };
249
- }
250
- );
251
216
  async function main() {
252
217
  try {
253
218
  connectToFigma();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@liner-fe/figma-mcp",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "type": "module",
5
5
  "bin": "dist/server/server.cjs",
6
6
  "files": [
@@ -65,7 +65,6 @@
65
65
  "start": "concurrently \"pnpm run socket\" \"pnpm run dev\" --names \"SOCKET,MCP\" --prefix-colors \"blue,green\"",
66
66
  "build:server": "pnpm tsup",
67
67
  "build": "pnpm build:server",
68
- "build:package": "pnpm build",
69
- "generate-from-link": "tsx src/generate-from-link.ts"
68
+ "build:package": "pnpm build"
70
69
  }
71
70
  }