copy-board
Duplicate Miro boards to create new versions with custom names, descriptions, sharing policies, or team assignments.
Instructions
Create a copy of an existing Miro board with optional new settings
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| copyFrom | Yes | Unique identifier (ID) of the board that you want to copy | |
| name | No | Name for the new copied board | |
| description | No | Description for the new copied board | |
| sharingPolicy | No | Sharing policy for the new copied board | |
| teamId | No | Team ID to assign the new copied board to |
Implementation Reference
- src/tools/copyBoard.ts:16-35 (handler)The asynchronous function that implements the core logic of the 'copy-board' tool. It validates the required 'copyFrom' parameter, constructs optional changes for the new board, calls the Miro API to copy the board, and returns a formatted JSON response or an error.fn: async ({ copyFrom, name, description, sharingPolicy, teamId }) => { try { if (!copyFrom) { return ServerResponse.error("Source board ID is required"); } const copyBoardChanges = {}; if (name) copyBoardChanges['name'] = name; if (description !== undefined) copyBoardChanges['description'] = description; if (sharingPolicy) copyBoardChanges['sharingPolicy'] = { access: sharingPolicy }; if (teamId) copyBoardChanges['teamId'] = teamId; const boardData = await MiroClient.getApi().copyBoard(copyFrom, copyBoardChanges); return ServerResponse.text(JSON.stringify(boardData, null, 2)); } catch (error) { process.stderr.write(`Error copying Miro board: ${error}\n`); return ServerResponse.error(error); } }
- src/tools/copyBoard.ts:6-15 (schema)Defines the ToolSchema for the 'copy-board' tool, including the name, description, and Zod-based input schema for the tool parameters.const copyBoardTool: ToolSchema = { name: "copy-board", description: "Create a copy of an existing Miro board with optional new settings", args: { copyFrom: z.string().describe("Unique identifier (ID) of the board that you want to copy"), name: z.string().optional().nullish().describe("Name for the new copied board"), description: z.string().optional().nullish().describe("Description for the new copied board"), sharingPolicy: z.enum(['private', 'view', 'comment', 'edit']).optional().nullish().describe("Sharing policy for the new copied board"), teamId: z.string().optional().nullish().describe("Team ID to assign the new copied board to") },
- src/index.ts:115-115 (registration)Registers the copyBoardTool instance with the ToolBootstrapper in the main server bootstrap process..register(copyBoardTool)