pub struct ToolDescriptor {
pub name: String,
pub title: String,
pub description: String,
pub permission: AiPermission,
pub input_schema: Value,
}Expand description
What a tool is, as the model sees it.
The description is the part a model actually acts on — it is public API for a reader that cannot ask follow-up questions. It belongs in review like any other interface, not appended as an afterthought.
Fields§
§name: StringNamespaced, dot-separated: projects.list, knowledge.search.
title: StringShort human-readable label for permission dialogs and logs.
description: StringWhat the tool does, when to use it, and what it returns.
permission: AiPermissionWhat invoking this costs in terms of rights.
input_schema: ValueJSON Schema for the arguments.
Implementations§
Trait Implementations§
Source§impl Clone for ToolDescriptor
impl Clone for ToolDescriptor
Source§fn clone(&self) -> ToolDescriptor
fn clone(&self) -> ToolDescriptor
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ToolDescriptor
impl Debug for ToolDescriptor
Source§impl<'de> Deserialize<'de> for ToolDescriptor
impl<'de> Deserialize<'de> for ToolDescriptor
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 ToolDescriptor
impl RefUnwindSafe for ToolDescriptor
impl Send for ToolDescriptor
impl Sync for ToolDescriptor
impl Unpin for ToolDescriptor
impl UnsafeUnpin for ToolDescriptor
impl UnwindSafe for ToolDescriptor
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