update-connector
Modify existing connectors on Miro boards by updating their endpoints, stroke styles, colors, or connection points to reflect changes in visual diagrams.
Instructions
Update an existing connector on a Miro board
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| boardId | Yes | Unique identifier (ID) of the board that contains the connector | |
| connectorId | Yes | Unique identifier (ID) of the connector that you want to update | |
| startItem | No | Start item of the connector | |
| endItem | No | End item of the connector | |
| style | No | Updated style configuration of the connector |
Implementation Reference
- src/tools/updateConnector.ts:28-57 (handler)Handler function that updates a connector on a Miro board by constructing ConnectorChangesData and calling MiroClient.updateConnector.fn: async ({ boardId, connectorId, startItem, endItem, style }) => { try { if (!boardId) { return ServerResponse.error("Board ID is required"); } if (!connectorId) { return ServerResponse.error("Connector ID is required"); } const changes = new ConnectorChangesData(); if (startItem) { changes.startItem = startItem; } if (endItem) { changes.endItem = endItem; } if (style) { changes.style = style; } const result = await MiroClient.getApi().updateConnector(boardId, connectorId, changes); return ServerResponse.text(JSON.stringify(result, null, 2)); } catch (error) { return ServerResponse.error(error); } }
- src/tools/updateConnector.ts:11-27 (schema)Zod schema defining the input parameters for the update-connector tool.args: { boardId: z.string().describe("Unique identifier (ID) of the board that contains the connector"), connectorId: z.string().describe("Unique identifier (ID) of the connector that you want to update"), startItem: z.object({ id: z.string().describe("ID of the item at the start of the connector") }).optional().nullish().describe("Start item of the connector"), endItem: z.object({ id: z.string().describe("ID of the item at the end of the connector") }).optional().nullish().describe("End item of the connector"), style: z.object({ strokeColor: z.string().optional().nullish().describe("Updated color of the connector stroke"), strokeWidth: z.number().optional().nullish().describe("Updated width of the connector stroke"), strokeStyle: z.string().optional().nullish().describe("Updated style of the connector stroke (normal, dashed, etc.)"), startStrokeCap: z.string().optional().nullish().describe("Updated start stroke cap style"), endStrokeCap: z.string().optional().nullish().describe("Updated end stroke cap style") }).optional().nullish().describe("Updated style configuration of the connector") },
- src/index.ts:31-31 (registration)Import statement for the updateConnectorTool.import updateConnectorTool from './tools/updateConnector.js';
- src/index.ts:132-132 (registration)Registration of the update-connector tool using ToolBootstrapper.register method..register(updateConnectorTool)