Skip to main content
Glama

create_connections

Connect Figma design nodes with default styling to visualize relationships and workflows between elements in your design files.

Instructions

Create connections between nodes using the default connector style

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
connectionsYesArray of node connections to create

Implementation Reference

  • The handler function for the MCP tool 'create_connections'. It checks if connections are provided, sends the 'create_connections' command with the connections array to the Figma plugin using sendCommandToFigma, and returns success/error messages.
    async ({ connections }) => { try { if (!connections || connections.length === 0) { return { content: [ { type: "text", text: "No connections provided" } ] }; } const result = await sendCommandToFigma("create_connections", { connections }); return { content: [ { type: "text", text: `Created ${connections.length} connections: ${JSON.stringify(result)}` } ] }; } catch (error) { return { content: [ { type: "text", text: `Error creating connections: ${error instanceof Error ? error.message : String(error)}` } ] }; } }
  • Zod input schema for the 'create_connections' tool, defining an array of connection objects each with required startNodeId, endNodeId, and optional text.
    { connections: z.array(z.object({ startNodeId: z.string().describe("ID of the starting node"), endNodeId: z.string().describe("ID of the ending node"), text: z.string().optional().describe("Optional text to display on the connector") })).describe("Array of node connections to create") },
  • Registration of the 'create_connections' MCP tool on the McpServer instance, including name, description, input schema, and handler function.
    server.tool( "create_connections", "Create connections between nodes using the default connector style", { connections: z.array(z.object({ startNodeId: z.string().describe("ID of the starting node"), endNodeId: z.string().describe("ID of the ending node"), text: z.string().optional().describe("Optional text to display on the connector") })).describe("Array of node connections to create") }, async ({ connections }) => { try { if (!connections || connections.length === 0) { return { content: [ { type: "text", text: "No connections provided" } ] }; } const result = await sendCommandToFigma("create_connections", { connections }); return { content: [ { type: "text", text: `Created ${connections.length} connections: ${JSON.stringify(result)}` } ] }; } catch (error) { return { content: [ { type: "text", text: `Error creating connections: ${error instanceof Error ? error.message : String(error)}` } ] }; } }
  • TypeScript type definition for CommandParams.create_connections used in sendCommandToFigma calls, matching the tool's input schema.
    create_connections: { connections: Array<{ startNodeId: string; endNodeId: string; text?: string; }>; };

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/andreycretsu/cursor-talk-to-figma-mcp-main'

If you have feedback or need assistance with the MCP directory API, please join our Discord server