Skip to main content
Glama

check_leakage

Detect data leakage in datasets using column-name heuristics, high correlation to target, and time-based backfill patterns to prevent biased models.

Instructions

Three-layer leakage detection (Level 6).

    Layer 1 (always): name heuristics — flags columns named like 'label_*',
    'outcome_*', 'pred_*', 'post_*'. Layer 2 (with target): features whose
    Pearson correlation with target > 0.95. Layer 3 (with target + time):
    features that are constant within each time bucket but vary across
    buckets (likely backfilled). Output size: small.
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
source_idYes
time_columnNo
target_columnNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

With no annotations, the description carries the burden of disclosing behavior. It details the detection logic, conditional operation on target/time, and states output size is small. It does not explicitly mention side effects, but read-only nature is implied by 'check'.

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

Conciseness5/5

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

The description is well-structured with a clear purpose statement and three enumerated layers, each earning its place. It is detailed but not verbose, with no superfluous content.

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?

The description covers all three detection layers, parameter conditioning, and output size. It does not explain return structure, but an output schema exists, so that is not required. It could mention prerequisites or limitations, but overall it provides sufficient context.

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

Parameters3/5

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

Schema coverage is 0%, so the description must compensate. It explains the role of target_column and time_column by tying them to detection layers, but does not describe source_id or expected value formats, leaving significant gaps for the agent.

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 clearly states the tool performs three-layer leakage detection, specifying concrete detection mechanisms (name heuristics, correlation >0.95, temporal consistency). This distinguishes it from sibling check tools like check_correlations or check_temporal.

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

Usage Guidelines4/5

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

The description explains when each detection layer applies based on provided parameters: Layer 1 always, Layer 2 when target is provided, Layer 3 when target and time are provided. This gives clear context for parameter usage, though it does not explicitly name alternative tools or exclusions.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/charliecpeterson/edamcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server