#[non_exhaustive]pub enum ToolCallContent {
Content(Box<Content>),
Diff(Box<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(Box<Diff>)
File modification shown as a diff.
Terminal(Terminal)
A display-only reference to an Agent-owned terminal.
Session(SessionReference)
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§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<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for ToolCallContent
Source§impl From<Diff> for ToolCallContent
impl From<Diff> for ToolCallContent
Source§impl From<SessionReference> for ToolCallContent
impl From<SessionReference> for ToolCallContent
Source§fn from(session: SessionReference) -> Self
fn from(session: SessionReference) -> Self
Source§impl<T: Into<ContentBlock>> From<T> for ToolCallContent
impl<T: Into<ContentBlock>> From<T> for ToolCallContent
Source§impl From<Terminal> for ToolCallContent
impl From<Terminal> for ToolCallContent
Source§impl JsonSchema for ToolCallContent
Available on crate feature schemars only.
impl JsonSchema for ToolCallContent
schemars only.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
impl StructuralPartialEq for ToolCallContent
Auto Trait Implementations§
impl Forget for ToolCallContent
impl Freeze for ToolCallContent
impl Move 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.