"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.listAvailableMcpServers = listAvailableMcpServers;
const services_1 = require("../../../services");
const Tools_1 = require("../../../services/Tools");
async function listAvailableMcpServers() {
    const toolService = (this instanceof Tools_1.ToolsService ? this : (0, services_1.services)().Tools);
    const context = toolService.getContext();
    const Mcp = context.Mcp;
    if (!Mcp) {
        return {
            error: "MCP service not available in context",
            servers: [],
        };
    }
    const servers = Mcp.getAvailableServers();
    return {
        servers,
        summary: `Found ${servers.length} configured MCP server(s). ${servers.filter((s) => s.connected).length} connected, ${servers.filter((s) => !s.connected).length} disconnected.`,
    };
}
//# sourceMappingURL=listAvailableMcpServers.js.map