Skip to main content
Glama

create_connections

Connect Figma design nodes using default connector styles to establish visual relationships between elements.

Instructions

Create connections between nodes using the default connector style

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
connectionsYesArray of node connections to create

Implementation Reference

  • Handler function that executes the create_connections tool by proxying the request to the Figma plugin via sendCommandToFigma.
    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)}`
            }
          ]
        };
      }
    }
  • Registration of the create_connections tool on the MCP server using server.tool().
    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)}`
              }
            ]
          };
        }
      }
    );
  • Zod schema defining the input parameters for the create_connections tool.
      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")
    },
Behavior2/5

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

With no annotations provided, the description carries full burden but offers minimal behavioral insight. It mentions 'default connector style' but doesn't explain what this means, whether connections are bidirectional, if they can be edited/deleted later, or what happens on failure. The description doesn't contradict annotations (none exist), but provides inadequate transparency for a creation tool.

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 directly states the tool's purpose without unnecessary words. It's appropriately sized and front-loaded, with every element contributing to understanding the core functionality.

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?

For a creation tool with no annotations and no output schema, the description is insufficient. It doesn't explain what 'connections' represent in this context, what happens after creation, error conditions, or return values. The mention of 'default connector style' is vague without elaboration, leaving significant gaps in understanding the tool's behavior.

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%, so the schema fully documents the 'connections' parameter and its nested properties. The description adds no additional parameter information beyond what's in the schema, maintaining the baseline score of 3 for adequate coverage through structured data alone.

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 the resource ('between nodes'), specifying the use of 'default connector style'. It distinguishes from siblings like 'set_default_connector' by focusing on creation rather than configuration, but doesn't explicitly differentiate from all siblings like 'clone_node' or 'move_node'.

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?

No guidance is provided on when to use this tool versus alternatives. The description mentions 'default connector style' but doesn't explain when to use this versus other styling methods or sibling tools like 'set_default_connector'. There's no mention of prerequisites, constraints, or typical use cases.

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/pipethedev/Talk-to-Figma-MCP'

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