Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 26 additions & 11 deletions crates/dry_run_cli/src/mcp/params.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use serde::Deserialize;
#[derive(Debug, Deserialize, schemars::JsonSchema)]
pub struct ListTablesParams {
#[serde(default)]
#[schemars(description = "Schema filter (default: all schemas).")]
#[schemars(description = "Schema filter")]
pub schema: Option<String>,
#[serde(default)]
#[schemars(description = "Sort by: 'name' (default), 'rows', or 'size'.")]
Expand All @@ -20,13 +20,18 @@ pub struct ListTablesParams {
pub struct DescribeTableParams {
pub table: String,
#[serde(default)]
#[schemars(description = "Schema filter (default: all schemas).")]
#[schemars(description = "Schema filter")]
pub schema: Option<String>,
#[serde(default)]
#[schemars(
description = "Detail level: 'summary' (default, compact with profiles), 'full' (all raw stats), 'stats' (only profiles and stats)."
)]
pub detail: Option<String>,
#[serde(default)]
#[schemars(
description = "Whitelist of sections: columns, indexes, constraints, stats, partition, profiles, comment, policies, triggers, reloptions, rls. Overrides 'detail' when set."
)]
pub fields: Option<Vec<String>>,
}

#[derive(Debug, Deserialize, schemars::JsonSchema)]
Expand All @@ -45,7 +50,7 @@ pub struct SearchSchemaParams {
pub struct FindRelatedParams {
pub table: String,
#[serde(default)]
#[schemars(description = "Schema filter (default: all schemas).")]
#[schemars(description = "Schema filter")]
pub schema: Option<String>,
}

Expand Down Expand Up @@ -102,51 +107,61 @@ pub struct CheckMigrationParams {
#[derive(Debug, Deserialize, schemars::JsonSchema)]
pub struct LintSchemaParams {
#[serde(default)]
#[schemars(description = "Schema filter (default: all schemas).")]
#[schemars(description = "Schema filter")]
pub schema: Option<String>,
#[serde(default)]
#[schemars(description = "Table filter (default: all tables).")]
#[schemars(description = "Table filter")]
pub table: Option<String>,
#[serde(default)]
#[schemars(
description = "Scope: 'conventions' (lint only), 'audit' (audit only), or 'all' (default, both)."
)]
pub scope: Option<String>,
#[serde(default)]
#[schemars(
description = "Verbosity: 'summary' (default, counts and rule names only) or 'full' (findings, examples, ddl_fix)."
)]
pub verbosity: Option<String>,
#[serde(default)]
#[schemars(
description = "Whitelist of sections: conventions, audit. Overrides 'scope' when set."
)]
pub fields: Option<Vec<String>>,
}

#[derive(Debug, Deserialize, schemars::JsonSchema)]
pub struct DetectParams {
#[serde(default)]
#[schemars(
description = "Detection kind: stale_stats, unused_indexes, bloated_indexes, or all (default)."
description = "Detection kind: stale_stats, unused_indexes, bloated_indexes, anomalies, or all (default)"
)]
pub kind: Option<String>,
#[serde(default)]
#[schemars(description = "Bloat ratio threshold (default 1.5).")]
pub threshold: Option<f64>,
#[serde(default)]
#[schemars(description = "Schema filter (default: all schemas).")]
#[schemars(description = "Schema filter")]
pub schema: Option<String>,
#[serde(default)]
#[schemars(description = "Table filter (default: all tables).")]
#[schemars(description = "Table filter")]
pub table: Option<String>,
}

#[derive(Debug, Deserialize, schemars::JsonSchema)]
pub struct VacuumHealthParams {
#[serde(default)]
#[schemars(description = "Schema filter (default: all schemas).")]
#[schemars(description = "Schema filter")]
pub schema: Option<String>,
#[serde(default)]
#[schemars(description = "Table filter (default: all tables).")]
#[schemars(description = "Table filter")]
pub table: Option<String>,
}

#[derive(Debug, Deserialize, schemars::JsonSchema)]
pub struct CompareNodesParams {
pub table: String,
#[serde(default)]
#[schemars(description = "Schema filter (default: all schemas).")]
#[schemars(description = "Schema filter")]
pub schema: Option<String>,
}

Expand Down
Loading