set_default_connector
Set a copied connector node as the default connector in Figma to maintain consistent styling across designs.
Instructions
Set a copied connector node as the default connector
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| connectorId | No | The ID of the connector node to set as default |
Implementation Reference
- Handler function that forwards the set_default_connector command to the Figma plugin server via sendCommandToFigma, handling success and error responses with appropriate content blocks.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 schema defining the input parameters for the tool: optional connectorId string.connectorId: z.string().optional().describe("The ID of the connector node to set as default") }, async ({ connectorId }) => {
- src/talk_to_figma_mcp/server.ts:2380-2411 (registration)MCP tool registration using server.tool(), including name, description, schema, and handler function."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)}` } ] }; } } );