pub enum AgentTool {
BuiltinToolset(BuiltinToolset),
McpToolset(McpToolset),
Custom(CustomTool),
Other(Value),
}Available on crate feature
managed-agents-preview only.Expand description
One tool entry on an agent.
Forward-compatible: unknown wire type tags fall through to
Self::Other preserving the raw JSON.
Variants§
BuiltinToolset(BuiltinToolset)
Pre-built agent_toolset_20260401 (bash / edit / read / write /
glob / grep / web_fetch / web_search) with optional per-tool
overrides and a default config.
McpToolset(McpToolset)
MCP toolset bound to a server name from the agent’s
mcp_servers array.
Custom(CustomTool)
Custom client-executed tool.
Other(Value)
Unknown tool kind; raw JSON preserved.
Implementations§
Source§impl AgentTool
impl AgentTool
Sourcepub fn builtin_toolset() -> Self
pub fn builtin_toolset() -> Self
Enable the pre-built agent_toolset_20260401 (no overrides).
Sourcepub fn mcp_toolset(server_name: impl Into<String>) -> Self
pub fn mcp_toolset(server_name: impl Into<String>) -> Self
Expose tools from a named MCP server.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for AgentTool
impl<'de> Deserialize<'de> for AgentTool
Source§fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for AgentTool
Auto Trait Implementations§
impl Freeze for AgentTool
impl RefUnwindSafe for AgentTool
impl Send for AgentTool
impl Sync for AgentTool
impl Unpin for AgentTool
impl UnsafeUnpin for AgentTool
impl UnwindSafe for AgentTool
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
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>
Converts
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>
Converts
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 moreCreates a shared type from an unshared type.