"use strict";
/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.createMCPServer = createMCPServer;
const mcp_js_1 = require("@modelcontextprotocol/sdk/server/mcp.js");
const core_js_1 = require("../core.js");
const prompts_js_1 = require("./prompts.js");
const resources_js_1 = require("./resources.js");
const tools_js_1 = require("./tools.js");
const assetRelationsCreateAssetRelationsByAssetId_js_1 = require("./tools/assetRelationsCreateAssetRelationsByAssetId.js");
const assetRelationsDeleteAssetRelationsByAssetId_js_1 = require("./tools/assetRelationsDeleteAssetRelationsByAssetId.js");
const assetsDerivedDestroy_js_1 = require("./tools/assetsDerivedDestroy.js");
const assetsDestroyByAssetId_js_1 = require("./tools/assetsDestroyByAssetId.js");
const assetsDownloadAsset_js_1 = require("./tools/assetsDownloadAsset.js");
const assetsDownloadBackupAsset_js_1 = require("./tools/assetsDownloadBackupAsset.js");
const assetsGenerateArchive_js_1 = require("./tools/assetsGenerateArchive.js");
const assetsGetResourceByAssetId_js_1 = require("./tools/assetsGetResourceByAssetId.js");
const assetsListImages_js_1 = require("./tools/assetsListImages.js");
const assetsListRawFiles_js_1 = require("./tools/assetsListRawFiles.js");
const assetsListResourceTags_js_1 = require("./tools/assetsListResourceTags.js");
const assetsListVideos_js_1 = require("./tools/assetsListVideos.js");
const assetsRenameAsset_js_1 = require("./tools/assetsRenameAsset.js");
const assetsUpdateResourceByAssetId_js_1 = require("./tools/assetsUpdateResourceByAssetId.js");
const foldersCreateFolder_js_1 = require("./tools/foldersCreateFolder.js");
const foldersDestroyFolder_js_1 = require("./tools/foldersDestroyFolder.js");
const foldersSearchFolders_js_1 = require("./tools/foldersSearchFolders.js");
const foldersUpdateFolder_js_1 = require("./tools/foldersUpdateFolder.js");
const searchSearchAssets_js_1 = require("./tools/searchSearchAssets.js");
const searchVisualSearchAssets_js_1 = require("./tools/searchVisualSearchAssets.js");
const uploadUpload_js_1 = require("./tools/uploadUpload.js");
const usageGetUsage_js_1 = require("./tools/usageGetUsage.js");
function createMCPServer(deps) {
    const server = new mcp_js_1.McpServer({
        name: "CloudinaryAssetMgmt",
        version: "0.5.0",
    });
    const client = new core_js_1.CloudinaryAssetMgmtCore({
        security: deps.security,
        cloudName: deps.cloudName,
        serverURL: deps.serverURL,
        serverIdx: deps.serverIdx,
        region: deps.region,
        host: deps.host,
    });
    const scopes = new Set(deps.scopes);
    const allowedTools = deps.allowedTools && new Set(deps.allowedTools);
    const tool = (0, tools_js_1.createRegisterTool)(deps.logger, server, client, scopes, allowedTools);
    const resource = (0, resources_js_1.createRegisterResource)(deps.logger, server, client, scopes);
    const resourceTemplate = (0, resources_js_1.createRegisterResourceTemplate)(deps.logger, server, client, scopes);
    const prompt = (0, prompts_js_1.createRegisterPrompt)(deps.logger, server, client, scopes);
    const register = { tool, resource, resourceTemplate, prompt };
    void register; // suppress unused warnings
    tool(uploadUpload_js_1.tool$uploadUpload);
    tool(assetsRenameAsset_js_1.tool$assetsRenameAsset);
    tool(assetsDownloadAsset_js_1.tool$assetsDownloadAsset);
    tool(assetsGenerateArchive_js_1.tool$assetsGenerateArchive);
    tool(assetsDownloadBackupAsset_js_1.tool$assetsDownloadBackupAsset);
    tool(assetsDestroyByAssetId_js_1.tool$assetsDestroyByAssetId);
    tool(assetsListImages_js_1.tool$assetsListImages);
    tool(assetsListVideos_js_1.tool$assetsListVideos);
    tool(assetsListRawFiles_js_1.tool$assetsListRawFiles);
    tool(assetsGetResourceByAssetId_js_1.tool$assetsGetResourceByAssetId);
    tool(assetsUpdateResourceByAssetId_js_1.tool$assetsUpdateResourceByAssetId);
    tool(assetsListResourceTags_js_1.tool$assetsListResourceTags);
    tool(assetsDerivedDestroy_js_1.tool$assetsDerivedDestroy);
    tool(usageGetUsage_js_1.tool$usageGetUsage);
    tool(assetRelationsCreateAssetRelationsByAssetId_js_1.tool$assetRelationsCreateAssetRelationsByAssetId);
    tool(assetRelationsDeleteAssetRelationsByAssetId_js_1.tool$assetRelationsDeleteAssetRelationsByAssetId);
    tool(foldersUpdateFolder_js_1.tool$foldersUpdateFolder);
    tool(foldersCreateFolder_js_1.tool$foldersCreateFolder);
    tool(foldersDestroyFolder_js_1.tool$foldersDestroyFolder);
    tool(foldersSearchFolders_js_1.tool$foldersSearchFolders);
    tool(searchSearchAssets_js_1.tool$searchSearchAssets);
    tool(searchVisualSearchAssets_js_1.tool$searchVisualSearchAssets);
    return server;
}
//# sourceMappingURL=server.js.map