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.31 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.UserToolsController = void 0;
const zod_1 = require("zod");
const ApiService_1 = require("../../services/ApiService");
const apiResponseHandler_1 = require("../../utils/apiResponseHandler");
class UserToolsController {
server;
constructor(server) {
this.server = server;
this.registerTools();
}
registerTools() {
this.registerGetUserToolhandler();
this.registerGetMeToolhandler();
}
registerGetUserToolhandler() {
this.server.tool("get-user", "Get the details of a single user", {
user_id: zod_1.z
.string()
.describe("A user id for which you want to get the result."),
}, async ({ user_id }) => {
const response = await ApiService_1.apiServices.getUser(user_id);
return (0, apiResponseHandler_1.handleApiResponse)(response);
});
}
registerGetMeToolhandler() {
this.server.tool("get-me", "Get the details of the current logged user", async () => {
const response = await ApiService_1.apiServices.getMe();
return (0, apiResponseHandler_1.handleApiResponse)(response);
});
}
}
exports.UserToolsController = UserToolsController;