Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/davide-desio-eleva/kirograph/llms.txt

Use this file to discover all available pages before exploring further.

KiroGraph-Data indexes tabular data files that live alongside your code — test fixtures, seed datasets, configuration tables, sample exports — and lets AI agents query them without ever reading the raw files. Filters, aggregations, and joins run server-side in SQLite. Only the result rows enter the context window, producing 95–99% token savings over naive full-file reads. The module is inspired by jDataMunch-MCP by J. Gravelle.

Enabling Data

Add enableData to .kirograph/config.json:
{
  "enableData": true
}
On the next kirograph index or kirograph sync, KiroGraph scans for data files matching dataInclude patterns, streams them through the appropriate parser, profiles every column, and stores rows in per-dataset SQLite tables.

Supported Formats

FormatExtensionsExtra dependency
CSV / TSV.csv, .tsvnone (built-in)
JSONL / NDJSON.jsonl, .ndjsonnone (built-in)
JSON array.json (in data/)none (built-in)
Excel.xlsx, .xlsxlsx npm package
Parquet.parquetparquetjs-lite npm package
PDF.pdf@firecrawl/pdf-inspector (prebuilt Rust binary)
The streaming parser never loads full files into memory — CSV and JSONL are processed line-by-line, Excel and Parquet in chunks. The 50 MB default file size limit (dataMaxFileSize) is the practical ceiling before indexing time becomes noticeable.

PDF Support

PDF indexing uses @firecrawl/pdf-inspector, a pure Rust binary with no OCR dependency and no network calls. Each page becomes a row with four columns: content (markdown-rendered text), needs_ocr (boolean), has_tables (boolean), and has_columns (boolean). Scanned pages are flagged rather than skipped. Prebuilt binaries are available for linux-x64 and macOS ARM64.
The default file size limit is 50 MB (dataMaxFileSize: 52428800). Increase it in config if your datasets are larger. The dataMaxRows cap (default: 1,000,000) applies separately and prevents extremely wide datasets from overwhelming the row store.

How Indexing Works

1

File scanning

KiroGraph walks the project tree matching files against dataInclude and dataExclude globs. Only files with a known parser are indexed.
2

Incremental check

A SHA-256 hash of each file is compared against the stored hash. Unchanged files are skipped entirely.
3

Parsing and profiling

The parser streams rows through ColumnProfiler, which tracks type inference, cardinality, null percentages, min/max, mean, and sample values per column.
4

Storage

A dynamic per-dataset row table is created in kirograph.db (e.g. data_rows_tests_fixtures_users). Column profiles go into data_columns. A history snapshot is saved to data_dataset_history for drift detection.
5

Code linking

When dataLinkCode: true, DataCodeLinker scans dataset file paths for matches against code symbol names and stores path-based references in data_code_refs.

MCP Tools

Data tools require enableData: true. The 10 tools add approximately ~519 tokens of tool descriptions to the model context.
Lists all indexed datasets with row counts, column counts, file sizes, and format.
ParameterTypeDefaultDescription
projectPathstringcwdProject root path
Returns the full schema profile for a dataset: column names, inferred types, cardinality, null percentages, min/max values, and sample values.
ParameterTypeDefaultDescription
datasetstringrequiredDataset ID from kirograph_data_list
columnstringDeep-dive on a single column
projectPathstringcwdProject root path
Filtered row retrieval with structured operators. Multiple filters are ANDed.
ParameterTypeDefaultDescription
datasetstringrequiredDataset ID
filtersFilter[]Array of {column, op, value}. Ops: eq, neq, gt, gte, lt, lte, contains, in, is_null, between
columnsstring[]allColumn projection
limitnumber500Max rows (hard cap: 500)
offsetnumber0Pagination offset
projectPathstringcwdProject root path
Example — find all users with a failing status:
{
  "dataset": "tests-fixtures-users",
  "filters": [{ "column": "status", "op": "eq", "value": "failed" }],
  "columns": ["id", "email", "status", "created_at"],
  "limit": 50
}
GROUP BY aggregation computed entirely in SQLite. Only results enter the context window.
ParameterTypeDefaultDescription
datasetstringrequiredDataset ID
groupBystring[]requiredColumns to group by
metricsMetric[]requiredArray of {column, op}. Ops: count, sum, avg, min, max, count_distinct
filtersFilter[]Pre-aggregation row filters
projectPathstringcwdProject root path
SQL JOIN across two indexed datasets.
ParameterTypeDefaultDescription
leftstringrequiredLeft dataset ID
rightstringrequiredRight dataset ID
leftColumnstringrequiredJoin key from left dataset
rightColumnstringrequiredJoin key from right dataset
typestringinnerJoin type: inner, left, right
columnsstring[]allColumn projection (prefix with dataset ID to disambiguate)
limitnumber100Max rows (hard cap: 500)
projectPathstringcwdProject root path
Pairwise Pearson correlations between all numeric columns in a dataset.
ParameterTypeDefaultDescription
datasetstringrequiredDataset ID
thresholdnumber0.3Min absolute correlation to include
projectPathstringcwdProject root path
Ranks columns by a composite risk score combining null rate, cardinality anomalies, and type inconsistencies. Useful for triage before writing transformation logic.
ParameterTypeDefaultDescription
datasetstringrequiredDataset ID
projectPathstringcwdProject root path
Detects schema drift between the last two index runs for a dataset: added or removed columns, type changes, and row count deltas.
ParameterTypeDefaultDescription
datasetstringrequiredDataset ID (from kirograph_data_list)
projectPathstringcwdProject root path
Returns the history of schema snapshots for a dataset: timestamps, row counts, column counts, and column names at each snapshot.
ParameterTypeDefaultDescription
datasetstringrequiredDataset ID (from kirograph_data_list)
limitnumber10Max snapshots to return (hard cap: 50)
projectPathstringcwdProject root path

Code ↔ Data Linking

When dataLinkCode: true (the default), KiroGraph runs DataCodeLinker after indexing completes. It detects data file paths that match code symbol names — for example, a file tests/fixtures/users.csv linked to a users table name or a seedUsers function — and stores these as references in data_code_refs. These links surface in kirograph_context and kirograph_impact results when the related code symbol is in scope.

PDF Notes

PDF content columns contain full page text rendered as markdown, which can be verbose. If you index PDFs, keep dataContextLimit at 0 or 1. Reading more than one PDF page at a time through kirograph_context auto-injection will inflate context significantly. Use kirograph_data_query directly to fetch specific pages.

Config Reference

FieldTypeDefaultDescription
enableDatabooleanfalseEnable tabular data indexing and querying
dataIncludestring[]["**/*.csv", "**/*.tsv", ...]Glob patterns for data files to include
dataExcludestring[]["node_modules/**", ...]Glob patterns to exclude
dataLinkCodebooleantrueAuto-link data files to code symbols via path detection
dataContextLimitnumber0Max datasets in kirograph_context (0 = disabled)
dataMaxFileSizenumber52428800Max file size in bytes (50 MB)
dataMaxRowsnumber1000000Max rows to index per file
dataQueryLimitnumber500Max rows returned per query (hard cap)
dataMaxResponseTokensnumber8000Max token budget per data tool response

Build docs developers (and LLMs) love