pub struct PostgresServer {
pub tool_router: ToolRouter<Self>,
/* private fields */
}Expand description
PostgreSQL MCP Server
Provides MCP tools for interacting with a PostgreSQL database.
Fields§
§tool_router: ToolRouter<Self>Implementations§
Source§impl PostgresServer
impl PostgresServer
Sourcepub fn query_data_tool_attr() -> Tool
pub fn query_data_tool_attr() -> Tool
Generated tool metadata function for query_data
Sourcepub fn query_data(
&self,
Parameters: Parameters<QueryParams>,
) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
pub fn query_data( &self, Parameters: Parameters<QueryParams>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Execute a SELECT query on the database
Sourcepub fn get_schema_tool_attr() -> Tool
pub fn get_schema_tool_attr() -> Tool
Generated tool metadata function for get_schema
Sourcepub fn get_schema(
&self,
Parameters: Parameters<SchemaParams>,
) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
pub fn get_schema( &self, Parameters: Parameters<SchemaParams>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Get schema information for database tables
Sourcepub fn insert_data_tool_attr() -> Tool
pub fn insert_data_tool_attr() -> Tool
Generated tool metadata function for insert_data
Sourcepub fn insert_data(
&self,
Parameters: Parameters<InsertParams>,
) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
pub fn insert_data( &self, Parameters: Parameters<InsertParams>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Insert data into a table
Sourcepub fn list_tables_tool_attr() -> Tool
pub fn list_tables_tool_attr() -> Tool
Generated tool metadata function for list_tables
Sourcepub fn list_tables(
&self,
) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
pub fn list_tables( &self, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
List all tables in the database
Sourcepub fn describe_table_tool_attr() -> Tool
pub fn describe_table_tool_attr() -> Tool
Generated tool metadata function for describe_table
Sourcepub fn describe_table(
&self,
Parameters: Parameters<TableNameParams>,
) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
pub fn describe_table( &self, Parameters: Parameters<TableNameParams>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Get detailed information about a table
Sourcepub fn count_rows_tool_attr() -> Tool
pub fn count_rows_tool_attr() -> Tool
Generated tool metadata function for count_rows
Sourcepub fn count_rows(
&self,
Parameters: Parameters<CountRowsParams>,
) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
pub fn count_rows( &self, Parameters: Parameters<CountRowsParams>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Count rows in a table
Sourcepub fn table_exists_tool_attr() -> Tool
pub fn table_exists_tool_attr() -> Tool
Generated tool metadata function for table_exists
Sourcepub fn table_exists(
&self,
Parameters: Parameters<TableNameParams>,
) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
pub fn table_exists( &self, Parameters: Parameters<TableNameParams>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Check if a table exists
Sourcepub fn column_exists_tool_attr() -> Tool
pub fn column_exists_tool_attr() -> Tool
Generated tool metadata function for column_exists
Sourcepub fn column_exists(
&self,
Parameters: Parameters<ColumnExistsParams>,
) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
pub fn column_exists( &self, Parameters: Parameters<ColumnExistsParams>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Check if a column exists in a table
Sourcepub fn get_table_sample_tool_attr() -> Tool
pub fn get_table_sample_tool_attr() -> Tool
Generated tool metadata function for get_table_sample
Sourcepub fn get_table_sample(
&self,
Parameters: Parameters<TableSampleParams>,
) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
pub fn get_table_sample( &self, Parameters: Parameters<TableSampleParams>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Get a sample of rows from a table
Sourcepub fn update_data_tool_attr() -> Tool
pub fn update_data_tool_attr() -> Tool
Generated tool metadata function for update_data
Sourcepub fn update_data(
&self,
Parameters: Parameters<UpdateDataParams>,
) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
pub fn update_data( &self, Parameters: Parameters<UpdateDataParams>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Update rows in a table
Sourcepub fn delete_data_tool_attr() -> Tool
pub fn delete_data_tool_attr() -> Tool
Generated tool metadata function for delete_data
Sourcepub fn delete_data(
&self,
Parameters: Parameters<DeleteDataParams>,
) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
pub fn delete_data( &self, Parameters: Parameters<DeleteDataParams>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Delete rows from a table
Sourcepub fn execute_raw_query_tool_attr() -> Tool
pub fn execute_raw_query_tool_attr() -> Tool
Generated tool metadata function for execute_raw_query
Sourcepub fn execute_raw_query(
&self,
Parameters: Parameters<ExecuteRawQueryParams>,
) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
pub fn execute_raw_query( &self, Parameters: Parameters<ExecuteRawQueryParams>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Execute a raw SQL query
Sourcepub fn get_relationships_tool_attr() -> Tool
pub fn get_relationships_tool_attr() -> Tool
Generated tool metadata function for get_relationships
Sourcepub fn get_relationships(
&self,
Parameters: Parameters<RelationshipsParams>,
) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
pub fn get_relationships( &self, Parameters: Parameters<RelationshipsParams>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Get foreign key relationships for tables
Sourcepub fn get_connection_status_tool_attr() -> Tool
pub fn get_connection_status_tool_attr() -> Tool
Generated tool metadata function for get_connection_status
Sourcepub fn get_connection_status(
&self,
) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
pub fn get_connection_status( &self, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + '_>>
Get database connection status