UNPKG

businessmap-mcp

Version:

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

40 lines (39 loc) 1.61 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ColumnToolsController = void 0; const zod_1 = require("zod"); const ApiService_1 = require("../../services/ApiService"); const apiResponseHandler_1 = require("../../utils/apiResponseHandler"); class ColumnToolsController { server; constructor(server) { this.server = server; this.registerTools(); } registerTools() { this.registerGetColumnsToolhandler(); this.registerGetColumnToolhandler(); } registerGetColumnsToolhandler() { this.server.tool("get-columns", "Get a list of the columns in a specified 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.getColumns(board_id); return (0, apiResponseHandler_1.handleApiResponse)(response); }); } registerGetColumnToolhandler() { this.server.tool("get-column", "Get the details of a single column", { board_id: zod_1.z .string() .describe("A board id for which you want to get the result."), column_id: zod_1.z.string().describe("Column id"), }, async ({ board_id, column_id }) => { const response = await ApiService_1.apiServices.getColumn(board_id, column_id); return (0, apiResponseHandler_1.handleApiResponse)(response); }); } } exports.ColumnToolsController = ColumnToolsController;