You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# include_tables: # Only include matching tables in schema detection
69
+
# - "customers*"
70
+
# - "orders*"
71
+
# exclude_tables: # Exclude matching tables from schema detection
72
+
# - "bkp_*"
73
+
# - "*_temp"
74
+
67
75
# --- Connection Pool (optional tuning) ---
68
76
# pool_size: 10
69
77
# max_overflow: 10
@@ -105,6 +113,18 @@ tools:
105
113
-`max_enum_cardinality`: (Optional, default: `100`) Maximum number of distinct values to consider a column as an enum. Increase for columns like countries (190+), decrease for faster init times.
106
114
-`schema_sample_size`: (Optional, default: `100`) Number of rows to sample per table for schema detection. Increase for better accuracy on sparse data, decrease for faster init times.
107
115
-`cache_ttl_seconds`: (Optional, default: `3600`) Time-to-live for schema cache in seconds. After this duration, the schema will be re-detected on the next query. Set to `0` to disable caching.
116
+
-`include_tables`: (Optional) A list of glob patterns for tables to include in schema detection. If set, only tables matching at least one pattern are included. Supports wildcards: `*`, `?`, `[seq]`. Example: `["tms_trx*", "tms_alert*"]`.
117
+
-`exclude_tables`: (Optional) A list of glob patterns for tables to exclude from schema detection. Applied after `include_tables`. Supports the same wildcard syntax. Example: `["bkp_*", "*_temp", "*_dev"]`. Both options can be used together and matching is case-sensitive.
118
+
119
+
**Important: Table filtering is not access control.** These options only control which tables appear in the schema provided to the LLM. They do not prevent the LLM from executing queries against other tables in the database — for example, by querying database metadata or being prompted to access tables outside the filter. The underlying database connection still has full access to all tables the database user can see.
120
+
121
+
To reduce the likelihood of the LLM querying unfiltered tables, add an instruction to your agent such as:
122
+
```
123
+
Only query tables that appear in your tool's schema description.
124
+
Do not query database metadata tables or any tables not listed in your schema.
125
+
```
126
+
127
+
**For actual access control, configure the database user in the connection string with `SELECT` permissions restricted to only the allowed tables.** This is the only way to guarantee that the LLM cannot access tables outside the intended scope.
0 commit comments