//! Arguments for `mcptest tool-bench`.
//!
//! The tool-bench subcommand runs the mutation-backed tool-description
//! benchmark: it scores a catalog's description quality, smells, and lexical
//! selection accuracy, then degrades descriptions and measures the selection
//! impact. It is deterministic and runs offline.

use std::path::PathBuf;

use clap::{Args, Subcommand};

/// Arguments for `mcptest tool-bench`.
#[derive(Debug, Args)]
pub struct ToolBenchArgs {
    /// Which tool-bench operation to run.
    #[command(subcommand)]
    pub command: ToolBenchCommand,
}

/// Subcommands for `mcptest tool-bench`.
#[derive(Debug, Subcommand)]
pub enum ToolBenchCommand {
    /// Score a catalog and measure how declared mutations change tool
    /// selection, with smell counts and a confidence interval.
    Run(ToolBenchRunArgs),
}

/// Arguments for `mcptest tool-bench run`.
#[derive(Debug, Args)]
pub struct ToolBenchRunArgs {
    /// Benchmark spec file (YAML or JSON): the catalog (inline or a path), the
    /// intents, and the mutations to apply. Each mutation entry is
    /// `{ tool, kind, chars?, word? }` where kind is `blank`, `genericize`,
    /// `truncate` (needs `chars`), or `drop_keyword` (needs `word`).
    #[arg(value_name = "SPEC")]
    pub spec: PathBuf,

    /// Fail (exit non-zero) when the largest selection drop across mutations is
    /// below this threshold, i.e. degrading descriptions did not measurably
    /// hurt selection. Off by default.
    #[arg(long, value_name = "FRACTION")]
    pub min_drop: Option<f64>,

    /// Emit the structured report as JSON instead of the human summary.
    #[arg(long)]
    pub json: bool,
}
