Skip to main content
Glama

set_default_connector

Define a copied connector node as the default in Figma designs, enabling consistent and programmatic modifications through the Talk to Figma MCP server.

Instructions

Set a copied connector node as the default connector

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler function that executes the tool by proxying the 'set_default_connector' command to the Figma plugin via WebSocket.
    async ({ connectorId }) => { try { const result = await sendCommandToFigma("set_default_connector", { connectorId }); return { content: [ { type: "text", text: `Default connector set: ${JSON.stringify(result)}` } ] }; } catch (error) { return { content: [ { type: "text", text: `Error setting default connector: ${error instanceof Error ? error.message : String(error)}` } ] }; }
  • Zod input schema defining the optional 'connectorId' parameter for the tool.
    connectorId: z.string().optional().describe("The ID of the connector node to set as default") }, async ({ connectorId }) => {
  • Registration of the MCP tool 'set_default_connector' using McpServer.tool() method.
    "set_default_connector", "Set a copied connector node as the default connector", { connectorId: z.string().optional().describe("The ID of the connector node to set as default") }, async ({ connectorId }) => { try { const result = await sendCommandToFigma("set_default_connector", { connectorId }); return { content: [ { type: "text", text: `Default connector set: ${JSON.stringify(result)}` } ] }; } catch (error) { return { content: [ { type: "text", text: `Error setting default connector: ${error instanceof Error ? error.message : String(error)}` } ] }; } } );

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