pub struct ToolResultContent {
pub meta: Option<Map<String, Value>>,
pub content: Vec<ContentBlock>,
pub is_error: Option<bool>,
pub structured_content: Option<Value>,
pub tool_use_id: String,
pub type: ToolResultType,
}Deprecated as of protocol version 2026-07-28 (SEP-2577). Remains in the specification for at least twelve months; see the deprecated features registry.
Expand description
The result of a tool use, provided by the user back to the assistant.
Fields§
§meta: Option<Map<String, Value>>Deprecated as of protocol version 2026-07-28 (SEP-2577). Remains in the specification for at least twelve months; see the deprecated features registry.
Optional metadata about the tool result. Clients SHOULD preserve this field when including tool results in subsequent sampling requests to enable caching optimizations.
content: Vec<ContentBlock>Deprecated as of protocol version 2026-07-28 (SEP-2577). Remains in the specification for at least twelve months; see the deprecated features registry.
The unstructured result content of the tool use.
This has the same format as CallToolResult.content and can include text, images,
audio, resource links, and embedded resources.
is_error: Option<bool>Deprecated as of protocol version 2026-07-28 (SEP-2577). Remains in the specification for at least twelve months; see the deprecated features registry.
Whether the tool use resulted in an error.
If true, the content typically describes the error that occurred. Default: false
structured_content: Option<Value>Deprecated as of protocol version 2026-07-28 (SEP-2577). Remains in the specification for at least twelve months; see the deprecated features registry.
An optional structured result value.
This can be any JSON value (object, array, string, number, boolean, or null).
If the tool defined an Tool.outputSchema, this SHOULD conform to that schema.
tool_use_id: StringDeprecated as of protocol version 2026-07-28 (SEP-2577). Remains in the specification for at least twelve months; see the deprecated features registry.
The ID of the tool use this result corresponds to.
This MUST match the ID from a previous ToolUseContent.
type: ToolResultTypeDeprecated as of protocol version 2026-07-28 (SEP-2577). Remains in the specification for at least twelve months; see the deprecated features registry.
Implementations§
Source§impl ToolResultContent
impl ToolResultContent
Sourcepub fn new(content: Vec<ContentBlock>, tool_use_id: String) -> ToolResultContent
pub fn new(content: Vec<ContentBlock>, tool_use_id: String) -> ToolResultContent
Creates a value from its required fields; optional fields are None.
Trait Implementations§
Source§impl Clone for ToolResultContent
impl Clone for ToolResultContent
Source§fn clone(&self) -> ToolResultContent
fn clone(&self) -> ToolResultContent
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more