"use client";
import { useCallback } from "react";
import { useStigmer } from "../hooks";
import { useResourceCount } from "../search";
/**
 * Data hook that fetches the total count of MCP servers.
 *
 * Issues a minimal `stigmer.mcpServer.list()` call to retrieve only the
 * total count — no MCP server entries are returned or stored. Useful for
 * summary cards, badges, and dashboard widgets.
 *
 * For the full paginated MCP server list, use {@link useMcpServerList} instead.
 *
 * Pass `null` as `org` to skip fetching (stable no-op).
 *
 * @example
 * ```tsx
 * const { count, isLoading } = useMcpServerCount("acme");
 * ```
 *
 * @example
 * ```tsx
 * // Count all accessible MCP servers including public/platform ones
 * const { count } = useMcpServerCount("acme", { scope: "all" });
 * ```
 */
export function useMcpServerCount(org, options) {
    const stigmer = useStigmer();
    const listFn = useCallback((params) => stigmer.mcpServer.list(params), [stigmer]);
    return useResourceCount(listFn, org, options);
}
//# sourceMappingURL=useMcpServerCount.js.map