pub type AfterToolCallbackFull = Box<dyn Fn(Arc<dyn CallbackContext>, Arc<dyn Tool>, Value, Value) -> Pin<Box<dyn Future<Output = Result<Option<Value>, AdkError>> + Send>> + Send + Sync>;Expand description
Core traits and types.
Always available regardless of feature flags. Includes:
Agent- The fundamental trait for all agentsTool/Toolset- For extending agents with capabilitiesSession/State- For managing conversation contextEvent- For streaming agent responsesAdkError/Result- Unified error handling Rich after-tool callback that receives the tool, arguments, and response.
Aligned with the Python/Go ADK model where after_tool_callback receives
the full tool execution context: the tool itself, the arguments it was
called with, and the response it produced (or error JSON).
This is the V2 callback surface for first-class tool result handling.
Unlike AfterToolCallback (which only receives CallbackContext),
this callback can inspect and modify tool results without relying on
ToolOutcome inspection.
Return Ok(None) to keep the original response, or Ok(Some(value))
to replace the function response sent to the LLM.
Aliased Typeยง
pub struct AfterToolCallbackFull(/* private fields */);