Expand description
SQL database toolkit for the Synaptic framework.
Provides a set of read-only SQL tools for use with LLM agents:
ListTablesTool— lists all tables in the databaseDescribeTableTool— returns column info for a tableExecuteQueryTool— runs a SELECT query and returns results as JSON
§Quick start
ⓘ
use sqlx::sqlite::SqlitePoolOptions;
use synaptic_sqltoolkit::SqlToolkit;
use synaptic_tools::ToolRegistry;
use std::sync::Arc;
let pool = SqlitePoolOptions::new()
.connect("sqlite::memory:")
.await?;
let toolkit = SqlToolkit::sqlite(pool);
let registry = ToolRegistry::new();
for tool in toolkit.tools() {
registry.register(tool)?;
}Structs§
- Describe
Table Tool - Tool that returns the schema of a specific table.
- Execute
Query Tool - Tool that executes a read-only SQL SELECT query.
- List
Tables Tool - Tool that lists all tables in the SQLite database.
- SqlToolkit
- A toolkit that provides SQL tools for agent use.