database_mcp_postgres/types.rs
1//! PostgreSQL-specific MCP tool request types.
2//!
3//! These types include PostgreSQL-only parameters like `cascade`
4//! that are not available on other backends.
5
6use rmcp::schemars;
7use rmcp::schemars::JsonSchema;
8use serde::Deserialize;
9
10/// Request for the `dropTable` tool.
11#[derive(Debug, Default, Deserialize, JsonSchema)]
12#[serde(rename_all = "camelCase")]
13pub struct DropTableRequest {
14 /// The database containing the table. Required. Use `listDatabases` first to see available databases.
15 pub database: String,
16 /// Name of the table to drop. Must contain only alphanumeric characters and underscores.
17 pub table: String,
18 /// If true, use CASCADE to also drop dependent foreign key constraints. Defaults to false.
19 #[serde(default)]
20 pub cascade: bool,
21}