JSON Schema validation toolkit.
valj validates against JSON Schema Draft 2020-12
(specification,
meta-schema URI https://json-schema.org/draft/2020-12/schema).
| Crate | Description |
|---|---|
valj-core |
Core validation engine |
valj-format |
Output formatting helpers |
valj |
Command-line validation tool |
valj-mcp |
MCP server — validates JSON over stdio for AI clients |
Authoritative end-user documentation lives in docs/man/ and is shipped as
Unix manual pages.
| Page | Section | Topic |
|---|---|---|
valj(1) |
1 | Command-line validator |
valj-mcp(1) |
1 | MCP server |
valj-mcp.toml(5) |
5 | Server registry config |
valj-schema(5) |
5 | Schema dialect with worked examples |
valj-protocol(7) |
7 | Validation pipeline, error budget, output formats |
After installing the Debian package the same pages are available locally
through man valj, man 5 valj-schema, etc.
cargo install --path crates/valj
# Quick syntax check (no schema needed)
valj input.json
# Full schema validation
valj validate --schema schema.json --input input.jsonSee valj(1) for the full command reference and
valj-schema(5) for schema authoring with
worked examples (types, ranges, required fields, patterns, custom
keywords).
cargo install --path crates/valj-mcpvalj-mcp exposes four tools over stdio:
| Tool | Description |
|---|---|
valj_list_schemas |
List all loaded schemas and their status |
valj_validate |
Syntax check or full schema validation |
valj_check_schema |
Validate a schema file against JSON Schema Draft 2020-12 |
valj_register_schema |
Register a new schema at runtime (requires dynamic mode) |
Syntax-only check (no schema_name):
{ "input": "{\"name\": \"Alice\"}" }{ "mode": "syntax_only", "syntaxValid": true }Full validation (schema_name must match a loaded schema):
{ "input": "{\"name\": \"Alice\", \"status\": \"active\"}", "schema_name": "person" }{ "mode": "full", "valid": true, "findings": [] }See valj-mcp(1) for the full server reference,
valj-mcp.toml(5) for the registry config
format, and crates/valj-mcp/README.md for a
quick install walkthrough.
cargo test --workspace
cargo clippy --workspace --all-targets -- -D warningsSee docs/development.md for the full build, test, lint, and documentation matrix.
Lints are centrally defined via [workspace.lints] in the root Cargo.toml.
All crates inherit these via [lints] workspace = true.
Active policies:
unsafe_code = "deny"— unsafe blocks require a local#[allow(unsafe_code)]rust_2018_idioms = "warn"— enforces modern Rust idiomsclippy::all = "warn"— standard Clippy checksclippy::cargo = "warn"— Cargo manifest checks (withcargo_common_metadataandmultiple_crate_versionsallowed for internal crates)
See CHANGELOG.md.