# car-validator
Precondition checking and action validation for the [Common Agent Runtime](https://github.com/Parslee-ai/car).
## What it does
Validates actions against runtime state and registered tool schemas before execution.
Checks preconditions (eq, neq, gt, lt, gte, lte, exists, not_exists, contains), verifies
required tool parameters, and confirms state dependencies are present. Returns structured
`ValidationResult` with all errors.
## Usage
```rust
use car_validator::{validate_action, check_precondition};
use car_state::StateStore;
let state = StateStore::new();
let result = validate_action(&action, &state, ®istered_tools);
if !result.valid() {
for err in &result.errors {
eprintln!("{}: {}", err.action_id, err.reason);
}
}
```
Part of [CAR](https://github.com/Parslee-ai/car) -- see the main repo for full documentation.