create-connector
Create visual connections between items on a Miro board by specifying start and end points, enabling diagram creation and relationship mapping.
Instructions
Create a new connector between items on a Miro board
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| boardId | Yes | Unique identifier (ID) of the board where the connector will be created | |
| startItem | Yes | Start item of the connector | |
| endItem | Yes | End item of the connector | |
| style | No | Style configuration of the connector |
Implementation Reference
- src/tools/createConnector.ts:27-46 (handler)The handler function that implements the core logic of the 'create-connector' tool. It validates inputs, constructs a ConnectorCreationData object, and calls the Miro API to create the connector on the specified board.fn: async ({ boardId, startItem, endItem, style }) => { try { if (!boardId) { return ServerResponse.error("Board ID is required"); } const connectorData = new ConnectorCreationData(); connectorData.startItem = startItem; connectorData.endItem = endItem; if (style) { connectorData.style = style; } const result = await MiroClient.getApi().createConnector(boardId, connectorData); return ServerResponse.text(JSON.stringify(result, null, 2)); } catch (error) { return ServerResponse.error(error); } }
- src/tools/createConnector.ts:9-26 (schema)The Zod-based input schema defining the parameters for the 'create-connector' tool, including boardId, startItem, endItem, and optional style.name: "create-connector", description: "Create a new connector between items on a Miro board", args: { boardId: z.string().describe("Unique identifier (ID) of the board where the connector will be created"), startItem: z.object({ id: z.string().describe("ID of the item at the start of the connector") }).describe("Start item of the connector"), endItem: z.object({ id: z.string().describe("ID of the item at the end of the connector") }).describe("End item of the connector"), style: z.object({ strokeColor: z.string().optional().nullish().describe("Color of the connector stroke"), strokeWidth: z.number().optional().nullish().describe("Width of the connector stroke"), strokeStyle: z.string().optional().nullish().describe("Style of the connector stroke (normal, dashed, etc.)"), startStrokeCap: z.string().optional().nullish().describe("Start stroke cap style"), endStrokeCap: z.string().optional().nullish().describe("End stroke cap style") }).optional().nullish().describe("Style configuration of the connector") },
- src/index.ts:129-129 (registration)Registers the createConnectorTool ("create-connector") with the ToolBootstrapper instance..register(createConnectorTool)
- src/index.ts:28-28 (registration)Imports the createConnectorTool module for registration.import createConnectorTool from './tools/createConnector.js';