sqlite-sql

Execute SQL statements against a SQLite database.

About

A sqlite-sql tool executes SQL statements against a SQLite database. It’s compatible with any of the following sources:

SQLite uses the ? placeholder for parameters in SQL statements. Parameters are bound in the order they are provided.

The statement field supports any valid SQLite SQL statement, including SELECT, INSERT, UPDATE, DELETE, CREATE/ALTER/DROP table statements, and other DDL statements.

Note: This tool uses parameterized queries to prevent SQL injections. Query parameters can be used as substitutes for arbitrary expressions. Parameters cannot be used as substitutes for identifiers, column names, table names, or other parts of the query.

Example

tools:
  search-users:
    kind: sqlite-sql
    source: my-sqlite-db
    description: Search users by name and age
    parameters:
      - name: name
        type: string
        description: The name to search for
      - name: min_age
        type: integer
        description: Minimum age
    statement: SELECT * FROM users WHERE name LIKE ? AND age >= ?

Reference

fieldtyperequireddescription
kindstringYesMust be “sqlite-sql”
sourcestringYesName of a SQLite source configuration
descriptionstringYesDescription of what the tool does
parametersarrayNoList of parameters for the SQL statement
statementstringYesThe SQL statement to execute
Last modified May 28, 2025: docs: add note to tools (#608) (1bf6003e)