pub struct ToolNode {
pub id: String,
pub tool: String,
pub name: Option<String>,
pub input: BTreeMap<String, String>,
pub input_schema: Option<Value>,
pub output_schema: Option<Value>,
}Expand description
A tool node: one direct tool invocation.
Fields§
§id: StringThe node’s stable id, unique within the document.
tool: StringThe tool’s name, as registered with the runtime.
name: Option<String>Optional short display label for this node. See the module docs’ “The
optional node display name” section for the bound and the deliberate
hash-inclusion contrast with the agent name field. Additive: absent
on the wire when unset.
input: BTreeMap<String, String>The input mapping: tool input field name to an opaque source reference. Recorded as DATA; this crate does not resolve or evaluate the references. Additive: omitted on the wire when empty.
input_schema: Option<Value>Optional JSON Schema for the payload this node consumes.
output_schema: Option<Value>Optional JSON Schema for the payload this node produces.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ToolNode
impl<'de> Deserialize<'de> for ToolNode
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl JsonSchema for ToolNode
impl JsonSchema for ToolNode
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreimpl StructuralPartialEq for ToolNode
Auto Trait Implementations§
impl Freeze for ToolNode
impl RefUnwindSafe for ToolNode
impl Send for ToolNode
impl Sync for ToolNode
impl Unpin for ToolNode
impl UnsafeUnpin for ToolNode
impl UnwindSafe for ToolNode
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more