Skip to content

@sqlrooms/ai / getTablesForAiScope

Function: getTablesForAiScope()

getTablesForAiScope(tables, currentDatabase?, options?): DataTable[]

Filters a table catalog to the subset that should be exposed in AI context.

Parameters

ParameterTypeDescription
tablesDataTable[]Flat DuckDB table catalog.
currentDatabase?stringName of the active database, when known.
options?AiTableScopeOptionsOptional scope and exact database/schema filters.

Returns

DataTable[]

Tables matching the requested AI scope.