#[non_exhaustive]pub enum KnownBuiltinTool {
WebSearch20250305 {
name: String,
max_uses: Option<u32>,
allowed_domains: Option<Vec<String>>,
blocked_domains: Option<Vec<String>>,
user_location: Option<UserLocation>,
cache_control: Option<CacheControl>,
},
Computer20250124 {
name: String,
display_width_px: u32,
display_height_px: u32,
display_number: Option<u32>,
cache_control: Option<CacheControl>,
},
Bash20250124 {
name: String,
cache_control: Option<CacheControl>,
},
TextEditor20250124 {
name: String,
cache_control: Option<CacheControl>,
},
CodeExecution20250825 {
name: String,
cache_control: Option<CacheControl>,
},
}Expand description
All server-side built-in tool variants known to this SDK version.
#[non_exhaustive] on both the enum (so adding a variant is non-breaking)
and on each struct variant (so adding a field is non-breaking).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
WebSearch20250305
Web search tool, version 2025-03-05. The model can issue
keyword searches; results are returned as
KnownBlock::WebSearchToolResult
blocks.
Fields
user_location: Option<UserLocation>Approximate user location to bias results.
cache_control: Option<CacheControl>Optional cache breakpoint on the tool definition.
Computer20250124
Computer-use tool, version 2025-01-24. Lets the model take
screenshots and synthesize mouse/keyboard input.
Fields
cache_control: Option<CacheControl>Optional cache breakpoint.
Bash20250124
Bash tool, version 2025-01-24.
Fields
cache_control: Option<CacheControl>Optional cache breakpoint.
TextEditor20250124
Text editor tool, version 2025-01-24.
Fields
cache_control: Option<CacheControl>Optional cache breakpoint.
CodeExecution20250825
Code execution tool, version 2025-08-25. Server-side sandboxed
Python execution.
Fields
cache_control: Option<CacheControl>Optional cache breakpoint.
Trait Implementations§
Source§impl Clone for KnownBuiltinTool
impl Clone for KnownBuiltinTool
Source§fn clone(&self) -> KnownBuiltinTool
fn clone(&self) -> KnownBuiltinTool
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for KnownBuiltinTool
impl Debug for KnownBuiltinTool
Source§impl<'de> Deserialize<'de> for KnownBuiltinTool
impl<'de> Deserialize<'de> for KnownBuiltinTool
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>,
Source§impl From<KnownBuiltinTool> for BuiltinTool
impl From<KnownBuiltinTool> for BuiltinTool
Source§fn from(k: KnownBuiltinTool) -> Self
fn from(k: KnownBuiltinTool) -> Self
Source§impl PartialEq for KnownBuiltinTool
impl PartialEq for KnownBuiltinTool
Source§impl Serialize for KnownBuiltinTool
impl Serialize for KnownBuiltinTool
impl StructuralPartialEq for KnownBuiltinTool
Auto Trait Implementations§
impl Freeze for KnownBuiltinTool
impl RefUnwindSafe for KnownBuiltinTool
impl Send for KnownBuiltinTool
impl Sync for KnownBuiltinTool
impl Unpin for KnownBuiltinTool
impl UnsafeUnpin for KnownBuiltinTool
impl UnwindSafe for KnownBuiltinTool
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more