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
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
| Error | Cause | Solution |
|---|---|---|
no such table | Table doesn’t exist | Create table first |
database is locked | Concurrent access | Close other connections |
disk I/O error | File permission issue | Check file permissions |
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

