search_columns
Find columns across every table using filters such as name, type, sensitivity, or inferred patterns. Use when the table holding a fact is unknown.
Instructions
Find columns across every table - the first call when the table holding a fact is not yet known. Filters, all optional and ANDed: a name glob, a text search over column names and their notes, and classification/sql_type/sensitivity/looks_like/redacted globs and a candidate_key match - for example every column holding an email address (looks_like: email) or contact details (sensitivity: contact). Read a table found this way with get_table_context; list tables rather than columns with list_tables. A match on a table read in part carries its scope block with rows_scanned/row_count, so a caller can tell a scanned-set number or key from a table-wide one; a match carrying a looks_like verdict carries the sampled/matched draw behind it, since a verdict from two values reads identically to one from ten thousand otherwise. A match carries sensitivity/redacted/candidate_key (and candidate_key_exception where the ratio falls short of 1.0) whenever the column does, so filtering on any of them returns the matched category, not just a bare column name. Paged: every reply carries the total matched, and next_cursor while more remain. A result carries unreadable_tables only when a table's own statistics or annotations failed to parse, on its first page: a statistics failure drops that table's columns from matches entirely; an annotations-only failure still returns them, without the annotation. A looks_like search also carries switched_off_tables on its first page, naming each table whose looks_like detection was switched off, where a non-match is not a finding.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | No | Case-insensitive substring matched against the column name, the note people wrote on it and its per-value notes - words, not meaning. A match found through per-value notes carries them as `value_notes` | |
| cursor | No | `next_cursor` from this call's previous page; omit for the first page | |
| pattern | No | fnmatch glob over column names, and over a part as `<column><path>` (`items[*].sku`); optional - omit to filter by the other predicates alone | |
| redacted | No | fnmatch glob against the column's redacted marker (drop, hash, mask) | |
| sql_type | No | fnmatch glob against the column's sql_type | |
| connection | No | Which database to read, by connection name; needed only when the server serves several, and the error for a missing one lists them. Omit it for the server's default | |
| looks_like | No | fnmatch glob against inferred.looks_like (base64, bic, card_number, content_type, country_code, currency_code, ean, email, filename, gif, gzip, hex, iban, imei, ip, isbn, iso8601_date, iso8601_datetime, iso8601_duration, jpeg, json, jwt, latlon, mac_address, numeric_string, path, pdf, phone, png, postal_code, prose, semver, timezone, url, urn, uuid, vin, zip) | |
| sensitivity | No | fnmatch glob against inferred.sensitivity (contact, credential, date_of_birth, demographic, employment, financial_account, geolocation, health, national_id, online_identifier, personal_name, postal_address) - a glob of '*' sweeps every column carrying any detection. A detection, never a verdict; its absence on a column is not an assertion that the column is safe | |
| candidate_key | No | Exact match against inferred.candidate_key | |
| classification | No | fnmatch glob against the column's classification (binary, boolean, categorical, composite, foreign_key_candidate, json, numeric, spatial, temporal, text, unsupported, vector) |