Overview
SQLite tool allows you to query and manage SQLite databases. No server required - perfect for local development and embedded applications. The user asks a data question; the agent runs SQL against the database and returns rows.Installation
Quick Start
1
Simple Usage
2
With Configuration
Use the same tool with an agent — see Usage with Agent below, or pass env vars and options from the sections above.
Usage with Agent
Available Methods
query(sql)
Execute a SQL query.execute(sql)
Execute a SQL statement (INSERT, UPDATE, DELETE, CREATE).list_tables()
List all tables in the database.Configuration Options
Function-Based Usage
In-Memory Database
Error Handling
Common Errors
How It Works
Best Practices
Inspect the schema first
Inspect the schema first
List tables and columns before querying so the agent writes valid SQL.
Use parameterised queries
Use parameterised queries
Bind values instead of string-formatting them to avoid SQL injection.
Limit result size
Limit result size
Add
LIMIT so the agent works with a focused result set.Related Tools
PostgreSQL
PostgreSQL database
MySQL
MySQL database
DuckDB
Analytics database

