pub struct Tool {
pub name: String,
pub description: Option<String>,
pub input_keys: Vec<String>,
pub outputs: Vec<CellEntry>,
pub oracle: BTreeMap<String, CellValue>,
}Expand description
One served tool — the multi-tool model lift (WBV2-03, §4.1): each output Table in
the source workbook becomes its OWN Tool, owning its outputs projection and a
minimal, DAG-derived input_keys schema (the subset of the shared CellMap::inputs
pool transitively reachable upstream of this tool’s output cells).
This type crosses the reader-free boundary (it lives HERE, beside CellMap, not
re-declared on the served side): both the offline compiler emitter and the served
binary deserialize ONE definition (artifact_model.rs module doc).
Derive note: Eq is DROPPED — oracle carries CellValue (an f64-bearing
Number), so this type is PartialEq but NOT Eq (the crate::manifest_model
GovernedDatum precedent).
Fields§
§name: StringThe tool name — derived from the owning output Table’s name (raw; MCP-charset sanitization happens in the served emit, Plan 04).
description: Option<String>The tool description — the caption cell above the output Table, when authored.
input_keys: Vec<String>The minimal input schema: the LLM-facing json_keys of the CellMap::inputs
pool entries transitively reachable upstream of this tool’s outputs (constant-only
paths excluded; shared intermediates yield the union of this tool’s own upstream
leaves). DAG-derived via crate::dag::upstream_input_leaves.
outputs: Vec<CellEntry>One entry per output cell this tool projects (reuses CellEntry — the same
{json_key, seed_coord, unit} shape the inputs use).
oracle: BTreeMap<String, CellValue>The per-tool reconcile oracle: <output json_key> → the authored expected value
(the cached <v> cell value). Carries a typed CellValue (the f64-bearing
Number that drops Eq).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Tool
impl<'de> Deserialize<'de> for Tool
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for Tool
impl JsonSchema for Tool
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more