UNPKG

businessmap-mcp

Version:

MCP server for Businessmap Kanbanize, exposing tools for managing business entities like boards, cards, and columns, facilitating LLM interaction.

35 lines (34 loc) 1.32 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.BoardToolsController = void 0; const zod_1 = require("zod"); const ApiService_1 = require("../../services/ApiService"); const apiResponseHandler_1 = require("../../utils/apiResponseHandler"); class BoardToolsController { server; constructor(server) { this.server = server; this.registerTools(); } registerTools() { this.registerGetBoardsToolhandler(); this.registerGetBoardToolhandler(); } registerGetBoardsToolhandler() { this.server.tool("get-boards", "Get a list of boards", async () => { const response = await ApiService_1.apiServices.getBoards(); return (0, apiResponseHandler_1.handleApiResponse)(response); }); } registerGetBoardToolhandler() { this.server.tool("get-board", "Get the details of a single board", { board_id: zod_1.z .string() .describe("A board id for which you want to get the result."), }, async ({ board_id }) => { const response = await ApiService_1.apiServices.getBoard(board_id); return (0, apiResponseHandler_1.handleApiResponse)(response); }); } } exports.BoardToolsController = BoardToolsController;