Skip to content

@sqlrooms/ai / formatTablesForLLM

Function: formatTablesForLLM()

formatTablesForLLM(tables, currentDatabase?): string

Formats table schema information in a clean, LLM-friendly format

Parameters

ParameterTypeDescription
tablesDataTable[]Array of DataTable objects from the DuckDB state
currentDatabase?stringThe current local database name to filter by

Returns

string

Formatted string representation of table schemas