Skip to main content

tool_call_message

Function tool_call_message 

Source
pub fn tool_call_message(tc: &ToolCall) -> Message
Expand description

Build a wire Message carrying a structured tool call.

Preserves the provider signature (e.g. a thinking model’s thought signature) as the ToolCallContent.signature bytes. Persisted to the event log so replay reconstructs a real tool_use (paired with tool_result_message) instead of a lossy text marker, and the signature survives to be echoed back on the next request. Rendered as an (ignored) tool-start downstream — never as user-visible reply text.