1use serde::{Deserialize, Serialize};
2
3#[derive(Debug, Clone)]
4pub struct ToolDefinition {
5 pub name: String,
6 pub description: String,
7 pub schema: serde_json::Value,
16}
17
18#[derive(Debug, Clone, Serialize, Deserialize)]
19pub struct ToolCall {
20 pub id: String,
21 pub name: String,
22 pub arguments: String,
23}
24
25
26impl ToolDefinition {
27 pub fn new(name: impl Into<String>, description: impl Into<String>, schema: serde_json::Value) -> Self {
28 Self {
29 name: name.into(),
30 description: description.into(),
31 schema
32 }
33 }
34}