database_mcp_sqlite/types.rs
1//! SQLite-specific MCP tool request types.
2//!
3//! Unlike `MySQL` and `PostgreSQL`, `SQLite` operates on a single file and
4//! has no database selection. These types omit the `database_name`
5//! field present in the shared server types.
6
7use rmcp::schemars;
8use rmcp::schemars::JsonSchema;
9use serde::Deserialize;
10
11/// Request for the `get_table_schema` tool.
12#[derive(Debug, Default, Deserialize, JsonSchema)]
13pub struct GetTableSchemaRequest {
14 /// The table name to inspect. Use `list_tables` first to see available tables.
15 pub table_name: String,
16}
17
18/// Request for the `drop_table` tool.
19#[derive(Debug, Default, Deserialize, JsonSchema)]
20pub struct DropTableRequest {
21 /// Name of the table to drop. Must contain only alphanumeric characters and underscores.
22 pub table_name: String,
23}
24
25/// Request for the `read_query` and `write_query` tools.
26#[derive(Debug, Default, Deserialize, JsonSchema)]
27pub struct QueryRequest {
28 /// The SQL query to execute.
29 pub query: String,
30}
31
32/// Request for the `explain_query` tool.
33#[derive(Debug, Default, Deserialize, JsonSchema)]
34pub struct ExplainQueryRequest {
35 /// The SQL query to explain.
36 pub query: String,
37}