pub struct ListTablesTool;Expand description
List all tables in the database with their names and CREATE TABLE schemas. Returns an empty list if no tables exist. Useful for discovering the database structure before writing queries.
Trait Implementations§
Source§impl Clone for ListTablesTool
impl Clone for ListTablesTool
Source§fn clone(&self) -> ListTablesTool
fn clone(&self) -> ListTablesTool
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ListTablesTool
impl Debug for ListTablesTool
Source§impl Default for ListTablesTool
impl Default for ListTablesTool
Source§fn default() -> ListTablesTool
fn default() -> ListTablesTool
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ListTablesTool
impl<'de> Deserialize<'de> for ListTablesTool
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Hash for ListTablesTool
impl Hash for ListTablesTool
Source§impl JsonSchema for ListTablesTool
impl JsonSchema for ListTablesTool
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl Ord for ListTablesTool
impl Ord for ListTablesTool
Source§fn cmp(&self, other: &ListTablesTool) -> Ordering
fn cmp(&self, other: &ListTablesTool) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for ListTablesTool
impl PartialEq for ListTablesTool
Source§impl PartialOrd for ListTablesTool
impl PartialOrd for ListTablesTool
Source§impl Serialize for ListTablesTool
impl Serialize for ListTablesTool
Source§impl SqliteServerTool for ListTablesTool
impl SqliteServerTool for ListTablesTool
Source§type Context = McpServerSqlite
type Context = McpServerSqlite
The server type passed to the handler on each invocation, typically
McpServerSqlite.Source§type Error = ToolError<ListTablesError>
type Error = ToolError<ListTablesError>
The error type returned by the handler. Must implement
IntoContents so
rmcp can render it as error content.Source§type Input = ListTablesInput
type Input = ListTablesInput
The deserialized input parameters received from the MCP client.
Source§type Output = ListTablesOutput
type Output = ListTablesOutput
The structured output returned to the MCP client on success.
Source§fn handle(
ctx: &Self::Context,
_input: Self::Input,
) -> Result<Self::Output, Self::Error>
fn handle( ctx: &Self::Context, _input: Self::Input, ) -> Result<Self::Output, Self::Error>
Executes the tool’s logic against the given context and input. Called
synchronously on the tokio blocking thread pool.
Source§fn tool() -> Tool
fn tool() -> Tool
Builds the rmcp
Tool definition for this tool, including its name,
description (extracted from the JsonSchema derive), input schema, and
output schema.Source§fn handler_func() -> fn(&<Self as SqliteServerTool>::Context, Parameters<<Self as SqliteServerTool>::Input>) -> Result<Json<<Self as SqliteServerTool>::Output>, <Self as SqliteServerTool>::Error>
fn handler_func() -> fn(&<Self as SqliteServerTool>::Context, Parameters<<Self as SqliteServerTool>::Input>) -> Result<Json<<Self as SqliteServerTool>::Output>, <Self as SqliteServerTool>::Error>
Returns a closure that deserializes the input parameters, calls
handle, and wraps the output in Json for structured MCP responses.
Every invocation is automatically traced with the tool name, duration,
and outcome. The closure is compatible with ToolRouter::with_route.impl Copy for ListTablesTool
impl Eq for ListTablesTool
impl StructuralPartialEq for ListTablesTool
Auto Trait Implementations§
impl Freeze for ListTablesTool
impl RefUnwindSafe for ListTablesTool
impl Send for ListTablesTool
impl Sync for ListTablesTool
impl Unpin for ListTablesTool
impl UnsafeUnpin for ListTablesTool
impl UnwindSafe for ListTablesTool
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more