create-group
Organize Miro board items by creating groups to structure content and improve visual organization.
Instructions
Create a new group on a Miro board
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| boardId | Yes | ID of the board where the group will be created | |
| data | Yes | Group data with item IDs to include in the group |
Implementation Reference
- src/tools/createGroup.ts:15-32 (handler)The handler function that implements the create-group tool logic. It validates inputs, calls MiroClient.getApi().createGroup, and handles errors.fn: async ({ boardId, data }) => { try { if (!boardId) { return ServerResponse.error("Board ID is required"); } if (!data || !data.items || data.items.length === 0) { return ServerResponse.error("At least one item ID is required in the 'items' array"); } const result = await MiroClient.getApi().createGroup(boardId, { data }); return ServerResponse.text(JSON.stringify(result, null, 2)); } catch (error) { process.stderr.write(`Error creating group: ${error}\n`); return ServerResponse.error(error); } }
- src/tools/createGroup.ts:9-14 (schema)Zod schema defining the input parameters: boardId (string) and data (object with items array).args: { boardId: z.string().describe("ID of the board where the group will be created"), data: z.object({ items: z.array(z.string()).describe("List of item IDs to include in the group") }).describe("Group data with item IDs to include in the group") },
- src/index.ts:178-178 (registration)Registers the createGroupTool with the ToolBootstrapper instance..register(createGroupTool)