create-group
Organize Miro board items into groups by specifying the board ID and item IDs to streamline collaboration and enhance visual clarity.
Instructions
Create a new group on a Miro board
Input 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 |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"boardId": {
"description": "ID of the board where the group will be created",
"type": "string"
},
"data": {
"additionalProperties": false,
"description": "Group data with item IDs to include in the group",
"properties": {
"items": {
"description": "List of item IDs to include in the group",
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"items"
],
"type": "object"
}
},
"required": [
"boardId",
"data"
],
"type": "object"
}
Implementation Reference
- src/tools/createGroup.ts:15-32 (handler)The handler function that executes the create-group tool. It validates inputs, calls the Miro API to create a group with the specified item IDs on the given board, and returns the result or error.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:6-14 (schema)Defines the ToolSchema for 'create-group', including name, description, and Zod input schema for boardId and data (with items array).const createGroupTool: ToolSchema = { name: "create-group", description: "Create a new group on a Miro board", 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 MCP server using ToolBootstrapper.register, which internally calls server.tool with the tool's name, description, args, and fn..register(createGroupTool)