/**
 * grafana_explain_metric tool
 *
 * Gathers structured data about a metric — current value, trend over a period,
 * min/max/avg statistics, and metadata (type/help/unit). The agent uses this
 * enriched context to explain what a metric means and why it changed.
 *
 * Counter-aware: auto-detects counter metrics (via metadata or _total suffix)
 * and wraps the trend query in rate() so the agent sees actual rate of change
 * instead of raw monotonically-increasing cumulative values.
 */
import type { GrafanaClientRegistry } from "../grafana-client-registry.js";
/**
 * Resolve meaningful label names for breaking down a metric.
 * Uses static knowledge for well-known metrics (works even with no data);
 * falls back to dynamically-discovered labels from query results.
 *
 * Suffix-tolerant: tries the exact name first, then strips Prometheus
 * suffixes (_total, _bucket, _count, _sum) to match the base definition.
 * This handles the OTel→Prometheus naming gap — agents may pass either form.
 */
export declare function resolveBreakdowns(metricName: string, dynamicLabels: string[]): string[];
/**
 * Extract unique semantic label names from instant query results.
 * Excludes infrastructure labels (__name__, job, instance, etc.)
 * that don't provide useful drill-down dimensions.
 */
export declare function extractLabelNames(results: Array<{
    metric: Record<string, string>;
}>): string[];
type SuggestedQuery = {
    query: string;
    description: string;
};
/**
 * Generate suggested drill-down queries based on discovered labels and metric type.
 * Counter metrics get rate() wrapping; gauges/unknown use raw expressions.
 * Returns empty array when no labels are available.
 */
export declare function buildSuggestedQueries(expr: string, labels: string[], metricType: string | undefined): SuggestedQuery[];
export declare function createExplainMetricToolFactory(registry: GrafanaClientRegistry): (_ctx: unknown) => {
    name: string;
    label: string;
    description: string;
    parameters: {
        type: "object";
        properties: {
            datasourceUid: {
                type: string;
                description: string;
            };
            expr: {
                type: string;
                description: string;
            };
            period: {
                type: string;
                enum: string[];
                description: string;
            };
            compareWith: {
                type: string;
                enum: string[];
                description: string;
            };
        };
        required: string[];
    };
    execute(_toolCallId: string, params: Record<string, unknown>): Promise<{
        content: Array<{
            type: "text";
            text: string;
        }>;
        details: unknown;
    }>;
};
export {};
