get-all-groups
Retrieve all groups from a Miro board to manage and organize visual elements. Specify board ID, limit results, and use pagination for large boards.
Instructions
Retrieve all groups on a Miro board
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| boardId | Yes | ID of the board whose groups you want to retrieve | |
| limit | No | Maximum number of groups to return (default: 50) | |
| cursor | No | Cursor for pagination |
Implementation Reference
- src/tools/getAllGroups.ts:14-31 (handler)The asynchronous handler function that implements the tool logic: validates boardId, prepares options for pagination, fetches groups using MiroClient API, stringifies and returns the result, or handles errors.fn: async ({ boardId, limit, cursor }) => { try { if (!boardId) { return ServerResponse.error("Board ID is required"); } const options: any = {}; if (limit) options.limit = limit; if (cursor) options.cursor = cursor; const result = await MiroClient.getApi().getAllGroups(boardId, options); return ServerResponse.text(JSON.stringify(result, null, 2)); } catch (error) { process.stderr.write(`Error retrieving groups: ${error}\n`); return ServerResponse.error(error); } }
- src/tools/getAllGroups.ts:7-13 (schema)Tool schema defining the name, description, and Zod-validated input parameters (boardId required, limit and cursor optional).name: "get-all-groups", description: "Retrieve all groups on a Miro board", args: { boardId: z.string().describe("ID of the board whose groups you want to retrieve"), limit: z.number().optional().nullish().describe("Maximum number of groups to return (default: 50)"), cursor: z.string().optional().nullish().describe("Cursor for pagination") },
- src/index.ts:179-179 (registration)Registers the getAllGroupsTool with the MCP ToolBootstrapper in the main index file..register(getAllGroupsTool)