Skip to main content
Glama
andreycretsu

Cursor Talk to Figma MCP

by andreycretsu

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;
      }>;
    };
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It mentions 'default connector style' but doesn't disclose critical behaviors: whether connections are bidirectional, if they can be edited/deleted later, what happens with invalid node IDs, or if there are rate limits. For a creation tool with zero annotation coverage, this leaves significant gaps in understanding its operational impact.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core action ('create connections between nodes') and adds a useful constraint ('using the default connector style'). There is no wasted wording, and it directly addresses the tool's function without redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations, no output schema, and a creation tool with potential side effects (modifying node relationships), the description is incomplete. It lacks details on behavioral traits (e.g., error handling, idempotency), return values, or usage context. For a tool that alters a design environment, more guidance is needed to ensure safe and effective use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with clear documentation for the 'connections' array and its nested properties (startNodeId, endNodeId, text). The description adds minimal value beyond the schema, only implying the 'default connector style' applies to all created connections. No additional syntax or format details are provided, meeting the baseline for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('create connections') and resource ('between nodes'), specifying it uses 'default connector style'. It distinguishes from siblings like 'set_default_connector' (which configures style) and 'clone_node' (which duplicates nodes). However, it doesn't explicitly differentiate from tools like 'move_node' or 'set_axis_align' that might involve node relationships.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., existing nodes), exclusions (e.g., invalid node IDs), or comparisons to siblings like 'set_default_connector' (for style changes) or 'move_node' (for repositioning). Usage is implied but not explicitly stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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