pub struct Tool {
pub description: Option<String>,
pub input_schema: ToolInputSchema,
pub name: String,
}
Expand description
Definition for a tool the client can call.
JSON schema
{
"description": "Definition for a tool the client can call.",
"type": "object",
"required": [
"inputSchema",
"name"
],
"properties": {
"description": {
"description": "A human-readable description of the tool.",
"type": "string"
},
"inputSchema": {
"description": "A JSON Schema object defining the expected parameters for the tool.",
"type": "object",
"required": [
"type"
],
"properties": {
"properties": {
"type": "object",
"additionalProperties": {
"type": "object",
"additionalProperties": true
}
},
"required": {
"type": "array",
"items": {
"type": "string"
}
},
"type": {
"type": "string",
"const": "object"
}
}
},
"name": {
"description": "The name of the tool.",
"type": "string"
}
}
}
Fields§
§description: Option<String>
A human-readable description of the tool.
input_schema: ToolInputSchema
§name: String
The name of the tool.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Tool
impl<'de> Deserialize<'de> for Tool
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Tool
impl RefUnwindSafe for Tool
impl Send for Tool
impl Sync for Tool
impl Unpin for Tool
impl UnwindSafe for Tool
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more