//! Arguments for `mcptest fuzz`.

use clap::Args;

/// Arguments for `mcptest fuzz`: fuzz every tool a server exposes.
///
/// The server target comes from the global `--server-command` or
/// `--server-url` flags. The fuzzer reads each tool's `inputSchema` from
/// `tools/list`, derives malformed cases, and exits non-zero if any tool
/// crashes, hangs, violates the protocol, or leaks.
#[derive(Debug, Args, Default)]
pub struct FuzzArgs {
    /// Only fuzz tools whose name contains this substring.
    #[arg(long, value_name = "NAME")]
    pub tool: Option<String>,

    /// Seed for the deterministic case generator.
    #[arg(long, default_value_t = 0)]
    pub seed: u64,

    /// Maximum number of cases per tool.
    #[arg(long, default_value_t = 64)]
    pub cases: usize,

    /// Per-call timeout in milliseconds; a slower call counts as a hang.
    #[arg(long = "max-call-ms", default_value_t = 2000, value_name = "MS")]
    pub max_call_ms: u64,
}
