faux-studio 0.3.2 → 0.3.3

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.
Files changed (2) hide show
  1. package/dist/index.js +38 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -25355,10 +25355,46 @@ async function handleGetBlueprint(blueprintId, jwt2) {
25355
25355
  }
25356
25356
  return { content };
25357
25357
  }
25358
+ var INSTRUCTIONS = `You are connected to Figma Desktop via faux-studio. You can create, modify, and inspect designs using the tools below.
25359
+
25360
+ ## Workflow
25361
+ 1. Call \`setup_figma\` first to ensure Figma is running and connected.
25362
+ 2. Call \`get_page_structure\` or \`get_screenshot\` to understand what's on the canvas.
25363
+ 3. Use \`create_from_schema\` for all creation \u2014 it accepts declarative JSON schemas.
25364
+ 4. Use \`modify_via_schema\` to change existing nodes.
25365
+ 5. Use \`get_screenshot\` to verify your work visually.
25366
+
25367
+ ## Primary Tools
25368
+ - **create_from_schema** \u2014 The main creation tool. Pass a JSON schema describing frames, components, text, shapes, auto-layout, and variable bindings. Supports \`@Variable|fallback\` syntax for design tokens, \`$icon\` for icons, \`$image\` for images, \`$textStyle\` for typography, and ComponentSet matrix mode.
25369
+ - **modify_via_schema** \u2014 Modify existing nodes by ID. Same schema format as create_from_schema.
25370
+ - **execute_figma_script** \u2014 Run raw Figma Plugin API JavaScript when no other tool fits.
25371
+
25372
+ ## Design Tokens & Variables
25373
+ - Call \`get_design_system\` to read existing variables, styles, and tokens before designing.
25374
+ - Use \`create_variable_collection\` and \`create_variables\` to set up design tokens.
25375
+ - Bind variables in schemas with \`@CollectionName/VariableName|fallback\` syntax.
25376
+
25377
+ ## Reading the Canvas
25378
+ - \`get_page_structure\` \u2014 page/frame hierarchy
25379
+ - \`get_node_details\` \u2014 inspect specific nodes by ID
25380
+ - \`get_selection\` \u2014 what the user has selected
25381
+ - \`query_nodes\` \u2014 search nodes by type, name, or properties
25382
+ - \`get_components\` \u2014 list available components
25383
+ - \`get_screenshot\` \u2014 visual capture of the canvas
25384
+
25385
+ ## Best Practices
25386
+ - Always read the existing design system before creating new elements.
25387
+ - Use auto-layout (horizontal/vertical) for responsive layouts \u2014 avoid absolute positioning.
25388
+ - Bind colors, spacing, and typography to variables for maintainability.
25389
+ - Group related elements in frames with descriptive names.
25390
+ - Create components for reusable UI patterns.`;
25358
25391
  function createMcpServer(deps) {
25359
25392
  const server = new Server(
25360
- { name: "faux-studio", version: "0.3.2" },
25361
- { capabilities: { tools: { listChanged: true } } }
25393
+ { name: "faux-studio", version: "0.3.3" },
25394
+ {
25395
+ capabilities: { tools: { listChanged: true } },
25396
+ instructions: INSTRUCTIONS
25397
+ }
25362
25398
  );
25363
25399
  server.setRequestHandler(ListToolsRequestSchema, async () => {
25364
25400
  const localTools = [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "faux-studio",
3
- "version": "0.3.2",
3
+ "version": "0.3.3",
4
4
  "description": "AI-powered Figma design via MCP — connect any AI client to Figma Desktop",
5
5
  "type": "module",
6
6
  "bin": {