Tool Call Data • Rust AI Agent SDK
ToolCallData: Tool call data for streaming events.
ToolCallData
Defined in the streaming module.
Rust AI Agent SDK
Tool call data for streaming events.
%%{init: {'theme': 'base', 'themeVariables': { 'primaryColor': '#8B0000', 'primaryTextColor': '#fff', 'primaryBorderColor': '#710101', 'lineColor': '#189AB4', 'secondaryColor': '#189AB4', 'tertiaryColor': '#fff' }}}%%
graph LR
agent["Agent"] -- "uses" --> tool["Tool: ToolCallData"]
tool -- "returns" --> result["Result"]
style tool fill:#189AB4,color:#fff
style agent fill:#8B0000,color:#fff
style result fill:#8B0000,color:#fffFields
| Name | Type | Description |
|---|---|---|
name | String | Tool name |
arguments | String | Tool arguments (partial JSON) |
id | Option<String> | Tool call ID |
index | Option<usize> | Index in the tool calls array |
Methods
new
fn new(name: impl Into<String>) -> SelfCreate new tool call data
Parameters:
| Name | Type |
|---|---|
name | impl Into<String> |
arguments
fn arguments(mut self, args: impl Into<String>) -> SelfSet arguments
Parameters:
| Name | Type |
|---|---|
args | impl Into<String> |
id
fn id(mut self, id: impl Into<String>) -> SelfSet ID
Parameters:
| Name | Type |
|---|---|
id | impl Into<String> |
Source
View on GitHubpraisonai/src/streaming/mod.rs at line 78