set_default_connector
Designate a copied connector node as the default connector to streamline design automation with Figma through Cursor AI, enabling efficient programmatic modifications.
Instructions
Set a copied connector node as the default connector
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {},
"type": "object"
}
Implementation Reference
- The MCP tool handler and registration for 'set_default_connector'. This inline async function executes the tool logic by forwarding the optional 'connectorId' parameter to the Figma plugin via sendCommandToFigma, handling success/error responses with markdown text content."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)}` } ] }; } }
- Input schema validation using Zod for the 'set_default_connector' tool, defining an optional 'connectorId' string parameter.connectorId: z.string().optional().describe("The ID of the connector node to set as default")
- src/talk_to_figma_mcp/server.ts:2380-2380 (registration)Registration of the 'set_default_connector' MCP tool using server.tool() with name, description, schema, and handler."set_default_connector",