pub struct SessionRpcTools<'a> { /* private fields */ }Expand description
session.tools.* RPCs.
Implementations§
Source§impl<'a> SessionRpcTools<'a>
impl<'a> SessionRpcTools<'a>
Sourcepub async fn handle_pending_tool_call(
&self,
params: HandlePendingToolCallRequest,
) -> Result<HandlePendingToolCallResult, Error>
pub async fn handle_pending_tool_call( &self, params: HandlePendingToolCallRequest, ) -> Result<HandlePendingToolCallResult, Error>
Provides the result for a pending external tool call.
Wire method: session.tools.handlePendingToolCall.
§Parameters
params- Pending external tool call request ID, with the tool result or an error describing why it failed.
§Returns
Indicates whether the external tool call result was handled successfully.
Experimental. This API is part of an experimental wire-protocol surface and may change or be removed in future SDK or CLI releases. Pin both the SDK and CLI versions if your code depends on it.
Sourcepub async fn initialize_and_validate(
&self,
) -> Result<ToolsInitializeAndValidateResult, Error>
pub async fn initialize_and_validate( &self, ) -> Result<ToolsInitializeAndValidateResult, Error>
Resolves, builds, and validates the runtime tool list for the session.
Wire method: session.tools.initializeAndValidate.
§Returns
Resolve, build, and validate the runtime tool list for this session. Subagent sessions and consumer flows that need an initialized tool set before send invoke this. Default base-class implementation is a no-op for sessions that don’t support tool validation.
Experimental. This API is part of an experimental wire-protocol surface and may change or be removed in future SDK or CLI releases. Pin both the SDK and CLI versions if your code depends on it.
Trait Implementations§
Source§impl<'a> Clone for SessionRpcTools<'a>
impl<'a> Clone for SessionRpcTools<'a>
Source§fn clone(&self) -> SessionRpcTools<'a>
fn clone(&self) -> SessionRpcTools<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more