import type { StructuredToolInterface } from "@langchain/core/tools"; import type { LangChainAdapter } from "../adapters/langchain_adapter.js"; import type { MCPClient } from "@mcp-use/client"; import type { IServerManager } from "./types.js"; /** Selects an active MCP server and exposes its LangChain tools. */ export declare class ServerManager implements IServerManager { /** Whether capabilities have been loaded for each configured server. */ readonly initializedServers: Record; /** Cached LangChain tools, resources, and prompts by server name. */ readonly serverTools: Record; /** MCP client that owns server configurations and sessions. */ readonly client: MCPClient; /** Adapter used to create LangChain tools. */ readonly adapter: LangChainAdapter; /** Server whose cached tools are currently exposed. */ activeServer: string | null; private overrideManagementTools?; /** * @param client - MCP client that owns the managed servers. * @param adapter - Adapter used to convert MCP capabilities. * @param managementTools - Optional replacement for the built-in server * management tools. */ constructor(client: MCPClient, adapter: LangChainAdapter, managementTools?: StructuredToolInterface[]); /** * Replaces the management tools returned by {@link ServerManager.tools}. * * @param tools - Complete replacement tool list. */ setManagementTools(tools: StructuredToolInterface[]): void; /** * Writes current connection and tool-cache state at debug level. * * @param context - Label describing why the state was logged. */ logState(context: string): void; /** Validates that the client contains at least one server configuration. */ initialize(): void; /** * Connects configured servers as needed and caches all tools, resources, and * prompts. */ prefetchServerTools(): Promise; /** * @returns Management tools plus cached tools from the active server, if any. */ get tools(): StructuredToolInterface[]; } //# sourceMappingURL=server_manager.d.ts.map