Skip to main content
Glama
tabular-ds-mcp
by YusufErem

compare_train_test

Detect train/test distribution shifts by checking column and dtype mismatches, unseen categories, PSI/KS, adversarial-validation AUC, temporal ordering, and unseen key overlap.

Instructions

Check whether the test set looks like the training set: column and dtype mismatches, unseen categories, PSI and KS per feature, an adversarial-validation AUC (0.5 = indistinguishable), whether the test rows come after the training period, and how many test rows belong to keys never seen in train.

Args: train_path: training table. test_path: test table (no target column needed). target: target column in the training table, excluded from the comparison. id_col: ID column, excluded from the comparison. time_col: time column to check (default: date columns are found automatically). group_col: key column to check, such as customer_id (default: found automatically). max_rows: sample size per table for the heavier checks.

Input Schema

NameRequiredDescriptionDefault
id_colNo
targetNo
max_rowsNo
time_colNo
group_colNo
test_pathYes
train_pathYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.1/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden and does so well: it discloses the exact battery of checks run, explains the adversarial AUC scale (0.5 = indistinguishable), notes that target and id columns are excluded, and that max_rows samples each table for the heavier checks. It stops short of describing the returned report's structure or whether failures raise versus report, which is the remaining gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded summary sentence followed by a standard Args block; no filler or repetition. The opening sentence is dense with a long checklist, but each item is a distinct check an agent would want to know about, so the length is earned rather than padded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a seven-parameter tool with zero schema descriptions, no annotations, and no output schema, the description covers parameters and computed diagnostics thoroughly. The notable missing piece is any indication of the return shape (a report dict, a per-feature table, a verdict field), which no output schema supplies on its behalf.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, yet the Args block documents all seven parameters with meaningful semantics beyond their names: target and id_col are excluded from the comparison, time_col and group_col are auto-detected when omitted, and max_rows bounds sampling for the heavier checks. The one omission is path format/acceptability for train_path and test_path.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb and resource ('Check whether the test set looks like the training set') and then enumerates the concrete diagnostics: column/dtype mismatches, unseen categories, PSI and KS per feature, adversarial-validation AUC, time-ordering, and unseen keys. That level of detail makes it unmistakable against siblings like profile_dataset or cv_baseline, which do not compare two tables.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The purpose strongly implies the usage context (validating a train/test split before modeling), and the parenthetical 'no target column needed' clarifies one precondition. However, it never states when to prefer this over profile_dataset, nor any exclusion such as 'not for comparing two training sets' or cost expectations. Usage is inferable but not explicit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.