datalint

v0.2.0
io.github.asma-hachaichi/datalint-mcp Checked 1 day ago Published 4 days ago

Audit CSV, Excel, Parquet and SQLite data: missing values, duplicates, outliers, PII.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

load_dataset

Load a file so the other tools can audit it. A SQLite database loads every table and an Excel workbook every sheet, each as its own dataset named after the table or sheet. A database also brings the foreign keys it declares. Only truly empty cells count as missing. Placeholder text such as "N/A" or "null" is kept as written, so check_missing can report it. Excel and Parquet keep real dates and numbers. Loading under an existing name replaces it. Databases are opened read-only. Files outside the folders the user allowed are refused.

ParameterTypeDescription
path *stringPath to a .csv, .tsv, Excel (.xlsx, .xlsm), Parquet (.parquet, .pq) or SQLite (.db, .sqlite, .sqlite3) file, absolute or relative to the first allowed folder.
nameName to use in the other tools. Defaults to the file name, or the table or sheet name. Only allowed when loading a single table or sheet.
tableSQLite and Excel only: load just this table or sheet. Omit to load all of them.

list_datasets

List the datasets loaded in this session, with their size.

profile_dataset

Overview of a dataset: size, missing cells, duplicate rows, and one summary per column. Each column gets a type judged from its values: numeric, numeric_as_text (mostly numbers with some text mixed in, usually a data-entry problem), datetime, categorical, text, unique_text, identifier, boolean, constant or empty. disguised_missing counts placeholder text such as "N/A", "-" or blank spaces.

ParameterTypeDescription
dataset *stringA dataset name returned by load_dataset.
limitintegerColumns per page.
offsetintegerIndex of the first item to return, for paging.

describe_column

A close look at one column. Numbers get min, quartiles, max, mean, zeros and negatives. Text gets lengths, values with stray spaces, and values that only differ by case or spacing. Dates get the earliest and latest. For numeric_as_text columns, lists the values that are not numbers. Common values are listed unless every value is unique.

ParameterTypeDescription
column *stringExact column name, as profile_dataset lists it.
dataset *stringA dataset name returned by load_dataset.
topintegerHow many common values to list.

check_missing

Where values are missing, worst column first. Counts both empty cells and disguised ones (placeholder text such as "N/A", "null", "-" or blank spaces), and says which placeholders each column uses. Also counts rows with any missing value, fully empty rows, and columns with no values at all.

ParameterTypeDescription
dataset *stringA dataset name returned by load_dataset.
limitintegerColumns per page.
offsetintegerIndex of the first item to return, for paging.

find_duplicates

Find duplicate rows, either whole rows or on chosen key columns. Returns how many extra copies exist, the largest groups as row numbers, and how many more rows match once case and spacing are ignored. Values are never shown.

ParameterTypeDescription
dataset *stringA dataset name returned by load_dataset.
columnsCompare only these columns, such as a key like ['email']. Omit to compare whole rows.
limitintegerDuplicate groups to list.

find_outliers

Find numbers far outside a column's usual range. Without column: every numeric column with its outlier count and usual range, most outliers first. With column: also its most extreme rows as row numbers with values (values hidden if the column looks like personal data).

ParameterTypeDescription
dataset *stringA dataset name returned by load_dataset.
columnOne numeric column to examine closely. Omit to summarise every numeric column.
limitintegerColumns per page, or with column, how many of the most extreme rows to list.
methodstringiqr (default): beyond 1.5 interquartile ranges from the middle half, robust to skew. zscore: more than 3 standard deviations from the mean, for bell-shaped data.
offsetintegerIndex of the first item to return, for paging.

check_keys

Check whether a column (or set of columns) works as a unique key: no missing values and no repeats. Reports how many rows break it, with example row numbers.

ParameterTypeDescription
dataset *stringA dataset name returned by load_dataset.
columnsCheck whether these columns together uniquely identify every row, such as ['id'] or ['order_id', 'line']. Omit to list candidate keys and check every id-like column.

check_references

Find orphans: values that point at rows missing from the referenced dataset, such as orders whose customer does not exist. Without column and references, checks every foreign key the database declares, plus links guessed from column names across loaded datasets (orders.customer_id -> customers.id).

ParameterTypeDescription
dataset *stringA dataset name returned by load_dataset.
columnColumn in this dataset that points at another dataset, such as 'customer_id'.
limitintegerOrphan row numbers to list.
referencesWhat it points at, as 'dataset.column', such as 'customers.id'. Pass with column.

detect_pii

Find columns that look like personal data: emails, phone numbers, card numbers, IBANs, IP addresses, US social security numbers, and names, addresses, birth dates or ID numbers suggested by the column name. Reports which kinds, how many values match, and whether the evidence is the values or only the column name. Never returns the values themselves.

ParameterTypeDescription
dataset *stringA dataset name returned by load_dataset.
columnsColumns to scan. Omit to scan every column.
limitintegerColumns per page.
offsetintegerIndex of the first item to return, for paging.