Built-in Tools
Built-in Tools
PrivateGPT exposes tools in two ways:
- Model-driven tool use — pass tools in the
toolsarray of/v1/messagesand let the model decide when to call them. - Standalone tool endpoints (
/v1/tools/*) — call them directly without going through a chat.
Built-in tool dependencies are granular. Install the specific extra for the feature you need, or use private-gpt[tools] as the bundle fallback. private-gpt[core] also includes that bundle.
Tools in messages
Pass tools in /v1/messages and the model decides when to call them.
Model-driven tool use follows the same per-tool dependency rules. For the broadest support, use private-gpt[tools] or private-gpt[core].
Built-in server tools
Built-in server tools only require name and type. Do not provide inputSchema for built-in tools. Add context only for built-in tools that require it.
Minimal example:
For server-side setup of web tools, see Web Tools.
Example: semantic_search_v1
Requires context with an ingested artifact.
Example: tabular_analysis_v1
Requires private-gpt[tool-tabular], private-gpt[tools], or private-gpt[core]. Also requires context with an ingested artifact.
Example: database_query_v1
Requires private-gpt[tool-database], private-gpt[database], or a driver-specific extra such as private-gpt[database-postgres]. private-gpt[tools] and private-gpt[core] also work. Also requires context with a sql_database artifact. See Database Tools for install and configuration.
Connection strings commonly use these schemes:
- PostgreSQL:
postgresql://... - MySQL:
mysql://...,mysql+mysqldb://..., ormysql+pymysql://... - SQL Server:
mssql+pyodbc://... - DB2:
db2://...oribm_db_sa://...
Examples:
Example: web_search_v1
Requires private-gpt[tool-web-scraping], private-gpt[tools], or private-gpt[core]. No context is required.
Example: web_fetch_v1
web_extract_v1 remains accepted as a legacy alias.
Requires private-gpt[tool-web-scraping], private-gpt[tools], or private-gpt[core]. No context is required.
Skills in chat
The built-in skill tool is name: "skills" with type: "skills_v1". It expands into load_skill_v1, unload_skill_v1, and list_skills_v1.
These built-in skill tools require a skill filter in tool_context.
Example:
Direct load_skill_v1 example:
Code execution in chat
PrivateGPT exposes built-in code-execution tools in two layers:
code_execution_v1expands intobash_v1andtext_editor_v1.text_editor_v1expands intoview_v1,str_replace_v1,create_v1, andinsert_v1.
These are built-in server tools executed by PrivateGPT.
code_execution_v1 is a server tool. Anthropic code_execution_* tool types translate to this server-side flow in PrivateGPT. That is different from Anthropic bash_* and text_editor_*, which are client tools passed back to the API caller.
Anthropic reference: Code execution tool.
Example: code_execution_v1
Example: bash_v1
Example: text_editor_v1
Direct text editor subtools
Anthropic-compatible client tools
PrivateGPT also accepts Anthropic-style client tool types. These are passed through to your application with canonical schemas; PrivateGPT does not execute them locally.
Supported client tool families:
Example:
Custom tools
Define any tool with a JSON Schema. PrivateGPT passes the tool definition to the model; when the model calls it, your application receives a tool_use block and must return a tool_result:
For the broadest tool-calling support, use private-gpt[tools] or private-gpt[core].
When the model wants to call the tool, the response contains:
Send the result back by appending a message with role: "user" containing a tool_result block:
Standalone tool endpoints
Semantic search
Search ingested documents using natural language:
Available in private-gpt[core] and installs with ingestion support.
Web search
Search the web and get aggregated results:
Requires private-gpt[tool-web-scraping], private-gpt[tools], or private-gpt[core].
Web fetch
Fetch and extract text content from a URL:
Requires private-gpt[tool-web-scraping], private-gpt[tools], or private-gpt[core].
Tabular data analysis
Run a natural language query against CSV or tabular data ingested into a collection:
Requires private-gpt[tool-tabular], private-gpt[tools], or private-gpt[core].
Database query
Run a natural language query against a connected SQL database:
Requires private-gpt[tool-database], private-gpt[database], or a driver-specific extra such as private-gpt[database-postgres]. private-gpt[tools] and private-gpt[core] also work. See Database Tools for install and configuration.
The artifacts entry must contain a sql_database object with a valid SQLAlchemy-style connection string, for example:

