#[non_exhaustive]pub struct ToolCall {
pub name: String,
pub args: Value,
}Expand description
One tool call the agent made: the tool’s name and the structured args it was invoked with.
args is opaque JSON so any argument shape round-trips and the built-in
expect::Expectation assertions can subset-match against it. The report keeps a
display string per call (see CaseOutcome::tool_calls);
the runner derives those from these structured calls via ToolCall::display, so saved JSON / the
--json path / the HTML report stay shape-compatible.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: StringThe tool/function name the agent invoked.
args: ValueThe arguments the agent passed, as opaque JSON (typically an object).
Implementations§
Source§impl ToolCall
impl ToolCall
Sourcepub fn new(name: impl Into<String>, args: Value) -> Self
pub fn new(name: impl Into<String>, args: Value) -> Self
Build a tool call from a name and its argument JSON.
Sourcepub fn display(&self) -> String
pub fn display(&self) -> String
Render the compact "name(compact-args)" form used in the report’s per-case tool_calls display
strings (and the human-readable summary table). The args are the JSON value’s compact string, so
set_voxel({"at":[0,1,0]}) reads back the way a debugging caller expects.