elicit_jiff
Elicitation shadow crate for jiff datetime types —
makes Zoned and Timestamp usable in #[derive(Elicit)] structs and exposes
datetime inspection as MCP tools.
Why this crate
jiff types implement Serialize/Deserialize but not JsonSchema,
blocking their use in MCP tool registrations. This crate provides JsonSchema-enabled
newtypes via schemars' jiff02 feature, with transparent serialization and
Deref access to all upstream methods.
Types
| Type | Inner | Description |
|---|---|---|
Zoned |
jiff::Zoned |
Wall-clock datetime with IANA timezone |
Timestamp |
jiff::Timestamp |
Absolute instant in time (TAI-like) |
MCP tools
| Type | Tools |
|---|---|
Zoned |
year, month, day, hour, minute, second, nanosecond, subsec_nanosecond, day_of_year, days_in_month, weekday, timezone_name, timestamp_seconds, in_tz |
Timestamp |
as_second, as_millisecond, as_microsecond, subsec_nanosecond, is_zero, signum, in_tz |
Both serialize transparently (jiff's own format).
Usage
[]
= "0.11"
use ;
let z = parse.unwrap;
println!;
// Convert to another timezone
if let Some = z.in_tz
let ts = from_second.unwrap;
println!;
License
Licensed under either of Apache License 2.0 or MIT at your option.