Native tools v7

AIDB ships with a large built-in catalog of native tools — mostly thin wrappers around existing AIDB functionality, so an agent can operate on pipelines, knowledge bases, models, and volumes the same way you would from SQL directly. This is one of three tool types AIDB supports — see Tools for the full catalog, including custom SQL tools and MCP tools. sleep is always available to every agent regardless of its configured tools list — unless the backing model caps how many tools a request can carry and the agent's other configured tools already fill that cap — since it backs the reasoning loop's own ability to pause and resume. Every other native tool must be explicitly listed in tools to be usable.

A tool's exact parameters are always visible with SELECT params FROM aidb.tools WHERE name = '<name>'; the tables below give the one-line description and read-only status for each.

Ad hoc SQL

ToolRead-onlyDescription
run_sql_queryYesRun a read-only SQL query against the database and return its rows as JSON.

Catalog discovery

Introspection of the database catalog: these tools let an agent discover what schemas, tables, views, and functions exist, without having to construct information_schema/pg_catalog queries itself.

They're related to the semantic knowledge base tools below, but the two are complementary rather than interchangeable:

  • Catalog discovery tools do live, exact lookups against the Postgres catalog. They need no setup, always reflect the current state of the database, and match by exact name or SQL LIKE pattern.
  • Semantic knowledge base tools run semantic (vector) search over a crawled snapshot of the schema. They require a pre-built, opt-in knowledge base (and a re-crawl to pick up structural changes), but can answer natural-language questions like "which table holds customer contact info?" that exact catalog lookups can't.

A typical agent uses both: semantic search to find the right table from a vague description, then catalog discovery to get its exact, current columns and foreign keys.

All four tools are privilege-aware — they only return objects the calling user can actually see. Listings hide Postgres and AIDB internal schemas as well as installed extensions' schemas and objects by default (catalog_get_object_details deliberately doesn't hide extension objects: explicitly naming one is asking for it). Listings are capped at 200 rows; every row carries a truncated flag that's true when more rows exist, signaling the caller to narrow the search with schema or name_pattern. Optional text parameters treat an empty string the same as an omitted argument.

ToolRead-onlyDescription
catalog_list_schemasYesList schemas in the current database. Hides Postgres/AIDB internal schemas and installed extensions' schemas unless include_system is set.
catalog_list_objectsYesList tables, views, materialized views, foreign tables, and/or functions. Narrow with schema, object_type, and/or name_pattern.
catalog_get_object_detailsYesGet full detail on one object by name: columns, primary/unique/foreign keys for relations; arguments and return type for functions.
catalog_list_relationsYesList foreign-key relationships — every FK in a schema, or only edges touching one specific table, in either direction.

Semantic knowledge bases

Schema-search knowledge bases to allow semantic search based discovery of tables, columns, and other DB objects. Distinct from the knowledge bases for user data that pipelines can create.

ToolRead-onlyDescription
create_semantic_kbNoCreate a semantic knowledge base over one or more schemas for natural-language schema search.
delete_semantic_kbNoDelete a semantic knowledge base by name.
list_semantic_kbsYesList all registered semantic knowledge bases.
get_semantic_kbYesGet a registered semantic knowledge base's configuration by name.
refresh_semantic_kbNoRe-crawl a semantic knowledge base's schemas to pick up structural changes.
update_semantic_kb_auto_processingNoChange a semantic knowledge base's auto-processing mode.
get_column_definitionsYesSearch a semantic knowledge base for matching column/table definitions.
get_metadataYesSearch a semantic knowledge base's full schema metadata (columns, tables, comments).
get_entity_definitionsYesSearch a semantic knowledge base for matching table/view definitions.
semantic_kb_searchYesRun a composite semantic search over a knowledge base, returning one ranked list of matching tables, views, columns, and aliases with a source-type discriminator.
search_by_commentYesSearch a semantic knowledge base's schema/table/column comments by similarity.
semantic_kb_statsYesGet row/entity counts for a semantic knowledge base.

Models

See Integrating models.

ToolRead-onlyDescription
list_modelsYesList all registered models.
get_modelYesGet a registered model's configuration by name.
create_modelNoRegister a new model with a provider and configuration.
delete_modelNoDelete a registered model by name.
sync_hcp_modelsNoSync models available from the configured Hybrid Manager (HM) into the model registry.
list_hcp_modelsYesList models already synced from HM.
get_hcp_modelsYesList models available from HM, synced or not.
create_hcp_modelNoRegister a model from HM under a local name.

Volumes

See External storage.

ToolRead-onlyDescription
list_volumesYesList all registered volumes.
create_volumeNoRegister a new volume backed by an object store.
delete_volumeNoDelete a volume by name.
list_volume_contentYesList the files stored in a volume.
read_volume_fileYesRead a file's contents from a volume.
write_volume_dataNoWrite data to a file in a volume.
delete_volume_fileNoDelete a file from a volume.

Embedding and document processing

See SQL functions.

ToolRead-onlyDescription
encode_textYesCompute a text embedding vector for document/search-index storage.
encode_text_queryYesCompute a text embedding vector tuned for querying (vs. indexing).
encode_imageYesCompute an image embedding vector.
generate_textYesGenerate text from a language model.
get_model_descriptionYesGet a human-readable description of a model.
list_model_providersYesList the foreign-server-backed model providers available for registering models against.
rerank_textYesRerank a list of candidate texts against a query using a reranker model.
get_adapter_embedding_dimensionsYesGet a model's output embedding dimensionality for text or image input.
chunk_textYesSplit text into chunks suitable for embedding.
parse_htmlYesParse HTML into plaintext or markdown.
parse_pdfYesExtract text from a PDF, one row per page.
pdf_to_imageYesRender a PDF's pages to images, one row per page.
perform_ocrYesRun OCR over an image or scanned document.
summarize_textYesSummarize text using a language model.

Agent management

See Managing agents. Letting an agent create or reconfigure other agents (including itself) is a powerful, self-modifying capability — grant these tools deliberately.

ToolRead-onlyDescription
list_agentsYesList all registered agents.
create_agentNoCreate a new agent. Returns a single row with an error column (NULL on success).
update_agentNoUpdate an existing agent's configuration. Only fields explicitly passed are changed.
delete_agentNoDelete an agent by name. Returns a single row with an error column (NULL on success).
sleepYesPause reasoning for a number of seconds, then automatically resume. Always available to every agent, regardless of its configured tool list, unless the model's own tool-count cap is already filled by the agent's other configured tools.

Pipelines

See AI pipelines.

ToolRead-onlyDescription
search_pipelinesYesList all registered data pipelines.
get_pipelineYesGet a registered data pipeline's configuration by name.
delete_pipelineNoDelete a registered data pipeline by name.
run_pipelineNoManually run a pipeline once, processing any pending source rows.
get_pipeline_metricsYesGet a pipeline's processing status and row counts.
get_error_logsYesList a pipeline's record-level processing errors, optionally filtered.
clear_error_logsNoDelete specific pipeline error log entries by id.
requeue_pipeline_errorsNoMark specific pipeline errors' source rows dirty so the next run retries them.
get_error_log_summaryYesGet error counts for a pipeline, grouped by step, operation, and category.
get_all_error_summariesYesGet error counts across every pipeline, grouped by step, operation, and category.
Note

Pipeline authoring (aidb.create_pipeline/aidb.update_pipeline) has no native tool. Those functions take up to 30 parameters across step/step-options pairs — impractical for a single generic tool call — so multi-step pipeline authoring isn't currently something an agent can do on its own.