Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault

No arguments

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

DataRanger checks a date-partitioned fact table (in DuckDB, CSV or Parquet files, Snowflake, or behind a dbt model) against its reference table and the source's control totals. It finds broken partitions, proposes fixes, verifies each fix on a copy, and only marks a fix 'auto-fixed' when it is proven and low risk; everything else is 'escalate', meaning a person must decide. Call a patrol tool before relying on a table, report escalations to the user rather than working around them, and never claim data was changed: these tools only write a report.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}

Tools

Functions exposed to the LLM to take actions

NameDescription
patrol_duckdbA

Check a fact table in a DuckDB database for data-quality incidents and say which are safe to fix. A patrol checks every daily partition of the fact table for duplicate keys, duplicate rows, missing partitions, rows that point to no reference record, null spikes, and row counts or amounts that do not match the source's control totals. For each problem it proposes a fix, tests that fix on a copy against the control totals, and decides: "auto-fixed" (proven and low risk), "no action needed" (checked, the data is right) or "escalate" (a person must decide).

Use this before trusting, querying or building on a date-partitioned table that lives in a DuckDB
database, or after a load or pipeline change to confirm the data is still right. Use patrol_files
instead when the data is in CSV, TSV or Parquet files. Use run_demo to see the output on sample data.

Behavior: The database is opened read-only. Your data is never modified and nothing is written back. The only side effect is
writing four report files to out_dir: dashboard.html, audit.jsonl, incidents.csv, fixed_version.csv
(the proposed corrected table, for review). Runs locally with no network calls;
usually a few seconds, longer for tables with millions of rows. Fails with a readable error if a
file, table or mapped column does not exist; the error lists the columns that are available.

Returns the counts (incidents, auto_fixed, no_action_needed, escalate), needs_a_person (the escalated
incidents), all_incidents (partition, problems, decision, proposed_fix, residual for each) and
outputs (paths to the report files). Pass outputs.folder and a partition to get_incident for the
full evidence behind one decision. Tell the user about every escalated incident.
patrol_filesA

Check a fact table in CSV, TSV or Parquet files for data-quality incidents and say which are safe to fix. A patrol checks every daily partition of the fact table for duplicate keys, duplicate rows, missing partitions, rows that point to no reference record, null spikes, and row counts or amounts that do not match the source's control totals. For each problem it proposes a fix, tests that fix on a copy against the control totals, and decides: "auto-fixed" (proven and low risk), "no action needed" (checked, the data is right) or "escalate" (a person must decide).

Use this before trusting, querying or building on a date-partitioned table exported as CSV, TSV or
Parquet files, or after a load or pipeline change to confirm the data is still right. Use
patrol_duckdb instead when the table lives in a DuckDB database. Use run_demo to see the output on
sample data.

Behavior: The three input files are only read. Your data is never modified and nothing is written back. The only side effect is
writing four report files to out_dir: dashboard.html, audit.jsonl, incidents.csv, fixed_version.csv
(the proposed corrected table, for review). Runs locally with no network calls;
usually a few seconds, longer for tables with millions of rows. Fails with a readable error if a
file, table or mapped column does not exist; the error lists the columns that are available.

Returns the counts (incidents, auto_fixed, no_action_needed, escalate), needs_a_person (the escalated
incidents), all_incidents (partition, problems, decision, proposed_fix, residual for each) and
outputs (paths to the report files). Pass outputs.folder and a partition to get_incident for the
full evidence behind one decision. Tell the user about every escalated incident.
patrol_snowflakeA

Check a fact table in Snowflake for data-quality incidents and say which are safe to fix.

A patrol checks every daily partition of the fact table for duplicate keys, duplicate rows, missing
partitions, rows that point to no reference record, null spikes, and row counts or amounts that do not
match the source's control totals. For each problem it proposes a fix, tests that fix on a copy against
the control totals, and decides: "auto-fixed" (proven and low risk), "no action needed" (checked, the
data is right) or "escalate" (a person must decide).

Use this before trusting, querying or building on a date-partitioned Snowflake table, or after a load to
confirm the data is still right. Use patrol_dbt instead when the table is built by a dbt model,
patrol_duckdb for a DuckDB file and patrol_files for CSV or Parquet exports. Use run_demo to see the
output on sample data.

Behavior: connects to Snowflake with credentials already configured on this machine; none are passed
as arguments. It runs three SELECT statements and nothing else, so the warehouse is never modified,
and it selects only the mapped columns for the last `days` days, so it uses a little warehouse compute
(usually seconds for 30 days). The only side effect is writing four report files to out_dir:
dashboard.html, audit.jsonl, incidents.csv and fixed_version.csv (the proposed corrected table, for
review). Fails with a readable error if the login is refused, or a table or mapped column does not exist.

Returns the counts (incidents, auto_fixed, no_action_needed, escalate), needs_a_person (the escalated
incidents), all_incidents (partition, problems, decision, proposed_fix, residual for each) and
outputs (paths to the report files). Pass outputs.folder and a partition to get_incident for the
full evidence behind one decision. Tell the user about every escalated incident.
patrol_dbtA

Check the table behind a dbt model for data-quality incidents and say which are safe to fix.

A patrol checks every daily partition of the fact table for duplicate keys, duplicate rows, missing
partitions, rows that point to no reference record, null spikes, and row counts or amounts that do not
match the source's control totals. For each problem it proposes a fix, tests that fix on a copy against
the control totals, and decides: "auto-fixed" (proven and low risk), "no action needed" (checked, the
data is right) or "escalate" (a person must decide).

Use this after `dbt build` or `dbt run`, before trusting or publishing a date-partitioned model. It
finds the model's table from dbt's manifest, connects the way the project's profile says (DuckDB,
Snowflake and Postgres targets are supported; BigQuery is experimental), and takes the column mapping from
the model's `meta: dataranger:` block unless you pass columns here. Use patrol_snowflake or patrol_duckdb
for tables that are not dbt models, and patrol_files for CSV or Parquet exports.

Behavior: reads target/manifest.json, dbt_project.yml and profiles.yml; it does not run dbt. It then
runs three SELECT statements and nothing else, so neither the warehouse nor the dbt project is
modified. On Snowflake it selects only the mapped columns for the last `days` days. The only side
effect is writing four report files to out_dir: dashboard.html, audit.jsonl, incidents.csv and
fixed_version.csv (the proposed corrected table, for review). Fails with a readable error if the
manifest is missing (run dbt first), a model is unknown, the target type is not supported, or a
mapped column does not exist.

Returns the counts (incidents, auto_fixed, no_action_needed, escalate), needs_a_person (the escalated
incidents), all_incidents (partition, problems, decision, proposed_fix, residual for each) and
outputs (paths to the report files). Pass outputs.folder and a partition to get_incident for the
full evidence behind one decision. Tell the user about every escalated incident.
get_incidentA

Return the full evidence behind one incident from a patrol that has already run.

Use this after a patrol tool (patrol_duckdb, patrol_files, patrol_snowflake, patrol_dbt) or run_demo, when you need to explain why a partition was
auto-fixed or escalated, or to show the user what to review. A patrol records at most one incident per
partition, so the folder plus the partition date identifies it. Do not call it before a patrol.

Behavior: read-only. It reads audit.jsonl in out_dir and changes nothing; no network calls, returns
immediately, and the result is one record of a few kilobytes. Fails with a readable error if the
folder has no audit.jsonl (run a patrol first) or no incident exists for that partition.

Returns one record with: partition, detectors (the problems found), decision, context (row counts and
amounts for the day and for each segment, next to the source's control totals), candidates (every fix
that was tried, with whether it kept the invariants and the residual gap it left) and chosen (the
best-supported candidate).
run_demoA

Run a patrol on generated sample data, to see what DataRanger reports without touching real data.

Generates 60 days of synthetic payment transactions with planted problems (duplicates, missing days,
orphan rows, wrong amounts and some harmless decoys), then patrols them exactly as patrol_duckdb and
patrol_files do. Use this to try DataRanger, to show a user the report format, or to test your own
handling of the results. Use patrol_duckdb or patrol_files for real tables.

Behavior: needs no input data, credentials or network. The only side effect is writing the report
files (dashboard.html, audit.jsonl, incidents.csv, fixed_version.csv) to out_dir. Takes a few seconds.

Returns the same summary as the patrol tools: counts, needs_a_person, all_incidents and outputs.
Pass outputs.folder and a partition to get_incident for the evidence behind one decision.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A4.5/5.0

Scored across 6 tools

Disambiguation4/5

The four patrol_* tools are functionally identical apart from the data source, which normally would be a red flag, but each description explicitly names the sibling tools and states the switching rule (DuckDB file, flat files, Snowflake, dbt model). run_demo and get_incident are clearly distinct from the patrols. Only residual risk is picking the wrong source when data is reachable two ways (e.g. a dbt model on Snowflake).

Naming Consistency5/5

All names are snake_case and follow a predictable verb_noun shape, with the patrol_* family forming a clean parameterized group (patrol_duckdb, patrol_files, patrol_snowflake, patrol_dbt) plus run_demo and get_incident. No mixed conventions or versioned/vague names.

Tool Count5/5

Six tools is well scoped: four source adapters, one evidence lookup, one demo. Nothing redundant beyond the deliberate per-source split, and every tool earns its place.

Completeness4/5

The lifecycle is covered: run a patrol on any source, inspect evidence via get_incident, and preview with run_demo, with outputs written as files. The notable gap is that auto-fixes are never applied (only a fixed_version.csv is produced) and there is no tool to list or revisit previous patrol folders without already knowing the path and partition.

Maintenance

ActivityNo data
ResponsivenessOutdated data