get_miro_board
Retrieve details for a specific Miro board by providing its board ID, enabling access to board information within the Learning Hour MCP server for technical coaching sessions.
Instructions
Get details about a specific Miro board
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| boardId | Yes | ID of the Miro board to get details for |
Implementation Reference
- src/index.ts:540-588 (handler)Main handler function for the 'get_miro_board' tool. Extracts boardId from input arguments, checks for Miro integration, calls MiroIntegration.getBoardInfo, and returns formatted text blocks with board details.private async getMiroBoard(args: any) { try { if (!this.miroIntegration) { throw new Error('Miro integration not initialized. Ensure MIRO_ACCESS_TOKEN is set in the environment.'); } const boardId = args.boardId; if (!boardId) { throw new Error('Board ID is required'); } const board = await this.miroIntegration.getBoardInfo(boardId); return { content: [ { type: "text", text: `Board Details:`, }, { type: "text", text: `Name: ${board.name}`, }, { type: "text", text: `ID: ${board.id}`, }, { type: "text", text: `Description: ${board.description || 'No description'}`, }, { type: "text", text: `View Link: ${board.viewLink}`, }, { type: "text", text: `Created: ${board.createdAt}`, }, { type: "text", text: `Modified: ${board.modifiedAt}`, }, ], }; } catch (error) { throw new Error(`Failed to get Miro board: ${error instanceof Error ? error.message : String(error)}`); } }
- src/MiroIntegration.ts:121-133 (helper)Core helper method in MiroIntegration class that performs the actual API call to Miro's /boards/{boardId} endpoint to fetch board information.async getBoardInfo(boardId: string): Promise<MiroBoard> { try { const response = await axios.get(`${this.miroApiUrl}/boards/${boardId}`, { headers: { 'authorization': `Bearer ${this.accessToken}`, } }); return response.data; } catch (error) { throw new Error(`Failed to get board info: ${error instanceof Error ? error.message : String(error)}`); } }
- src/index.ts:202-215 (registration)Tool registration entry in the ListTools response, defining the tool name, description, and input schema requiring a 'boardId' string.{ name: "get_miro_board", description: "Get details about a specific Miro board", inputSchema: { type: "object", properties: { boardId: { type: "string", description: "ID of the Miro board to get details for", }, }, required: ["boardId"], }, },
- src/MiroIntegration.ts:8-15 (schema)TypeScript interface defining the structure of a MiroBoard object returned by the getBoardInfo method.interface MiroBoard { id: string; name: string; description?: string; createdAt: string; modifiedAt: string; viewLink: string; }