# leakcheck

> Command-line tool and Python library (PyPI: dataset-leakcheck) that audits train/test leakage within and across ML datasets: exact, whitespace/comment-insensitive and near-duplicate overlap matrices, overlapping record ids, label conflicts, and a cleaned copy of a test split. Pure standard library; JSON output; MCP server included.

## Docs

Agents: call the tools directly on the files in the working directory (never ask for pasted data), send only needed arguments (omit optional ones, never 0 or ""), use normalizer=code to ignore comments, dry_run=true to count removals without writing.

- [AGENTS.md](AGENTS.md): exact commands, inputs, outputs, exit codes, error codes, examples, pitfalls
- [README.md](README.md): full documentation and a worked example

## Machine interfaces

- `leakcheck describe --json`: tool definitions in Anthropic, OpenAI and MCP formats
- `leakcheck mcp`: MCP server over stdio (tools leakcheck_audit, leakcheck_clean)
- [schemas/](schemas/): JSON Schemas for every --json output, errors and tool definitions

## Optional

- [pyproject.toml](pyproject.toml): packaging and optional extras
