pub struct ToolResult {
pub tool_call_id: String,
pub result_json: String,
pub is_error: bool,
pub first_party: bool,
}Expand description
The result of executing a tool, fed back to the model as a Content block.
Fields§
§tool_call_id: StringMatches the ToolCall::id this result corresponds to.
result_json: StringSerialized JSON payload returned by the tool executor.
is_error: booltrue when the tool raised an error rather than producing output.
first_party: boolIngestion-time provenance: true when the producing tool is
first-party and closed-domain (does not ingest untrusted open-world
content). Mirrors polyc_proto’s wire ToolResultContent.first_party
— this is the SAME bit, carried on the in-memory, provider-facing
representation so the live same-turn taint scan
(untrusted_content_in_context) reads a per-call signal instead of
re-deriving it from the tool name. A __delegate_to call’s result
reflects what the delegated worker actually touched, not a static
per-tool-name check — see polyc_agent’s DelegateRecord::first_party.
Trait Implementations§
Source§impl Clone for ToolResult
impl Clone for ToolResult
Source§fn clone(&self) -> ToolResult
fn clone(&self) -> ToolResult
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more