Expand description
elicit_uom — MCP tools for the uom units-of-measurement library.
Provides two plugins:
| Plugin | Namespace | Description |
|---|---|---|
UomQuantityPlugin | uom_{name}__*, uom_qty__* | Quantity creation, arithmetic, conversion |
UomCodePlugin | uom_code__* | Code emission and catalog queries |
§Quick start
use elicit_uom::{UomQuantityPlugin, UomCodePlugin};
let qty = UomQuantityPlugin::new();
let code = UomCodePlugin::with_bus(qty.bus());Structs§
- Quantity
BusEntry - A single entry stored on the
QuantityBus. - UomCode
Plugin - MCP plugin providing code emission and catalog query tools.
- UomError
- Wrapper error carrying kind, source file, and line number.
- UomQuantity
Plugin - MCP plugin providing quantity creation, arithmetic, and conversion tools.
Enums§
- UomError
Kind - Specific error condition within a uom operation.
Constants§
- ALL_
REGISTRATIONS - All 18 registration names.
Functions§
- convert_
to_ unit - Convert a stored SI value to a target unit for a given registration.
- derive_
div - Derive the result registration name for
lhs ÷ rhs. - derive_
mul - Derive the result registration name for
lhs × rhs. - derive_
pow - Derive the result registration name for
lhs ^ n. - derive_
recip - Derive the result registration name for
1 / lhs(reciprocal). - derive_
sqrt - Derive the result registration name for
√lhs. - new_bus
- Create a fresh, empty
QuantityBus. - parse_
any - Parse a value+unit string for any registration, returning the SI value and snippet.
- parse_
params - Parse the
argumentsfield of aCallToolRequestParamsinto a typed struct. - rust_
type_ name - Map a registration name to its Rust uom type name.
- si_
unit_ name - Map a registration name to its SI base unit name.
- supported_
units - Return the list of supported unit strings for a registration.
Type Aliases§
- Quantity
Bus - Thread-safe UUID-keyed store of all created quantity values.