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 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.
get_incidentA

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

Use this after patrol_duckdb, patrol_files 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.7/5.0

Scored across 4 tools

Disambiguation5/5

Each tool has a clearly distinct role: two patrol entry points that differ only by storage backend, one evidence lookup, and one demo runner. The patrol_duckdb/patrol_files pair could superficially overlap, but each description explicitly says when to use the other, and get_incident and run_demo are unmistakable.

Naming Consistency5/5

All names are snake_case verb_noun: get_incident, patrol_duckdb, patrol_files, run_demo. The backend qualifier on patrol_* is a predictable, readable variant rather than a convention break.

Tool Count5/5

Four tools is well-scoped for a focused data-quality patrol server: two input modes, one drill-down, one demo. Nothing is redundant and no obvious operation is missing from the count.

Completeness4/5

The lifecycle is covered: run a patrol, drill into an incident, and try it on sample data, with cross-references between tools forming a coherent flow. The main gap is that fixes are only written to fixed_version.csv for review, with no tool to apply or approve a proposed fix, so the remediation loop dead-ends at a file.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues