faux-studio 0.3.3 → 0.3.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.
- package/dist/index.js +56 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -25355,6 +25355,59 @@ async function handleGetBlueprint(blueprintId, jwt2) {
|
|
|
25355
25355
|
}
|
|
25356
25356
|
return { content };
|
|
25357
25357
|
}
|
|
25358
|
+
var TOOL_ANNOTATIONS = {
|
|
25359
|
+
// --- Local tools ---
|
|
25360
|
+
login: { readOnlyHint: true, openWorldHint: true },
|
|
25361
|
+
setup_figma: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false },
|
|
25362
|
+
// --- Read/Inspect ---
|
|
25363
|
+
get_design_system: { readOnlyHint: true, openWorldHint: false },
|
|
25364
|
+
get_screenshot: { readOnlyHint: true, openWorldHint: false },
|
|
25365
|
+
get_node_details: { readOnlyHint: true, openWorldHint: false },
|
|
25366
|
+
get_page_structure: { readOnlyHint: true, openWorldHint: false },
|
|
25367
|
+
query_nodes: { readOnlyHint: true, openWorldHint: false },
|
|
25368
|
+
get_components: { readOnlyHint: true, openWorldHint: false },
|
|
25369
|
+
get_selection: { readOnlyHint: true, openWorldHint: false },
|
|
25370
|
+
get_connections: { readOnlyHint: true, openWorldHint: false },
|
|
25371
|
+
get_flow_starting_points: { readOnlyHint: true, openWorldHint: false },
|
|
25372
|
+
get_blueprint: { readOnlyHint: true, openWorldHint: true },
|
|
25373
|
+
search_icons: { readOnlyHint: true, openWorldHint: true },
|
|
25374
|
+
// --- Create (not idempotent — creates new nodes each time) ---
|
|
25375
|
+
create_from_schema: { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false },
|
|
25376
|
+
create_variable_collection: { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false },
|
|
25377
|
+
create_variables: { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false },
|
|
25378
|
+
create_text_styles: { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false },
|
|
25379
|
+
connect_nodes: { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false },
|
|
25380
|
+
add_variant_to_component_set: { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false },
|
|
25381
|
+
// --- Modify (idempotent — same params = same result) ---
|
|
25382
|
+
modify_via_schema: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false },
|
|
25383
|
+
update_variables: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false },
|
|
25384
|
+
update_text_styles: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false },
|
|
25385
|
+
update_connections: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false },
|
|
25386
|
+
move_nodes: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false },
|
|
25387
|
+
reorder_children: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false },
|
|
25388
|
+
align_nodes: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false },
|
|
25389
|
+
set_variable_mode: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false },
|
|
25390
|
+
manage_component_properties: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false },
|
|
25391
|
+
focus_viewport: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false },
|
|
25392
|
+
// --- Destructive ---
|
|
25393
|
+
delete_nodes: { readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false },
|
|
25394
|
+
delete_variable_collections: { readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false },
|
|
25395
|
+
delete_variables: { readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false },
|
|
25396
|
+
delete_text_styles: { readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false },
|
|
25397
|
+
disconnect_nodes: { readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false },
|
|
25398
|
+
detach_instance: { readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false },
|
|
25399
|
+
// --- Arbitrary execution (can't classify) ---
|
|
25400
|
+
execute_figma_script: { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false },
|
|
25401
|
+
execute_workflow: { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false },
|
|
25402
|
+
// --- Signals (UI lifecycle, no canvas effect) ---
|
|
25403
|
+
signal_work_start: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false },
|
|
25404
|
+
signal_work_end: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false }
|
|
25405
|
+
};
|
|
25406
|
+
function annotate(tool) {
|
|
25407
|
+
const annotations = TOOL_ANNOTATIONS[tool.name];
|
|
25408
|
+
if (!annotations) return tool;
|
|
25409
|
+
return { ...tool, annotations };
|
|
25410
|
+
}
|
|
25358
25411
|
var INSTRUCTIONS = `You are connected to Figma Desktop via faux-studio. You can create, modify, and inspect designs using the tools below.
|
|
25359
25412
|
|
|
25360
25413
|
## Workflow
|
|
@@ -25390,7 +25443,7 @@ var INSTRUCTIONS = `You are connected to Figma Desktop via faux-studio. You can
|
|
|
25390
25443
|
- Create components for reusable UI patterns.`;
|
|
25391
25444
|
function createMcpServer(deps) {
|
|
25392
25445
|
const server = new Server(
|
|
25393
|
-
{ name: "faux-studio", version: "0.3.
|
|
25446
|
+
{ name: "faux-studio", version: "0.3.4" },
|
|
25394
25447
|
{
|
|
25395
25448
|
capabilities: { tools: { listChanged: true } },
|
|
25396
25449
|
instructions: INSTRUCTIONS
|
|
@@ -25418,7 +25471,8 @@ function createMcpServer(deps) {
|
|
|
25418
25471
|
}
|
|
25419
25472
|
}
|
|
25420
25473
|
];
|
|
25421
|
-
|
|
25474
|
+
const allTools = [...localTools, ...deps.tools].map(annotate);
|
|
25475
|
+
return { tools: allTools };
|
|
25422
25476
|
});
|
|
25423
25477
|
server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
25424
25478
|
const { name, arguments: args } = request.params;
|