pub struct ToolCallStartEvent {
pub base: BaseEvent,
pub tool_call_id: ToolCallId,
pub tool_call_name: String,
pub parent_message_id: Option<MessageId>,
pub subagent_run_id: Option<SubagentRunId>,
}Expand description
Opens a tool call. Arguments follow as TOOL_CALL_ARGS deltas.
Fields§
§base: BaseEventTimestamp and raw provider event.
tool_call_id: ToolCallIdId correlating this call with its args, end and result.
tool_call_name: StringName of the tool being called.
parent_message_id: Option<MessageId>The assistant message that requested the call.
A JSON null here deserializes to None: producers whose serializers
emit nulls for absent optionals (notably the .NET Microsoft Agent
Framework adapter) must not abort a run on their first tool call.
subagent_run_id: Option<SubagentRunId>The subagent that produced this event; absent means the parent agent.
A JSON null is rejected — see crate::event::subagent. A tool
call belongs to the message parent_message_id names, so a tag that
disagrees with that message’s owner is a protocol error; an untagged
call inherits the message’s owner.
Implementations§
Source§impl ToolCallStartEvent
impl ToolCallStartEvent
Sourcepub fn new(
tool_call_id: impl Into<ToolCallId>,
tool_call_name: impl Into<String>,
) -> Self
pub fn new( tool_call_id: impl Into<ToolCallId>, tool_call_name: impl Into<String>, ) -> Self
Opens a call to tool_call_name.
Sourcepub fn with_parent_message_id(
self,
parent_message_id: impl Into<MessageId>,
) -> Self
pub fn with_parent_message_id( self, parent_message_id: impl Into<MessageId>, ) -> Self
Names the assistant message that requested the call.
Trait Implementations§
Source§impl Clone for ToolCallStartEvent
impl Clone for ToolCallStartEvent
Source§impl ComposeSchema for ToolCallStartEvent
impl ComposeSchema for ToolCallStartEvent
Source§impl Debug for ToolCallStartEvent
impl Debug for ToolCallStartEvent
Source§impl Default for ToolCallStartEvent
impl Default for ToolCallStartEvent
Source§impl<'de> Deserialize<'de> for ToolCallStartEvent
impl<'de> Deserialize<'de> for ToolCallStartEvent
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 From<ToolCallStartEvent> for Event
impl From<ToolCallStartEvent> for Event
Source§fn from(payload: ToolCallStartEvent) -> Self
fn from(payload: ToolCallStartEvent) -> Self
Source§impl JsonSchema for ToolCallStartEvent
impl JsonSchema for ToolCallStartEvent
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