jDataMunch MCP
v1.33.4Tabular data retrieval.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
index_local
Index a local data file (CSV, Excel, Parquet, or JSONL). Profiles all columns, detects types, computes statistics, and loads rows into SQLite for fast filtered retrieval. Set incremental=true (default) to skip re-indexing if file is unchanged. CSV, Excel, Parquet and JSONL only; any other format is rejected.
| Parameter | Type | Description |
|---|---|---|
path * | string | Absolute path to data file (.csv, .tsv, .xlsx, .xls, .parquet, .jsonl, .ndjson) |
delimiter | string | CSV delimiter override (auto-detected if omitted) |
depth | string | Profiling depth (B7). 'shallow' caps at 100k rows for fast first-look; 'standard' is the full profile (default); 'deep' additionally precomputes correlations. |
encoding | string | File encoding override (auto-detected if omitted) |
header_row | integer | Row number containing column headers, 0-indexed (default 0) |
incremental | boolean | Skip re-index if file hash unchanged (default true) |
name | string | Dataset identifier override (defaults to filename stem) |
sheet | string | Excel sheet name to index (default: first sheet) |
index_repo
Index data files from a GitHub repository. Discovers CSV, Excel, Parquet, and JSONL files, downloads them, and indexes each via the same pipeline as index_local. Datasets are named {owner}--{repo}--{filename}. Max 50 MB per file, 20 files per repo. Set GITHUB_TOKEN env var for private repos or to avoid rate limits.
| Parameter | Type | Description |
|---|---|---|
url * | string | GitHub repo URL or owner/repo string (e.g. 'pandas-dev/pandas' or 'https://github.com/pandas-dev/pandas') |
github_token | string | GitHub token override (defaults to GITHUB_TOKEN env var) |
incremental | boolean | Skip re-index if HEAD SHA unchanged (default true) |
list_datasets
List every indexed dataset with its row count, column count, and source file. Call it first to find the dataset name every other tool needs, and to confirm a file was actually indexed. Lists only datasets under the active storage_path.
list_repos
List GitHub repositories indexed via index_repo. Shows repo name, HEAD SHA, dataset count, total rows, and dataset names for each repo. Covers repos indexed with index_repo only; a dataset added by index_local is not listed here.
describe_dataset
Primary orientation tool. Default detail='compact' returns one row per column: name, type, null%, distinct count, and the min/max (numbers, dates) or most frequent values (text; every value when 10 or fewer), plus date formats and unique columns. detail='full' adds samples, top values with counts, mean, median and summaries. Statistics come from the index, not a re-read of the source. On wide tables (60+ columns), results are auto-paginated — use columns=[] to select specific ones, or columns_offset to page through remaining columns.
| Parameter | Type | Description |
|---|---|---|
dataset * | string | Dataset identifier (from list_datasets or index_local) |
columns | array | Filter to specific columns (default: all) |
columns_offset | integer | Pagination offset for wide tables (default 0) |
detail | string | compact (default): one row per column. full: the full per-column profile. |
describe_column
Deep profile of a single column. Full value distribution for low-cardinality columns, histogram bins for numeric, temporal range for datetime. Default detail='compact' gives counts, range or stats, and top values as [value, count] pairs; detail='full' adds samples, percentages and a summary. top_n capped at 200; histogram_bins capped at 50.
| Parameter | Type | Description |
|---|---|---|
column * | string | Column name or column ID (e.g. 'lapd-crime::AREA NAME#column') |
dataset * | string | Dataset identifier |
detail | string | compact (default): fewer repeated keys. full: the full profile. |
histogram_bins | integer | Bins for numeric histograms (default 10) |
redact | boolean | Scrub PII / credentials from value_distribution, top_values, and sample_values (default true). Numeric stats and counts are never altered. Set false for raw values when working with data you own. |
redact_patterns | array | Additional Python regex patterns to redact on top of the built-in set. |
top_n | integer | Top values to return (default 10 compact, 20 full) |
search_data
Search across column names and values. Returns column-level results with IDs — tells you where to look, not the data itself. Use before get_rows or describe_column. max_results capped at 50. Set semantic=true for embedding-based search (requires an embedding provider: JDATAMUNCH_EMBED_MODEL, GOOGLE_API_KEY, or OPENAI_API_KEY).
| Parameter | Type | Description |
|---|---|---|
dataset * | string | Dataset identifier |
query * | string | Natural-language or keyword query |
max_results | integer | Maximum results to return (default 10) |
search_scope | string | Limit search to schema only, values only, or all (default 'all') |
semantic | boolean | Enable semantic search via embeddings (default false). Requires embedding provider. |
semantic_only | boolean | Skip keyword scoring entirely; use only embeddings (default false). |
semantic_weight | number | Weight for semantic score in hybrid ranking. 0.0 = pure keyword, 1.0 = pure semantic (default 0.5). |
get_rows
Filtered row retrieval via structured filters. All filters are SQL-parameterized (no injection). Operators: eq, neq, gt, gte, lt, lte, contains, in, is_null, between. Use columns=[] to project — reduces tokens significantly on wide tables. Prefer aggregate() for summaries over paginating through rows. Rows come back as arrays under a 'fields' header (row_format='objects' for dicts). Returns at most limit rows (default 50); page with offset instead of raising it.
| Parameter | Type | Description |
|---|---|---|
dataset * | string | Dataset identifier |
columns | array | Column projection — reduces tokens (default: all) |
filters | array | Filter conditions (ANDed). E.g. [{"column": "AREA NAME", "op": "eq", "value": "Hollywood"}] |
limit | integer | Max rows returned (default 50, hard cap 500) |
offset | integer | Pagination offset (default 0) |
order_by | string | Column to sort by |
order_dir | string | Sort direction (default 'asc') |
redact | boolean | Scrub PII / credentials (emails, SSNs, Luhn-valid credit cards, JWTs, API keys, PEM blocks, AWS keys, GitHub/Slack tokens) from row cells before return (default true). Numeric cells are never altered.… |
redact_patterns | array | Additional Python regex patterns to layer on top of the built-in set. Invalid patterns are silently skipped (reported in _meta.redaction.invalid_custom_patterns). |
redact_skip_columns | array | Column names to exempt from redaction (e.g. an `email_hashed` column where the email pattern would false-positive). |
row_format | string | arrays (default): 'fields' once, then one array per row. objects: one dict per row. |
aggregate
Server-side aggregations (GROUP BY). Saves orders of magnitude in tokens vs returning rows for the LLM to aggregate. Functions: count, sum, avg, min, max, count_distinct, median. limit capped at 1000.
| Parameter | Type | Description |
|---|---|---|
aggregations * | array | Aggregation specs. Use column='*' for COUNT(*). |
dataset * | string | Dataset identifier |
approximate | boolean | Approximate-mode aggregation (C1). Routes count_distinct → HyperLogLog (~2% error), median → t-digest (~1% error), sum/avg → sampled estimator with 95% confidence interval. Whole-dataset only. |
filters | array | Pre-filter rows before aggregating (same syntax as get_rows) |
group_by | array | Group-by columns. Empty = whole-dataset aggregate. |
having | array | Post-aggregation filter on aggregation aliases (B11). Each item: {"column": <alias>, "op": eq|neq|gt|gte|lt|lte|in|between|is_null, "value": ...} |
limit | integer | Max groups returned (default 50) |
order_by | string | Column or alias to sort by |
order_dir | string | |
redact | boolean | Scrub PII / credentials from group-by column values (default true). Aggregate values (counts, sums, etc.) are never altered. |
redact_patterns | array | Additional Python regex patterns to layer on top of the built-in set. |
redact_skip_columns | array | Group-by column names to exempt from redaction. |
sample_rows
Return a sample of rows. Useful for understanding data shape without prior knowledge. Method: 'head', 'tail', or 'random'. Use columns=[] on wide tables to reduce response size. Pass seed (int) with method='random' for deterministic, reproducible sampling. A sample shows shape, not distribution; use get_distribution when you need the spread.
| Parameter | Type | Description |
|---|---|---|
dataset * | string | Dataset identifier |
columns | array | Column projection (default: all) |
method | string | Sampling method (default 'head') |
n | integer | Rows to sample (default 5, max 100) |
redact | boolean | Scrub PII / credentials from sampled cells before return (default true). |
redact_patterns | array | Additional Python regex patterns to layer on top of the built-in set. |
redact_skip_columns | array | Column names to exempt from redaction. |
seed | integer | Deterministic seed for method='random' (omitted = non-deterministic) |
get_schema_drift
Compare schema (columns, types, nullability) between two indexed datasets. Detects added/removed columns, type changes, and null-rate shifts. Pure in-memory comparison — no re-reading source files. Useful for detecting schema changes between dataset versions. Assessment: 'identical' | 'additive' (only additions) | 'breaking' (removals or type changes).
| Parameter | Type | Description |
|---|---|---|
dataset_a * | string | First dataset identifier (baseline) |
dataset_b * | string | Second dataset identifier (comparison target) |
get_data_hotspots
Return the highest-risk columns in a dataset ranked by a composite score combining: null rate, cardinality anomalies, numeric outlier spread, and (v1.10.0) runtime traffic from runtime_query_calls when traces exist. When include_runtime is true but no traces are ingested, the response carries an honest-hint caveat in _meta.runtime_caveat rather than silently scoring on static signals alone. top_n capped at 50.
| Parameter | Type | Description |
|---|---|---|
dataset * | string | Dataset identifier |
include_runtime | boolean | Fuse traffic signal from runtime_query_calls when available. |
top_n | integer | Number of hotspot columns to return (default 10, max 50) |
window_days | integer | Lookback window for the traffic signal. Default 30. |
get_correlations
Compute pairwise Pearson correlations between numeric columns. Returns pairs sorted by |r| descending, filtered to significant correlations. Use this to discover relationships in the data without manual exploration. top_n capped at 200.
| Parameter | Type | Description |
|---|---|---|
dataset * | string | Dataset identifier |
columns | array | Restrict to specific numeric columns (default: all numeric) |
method | string | Correlation method (default 'pearson'). Spearman is rank-based — robust to outliers and monotonic non-linear relationships (B10). |
min_abs_correlation | number | Minimum |r| to include in results (default 0.3) |
top_n | integer | Max pairs to return (default 20, max 200) |
join_datasets
Join two indexed datasets via SQL JOIN. Uses ATTACH DATABASE to combine two SQLite stores into one query. Supports inner, left, right, and cross joins. Use columns_a/columns_b to project — reduces tokens on wide tables. Row limit capped at 500. Prefer aggregate() on join results for summaries.
| Parameter | Type | Description |
|---|---|---|
dataset_a * | string | First dataset identifier (left side of join) |
dataset_b * | string | Second dataset identifier (right side of join) |
join_column_a * | string | Column from dataset_a to join on |
join_column_b * | string | Column from dataset_b to join on |
columns_a | array | Columns to select from dataset_a (default: first 30) |
columns_b | array | Columns to select from dataset_b (default: first 30) |
filters_a | array | Pre-filter dataset_a rows (same syntax as get_rows filters) |
filters_b | array | Pre-filter dataset_b rows (same syntax as get_rows filters) |
join_type | string | Join type (default 'inner') |
limit | integer | Max rows returned (default 50, hard cap 500) |
offset | integer | Pagination offset (default 0) |
order_by | string | Column to sort results by |
order_dir | string | Sort direction (default 'asc') |
summarize_dataset
Generate natural-language summaries for a dataset and all its columns. Works on already-indexed datasets — reads profiles from index.json, generates summaries, and writes them back. No re-parsing of source files. Summaries are also auto-generated during index_local.
| Parameter | Type | Description |
|---|---|---|
dataset * | string | Dataset identifier (from list_datasets) |
delete_dataset
Delete an indexed dataset and its SQLite store. Frees disk space. Irreversible — the dataset must be re-indexed to use again.
| Parameter | Type | Description |
|---|---|---|
dataset * | string | Dataset identifier to delete (from list_datasets) |
embed_dataset
Precompute column embeddings for semantic search. Optional warm-up — search_data with semantic=true lazily embeds on first use. Running embed_dataset upfront eliminates that latency. Requires an embedding provider (JDATAMUNCH_EMBED_MODEL, GOOGLE_API_KEY, or OPENAI_API_KEY).
| Parameter | Type | Description |
|---|---|---|
dataset * | string | Dataset identifier (from list_datasets) |
force | boolean | Recompute all embeddings even if cached (default false) |
get_session_stats
Return cumulative token savings and cost avoided across all tool calls. Savings are modelled estimates, not per-call measurements.
validate_index
Verify an indexed dataset's on-disk integrity. Runs SQLite PRAGMA integrity_check, cross-checks row count and column list against index.json, and verifies index.json content hash. Reports stale-lock state from interrupted index_local runs. Returns overall_status: 'ok' | 'warning' | 'error'. Checks the integrity of the index, never the correctness of the underlying data.
| Parameter | Type | Description |
|---|---|---|
dataset * | string | Dataset identifier |
get_dataset_history
Return the last N profile snapshots for a dataset. Snapshots are appended on every successful index_local — use this to detect schema/content drift over multiple ingests of the same dataset. n capped at 50.
| Parameter | Type | Description |
|---|---|---|
dataset * | string | Dataset identifier |
n | integer | Number of snapshots to return (default 10, max 50) |
get_dataset_health
Composite quality grade (A–F) for a dataset (B4). Combines null severity, type-confidence, constant-column count, primary-key presence, semantic-typing coverage, and drift history into a single score with a structured breakdown. Grades structure and completeness, not whether the values are right.
| Parameter | Type | Description |
|---|---|---|
dataset * | string | Dataset identifier |
suggest_keys
Rank primary-key candidates for a dataset (B5). Each entry carries a confidence score plus the reasons that raised it (integer column, UUID format, no nulls, exact-count unique). Candidates are ranked from profile statistics, so confirm against the source system before treating one as the key.
| Parameter | Type | Description |
|---|---|---|
dataset * | string | Dataset identifier |
suggest_joins
Discover FK candidates between this dataset and other indexed datasets (B5). For each non-PK column in the source, scans up to 20 other datasets' PK candidates and proposes joins where containment ≥ 95%. Sample-based (500 distinct values per source column).
| Parameter | Type | Description |
|---|---|---|
dataset * | string | Source dataset identifier |
get_distribution
Unified bin-counts for any column type (B8). Numeric → equal-width bins between min/max; datetime → time-bucket bins; categorical / string → top-n + 'other' bucket. Token-cheap way to ask 'what does this column look like?'. Bin counts only (default 20 bins); it never returns the underlying rows.
| Parameter | Type | Description |
|---|---|---|
column * | string | Column name |
dataset * | string | Dataset identifier |
bins | integer | Number of bins / categories to return (default 20, max 100) |
plan_query
Map a natural-language intent into a ranked tool-call sequence for the given dataset (B3). Pure routing — no LLM call. Built-in intents: summarize, anomalies, compare, join, filter, trend, correlate.
| Parameter | Type | Description |
|---|---|---|
dataset * | string | Dataset identifier |
intent | string | Natural-language intent (e.g. 'summarize', 'find anomalies', 'join with X', 'trend over time'). Default 'summarize'. |
run_sql
Read-only sandboxed SQL escape hatch (B1). Accepts a single SELECT (or WITH … SELECT) statement. The first dataset is the main connection; additional datasets are ATTACHed under schema names (e.g. `<dataset>.rows`). Statement runs under PRAGMA query_only=1 with a 10-second budget and 500-row cap. Use this for HAVING / window functions / CTEs / multi-way joins that the structured tools don't cover.
| Parameter | Type | Description |
|---|---|---|
datasets * | array | Indexed datasets to attach. Order matters: datasets[0] is the main connection. |
sql * | string | SELECT or WITH … SELECT statement |
limit | integer | Row cap (default 500, hard max 500) |
redact | boolean | Scrub PII / credentials from result cells before return (default true). |
redact_patterns | array | Additional Python regex patterns to layer on top of the built-in set. |
redact_skip_columns | array | Result column names to exempt from redaction. |
get_schema_impact
Transitive impact of a column-level schema change (drop_column, rename_column, retype_column). Walks the inferred FK graph to max_depth, surfaces direct + transitive hits across datasets, and normalises blast_score to [0, 1]. For retype_column, also flags type_mismatch entries at FK edges whose partner type wouldn't survive the retype. Read-only.
| Parameter | Type | Description |
|---|---|---|
column * | string | Column name (case-insensitive). |
dataset_id * | string | |
kind | string | |
max_depth | integer | BFS depth over the inferred FK graph. |
new_name | string | Required for rename_column. |
new_type | string | Required for retype_column. e.g. integer / string / float. |
window_days | integer | Runtime traffic look-back. |
check_column_drop_safe
Composite preflight: is this column safe to drop? Fuses four signals — primary-key status, foreign-key participation, cross-dataset name match, and runtime traffic — into a single verdict plus ranked blockers and a recommended_action. Verdict tiers: pk_blocking, fk_blocking, runtime_observed, cross_dataset_blocking, safe_to_drop. Read-only. The killer feature of the Phase-1 sibling-parity batch.
| Parameter | Type | Description |
|---|---|---|
column * | string | Column name (case-insensitive). |
dataset_id * | string | |
window_days | integer | Look-back window for runtime traffic. Default 30. |
find_unused_columns
Surface columns with zero or stale runtime traffic. Reads runtime_query_calls (populated by ingest_sql_log) and surfaces columns that haven't been queried within `window_days`. Excludes primary-key candidates and audit fields (created_at / updated_at / dbt_*) by default. Refuses to run with explicit error when no runtime data has been ingested — would otherwise trivially flag every column.
| Parameter | Type | Description |
|---|---|---|
dataset_id * | string | |
exclude_audit | boolean | Skip audit columns (created_at, updated_at, dbt_*, etc). Default true. |
exclude_pk | boolean | Skip primary-key candidates. Default true. |
min_calls | integer | Floor for 'considered used' within window. Default 0. |
window_days | integer | Look-back window. Default 30. |
ingest_sql_log
Ingest a SQL log file (pg_stat_statements CSV or generic JSONL, .gz transparently) into the per-dataset runtime tables. Each query is parsed for table + column refs, redacted at the chokepoint (string + numeric literals + cell-PII registry), and rolled up into runtime_query_calls keyed by (fingerprint, table, column). Tables in the log that don't match any indexed dataset count as unmapped. Foundational primitive for find_unused_columns, check_column_drop_safe, and data_health_radar (v1.6.0 sibling-parity Phase 1).
| Parameter | Type | Description |
|---|---|---|
file_path * | string | Path to a CSV / JSONL / .gz log file. |
max_rows | integer | Hard cap on ingested rows. Default 100000. |
redact | boolean | Scrub PII / literals before persisting. Default true. |
source | string | pg_stat_statements | jsonl | auto (default — sniff by extension). |
find_similar_columns
Multi-signal cross-dataset column consolidation. Fuses name (token Jaccard), type, top-value overlap, cardinality similarity, and (when present) embedding cosine into a composite score. Clusters via union-find and classifies each cluster: near_duplicate, naming_drift, parallel_definition, or overlapping_topic. Use to find duplicate columns across datasets, surface naming drift (`email` vs `email_address`), or detect the same conceptual column spread across multiple datasets. Mirrors jcm's find_similar_symbols. Every signal is heuristic, so a high score means investigate, not merge.
| Parameter | Type | Description |
|---|---|---|
datasets | array | Datasets to scan. Omit to scan every indexed dataset. |
min_score | number | Composite-score floor for surfacing pairs. |
same_type_only | boolean | Drop pairs where types don't match. |
top_n | integer | Max clusters returned. Default 50, capped at 200. |
data_health_radar
Six-axis health radar for a dataset: null_health, type_confidence, cardinality_health, pk_presence, semantic_coverage, schema_stability (omitted when <2 history snapshots). Optional 7th axis runtime_coverage when traces ingested. Returns 0-100 score per axis + composite + A-F grade. Pairs with diff_data_health_radar for snapshot deltas. Mirrors jcm's six-axis health radar.
| Parameter | Type | Description |
|---|---|---|
dataset * | string | |
include_runtime | boolean | Fuse runtime_coverage axis when traces exist. |
window_days | integer | Lookback for the runtime axis. Default 30. |
diff_data_health_radar
Diff two data_health_radar payloads. Pure function — pass the `radar` sub-field from two data_health_radar responses (e.g. yesterday vs today). Returns per-axis deltas, composite delta, grade change, regression and improvement lists (threshold: 3 points), one-line verdict.
| Parameter | Type | Description |
|---|---|---|
baseline * | object | Baseline radar payload (e.g. yesterday's snapshot). |
current * | object | Current radar payload (e.g. today's snapshot). |
get_redaction_log
Forensic accounting of PII redactions for a dataset. Returns per-pattern counts from runtime_redaction_log (populated by ingest_sql_log with redact=True), so operators can verify the chokepoint is firing on production traffic. Filter by source and lookback window. Empty result with no traces ingested is not an error — it just means no scrubbing has happened yet.
| Parameter | Type | Description |
|---|---|---|
dataset_id * | string | |
since_days | integer | Lookback window for last_seen. Default 30. |
source | string | Optional source filter. Today: 'sql_log'. |
tune_weights
Inspect, set, or reset the weight vector search_data uses to rank columns (name/value/type match weights plus the BM25 and semantic blend scales). Omit all args to inspect the effective weights and their source. Pass set_weights (a {weight: number} object) to override, or reset=true to clear. Scope with dataset (per-dataset overrides win over the global default, which wins over built-ins). Honored by search_data at query time. Unlike jcodemunch/jdocmunch, weights are tuned explicitly here (no ranking ledger). Tunable: name_exact, name_substr, name_word, ai_summary_word, value_exact, value_subs…
| Parameter | Type | Description |
|---|---|---|
dataset | string | Tune one dataset. Omit for the global default. |
reset | boolean | Clear this scope overrides. |
set_weights | object | Weight overrides, e.g. name_exact=30. Unknown names or non-numeric values are rejected; values are clamped to each weight bounds. |
check_embedding_drift
Detect whether the embedding provider has drifted since it was pinned. Column embeddings power semantic search_data and find_similar_columns; if the provider model changes underneath a stored index, saved vectors stop matching the live encoder and semantic ranking quietly degrades. Pins a 16-string canary in <index_path>/embed_canary.json and recomputes it on demand, reporting cosine drift. Call with force=true once to set the baseline, then again after a suspected provider change. Sibling of jcodemunch / jdocmunch check_embedding_drift.
| Parameter | Type | Description |
|---|---|---|
force | boolean | Re-embed and re-pin the canary baseline (set once to establish it). |
threshold | number | Cosine-distance alarm threshold; alarm is true when the worst canary drifts past it. |
analyze_perf
Per-tool latency and cache-hit telemetry. Returns p50/p95/max latency and error rate per tool, the slowest tools by p95, and result-cache hit rates (aggregate / get_correlations / get_data_hotspots are the cached tools). window=session reads the always-on in-memory ring; window=1h/24h/7d/all reads the persistent SQLite sink (requires JDATAMUNCH_PERF_TELEMETRY=1). Sibling of jcodemunch / jdocmunch analyze_perf.
| Parameter | Type | Description |
|---|---|---|
tool | string | Restrict the analysis to a single tool name. |
top | integer | Max slowest-tools / coldest-caches returned. |
window | string | session = in-memory ring; others read the persistent perf db. |
finalize_handoff
Finalize one canonical Markdown handoff for a completed data audit/analysis (jdatamunch.handoff/v1; suite parity with jCodeMunch). The server assembles YOUR sections deterministically, validates every evidence_refs entry against what this session actually retrieved (column ids like '<dataset>::<column>#column' or dataset names served by search_data / describe_dataset / describe_column — unknown refs fail closed), persists the result session-scoped, and returns a compact receipt {handoff_id, resource_uri, sha256, length, canonical:true}. Read the immutable body via the munch://handoff/<id> re…
| Parameter | Type | Description |
|---|---|---|
dataset * | string | Dataset the handoff is about. |
evidence_refs * | array | Column ids or dataset names retrieved this session; validated against the session retrieval record. |
sections * | array | Ordered report sections, each {heading, content} (markdown). The caller authors these; the server only assembles. Optional per-section claims[] bind evidence to an individual claim instead of one glob… |
task * | string | The task/question this handoff answers (becomes the title). |
appendices | array | Optional named appendices, each {name, content, content_type?}; names must be unique. |
profile | string | Handoff profile label (e.g. data_audit). |
jdatamunch_guide
Return the version-current CLAUDE.md / AGENT.md policy snippet for jdatamunch-mcp. Lets an agent keep a one-line CLAUDE.md (e.g. "Call jdatamunch_guide and strictly follow its instructions.") instead of pasting a static snippet that drifts from the installed version. Idempotent, no dataset context required. Sibling of jcodemunch_guide and jdocmunch_guide.