For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Contact usJoin the Discord
ManualAPI GuideAPI Reference
  • Getting started
    • Introduction
    • Quickstart
    • How it works
  • Installation Options
    • Package Install
    • Docker
    • Development
  • Configuration
    • CLI
    • Settings & Profiles
    • Model Configuration
  • Inference Providers
    • Overview
    • Ollama
    • LM Studio
    • LlamaCPP Server
    • vLLM
  • Integrations
    • Overview
    • Claude Code
    • Claude Desktop
    • Claude for Microsoft 365
    • OpenCode
  • Built-in Tools
    • Web Tools
    • Database Tools
  • Storage Providers
    • Vector Store
    • Object Storage
  • User Interface
    • Workbench
  • Observability
    • Observability
  • Reference
    • Troubleshooting
LogoLogo
Contact usJoin the Discord
On this page
  • Supported database tools
  • How to install
  • Settings reference
  • Settings
  • Runtime requirement
Built-in Tools

Database Tools

Was this page helpful?
Previous

Vector Store

Next
Built with

This page covers installation and server-side configuration for built-in database tools.

Use this together with:

  • Tools for request examples and runtime usage

Supported database tools

Built-in database tools include:

  • database_query_v1
  • /v1/tools/database-query

How to install

Choose the smallest extra that matches your database:

DatabaseExtraInstalls
PostgreSQLprivate-gpt[database-postgres]psycopg2-binary, asyncpg
MySQLprivate-gpt[database-mysql]pymysql
SQL Serverprivate-gpt[database-mssql]pyodbc
DB2private-gpt[database-db2]ibm-db, ibm-db-sa
All database driversprivate-gpt[database]all of the above
Database tool bundleprivate-gpt[tool-database]private-gpt[database]

If you only want the database tool itself, tool-database is the simplest entry point. If you want a narrower install, use the driver-specific extra directly.

The database-db2 extra is only published for non-aarch64 platforms in the current package metadata.

Examples:

$uv sync --extra database-postgres
$uv sync --extra database-mysql
$uv sync --extra database-mssql
$uv sync --extra database-db2
$uv sync --extra tool-database

database_query_v1 will also work when you install broader bundles that include database support, such as private-gpt[database], private-gpt[tool-database], private-gpt[tools], or private-gpt[core].


Settings reference

Database query does not have a global enabled flag in settings.yaml. Instead, the server uses runtime limits from database_query, and each request provides the target database through a sql_database artifact.

1database_query:
2 timeout_seconds: 1000
3 batch_size: 1000
4 max_mb_result: 150

Settings

SettingDescription
database_query.timeout_secondsMaximum time allowed for a database query.
database_query.batch_sizeNumber of rows processed per batch.
database_query.max_mb_resultMaximum response size in MB before truncation or failure.

Runtime requirement

The database connection is not configured globally in settings.yaml. Pass it in the request as a sql_database artifact.

See Tools for Messages API and standalone tool endpoint examples.