get-group-items
Retrieve all items from a specific group on a Miro board to access organized content and manage board elements efficiently.
Instructions
Retrieve all items in a specific group on a Miro board
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| boardId | Yes | ID of the board that contains the group | |
| groupId | Yes | ID of the group whose items you want to retrieve | |
| limit | No | Maximum number of items to return (default: 50) | |
| cursor | No | Cursor for pagination |
Implementation Reference
- src/tools/getGroupItems.ts:15-36 (handler)The asynchronous handler function that implements the tool logic: validates inputs, calls MiroClient.getApi().getItemsByGroupId with optional pagination, and returns the JSON result or error response.fn: async ({ boardId, groupId, limit, cursor }) => { try { if (!boardId) { return ServerResponse.error("Board ID is required"); } if (!groupId) { return ServerResponse.error("Group ID is required"); } const options: any = {}; if (limit) options.limit = limit; if (cursor) options.cursor = cursor; const result = await MiroClient.getApi().getItemsByGroupId(boardId, groupId, options); return ServerResponse.text(JSON.stringify(result, null, 2)); } catch (error) { process.stderr.write(`Error retrieving group items: ${error}\n`); return ServerResponse.error(error); } }
- src/tools/getGroupItems.ts:9-14 (schema)Zod-based input schema defining required boardId and groupId, optional limit and cursor for pagination.args: { boardId: z.string().describe("ID of the board that contains the group"), groupId: z.string().describe("ID of the group whose items you want to retrieve"), limit: z.number().optional().nullish().describe("Maximum number of items to return (default: 50)"), cursor: z.string().optional().nullish().describe("Cursor for pagination") },
- src/index.ts:181-181 (registration)Registers the getGroupItemsTool with the ToolBootstrapper instance in the main index file..register(getGroupItemsTool)
- src/index.ts:80-80 (registration)Imports the getGroupItemsTool from its definition file for registration.import getGroupItemsTool from './tools/getGroupItems.js';
- src/tools/getGroupItems.ts:6-37 (schema)Complete ToolSchema definition including name, description, input args schema, and handler function.const getGroupItemsTool: ToolSchema = { name: "get-group-items", description: "Retrieve all items in a specific group on a Miro board", args: { boardId: z.string().describe("ID of the board that contains the group"), groupId: z.string().describe("ID of the group whose items you want to retrieve"), limit: z.number().optional().nullish().describe("Maximum number of items to return (default: 50)"), cursor: z.string().optional().nullish().describe("Cursor for pagination") }, fn: async ({ boardId, groupId, limit, cursor }) => { try { if (!boardId) { return ServerResponse.error("Board ID is required"); } if (!groupId) { return ServerResponse.error("Group ID is required"); } const options: any = {}; if (limit) options.limit = limit; if (cursor) options.cursor = cursor; const result = await MiroClient.getApi().getItemsByGroupId(boardId, groupId, options); return ServerResponse.text(JSON.stringify(result, null, 2)); } catch (error) { process.stderr.write(`Error retrieving group items: ${error}\n`); return ServerResponse.error(error); } } }