#[non_exhaustive]pub enum ToolCallContent {
Content(Box<Content>),
Diff(Diff),
Terminal(Terminal),
Session(SessionReference),
Other(OtherToolCallContent),
}unstable_protocol_v2 only.Expand description
Content produced by a tool call.
Tool calls can produce different types of content including standard content blocks (text, images), file diffs, or display-only terminals.
See protocol docs: Content
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Content(Box<Content>)
Standard content block (text, images, resources).
Diff(Diff)
File modification shown as a diff.
Terminal(Terminal)
A display-only reference to an agent-owned terminal.
Session(SessionReference)
unstable_subagents only.UNSTABLE
This capability is not part of the spec yet, and may be removed or changed at any point.
A display-only reference to another session, such as a subagent.
Other(OtherToolCallContent)
Custom or future tool call content.
Values beginning with _ are reserved for implementation-specific
extensions. Unknown values that do not begin with _ are reserved for
future ACP variants.
Receivers that do not understand this content type should preserve the raw payload when storing, replaying, proxying, or forwarding tool call output, and otherwise ignore it or display it generically.
Trait Implementations§
Source§impl Clone for ToolCallContent
impl Clone for ToolCallContent
Source§fn clone(&self) -> ToolCallContent
fn clone(&self) -> ToolCallContent
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ToolCallContent
impl Debug for ToolCallContent
Source§impl<'de> Deserialize<'de> for ToolCallContent
impl<'de> Deserialize<'de> for ToolCallContent
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ToolCallContent, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ToolCallContent, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for ToolCallContent
Source§impl From<Diff> for ToolCallContent
impl From<Diff> for ToolCallContent
Source§fn from(diff: Diff) -> ToolCallContent
fn from(diff: Diff) -> ToolCallContent
Source§impl From<SessionReference> for ToolCallContent
Available on crate feature unstable_subagents only.
impl From<SessionReference> for ToolCallContent
unstable_subagents only.Source§fn from(session: SessionReference) -> ToolCallContent
fn from(session: SessionReference) -> ToolCallContent
Source§impl<T> From<T> for ToolCallContentwhere
T: Into<ContentBlock>,
impl<T> From<T> for ToolCallContentwhere
T: Into<ContentBlock>,
Source§fn from(content: T) -> ToolCallContent
fn from(content: T) -> ToolCallContent
Source§impl From<Terminal> for ToolCallContent
impl From<Terminal> for ToolCallContent
Source§fn from(terminal: Terminal) -> ToolCallContent
fn from(terminal: Terminal) -> ToolCallContent
Source§impl JsonSchema for ToolCallContent
impl JsonSchema for ToolCallContent
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl PartialEq for ToolCallContent
impl PartialEq for ToolCallContent
Source§impl Serialize for ToolCallContent
impl Serialize for ToolCallContent
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for ToolCallContent
Auto Trait Implementations§
impl Forget for ToolCallContent
impl Freeze for ToolCallContent
impl RefUnwindSafe for ToolCallContent
impl Send for ToolCallContent
impl Sync for ToolCallContent
impl Unpin for ToolCallContent
impl UnsafeUnpin for ToolCallContent
impl UnwindSafe for ToolCallContent
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.