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.
Sourcepub async fn get_current_metadata(
&self,
) -> Result<ToolsGetCurrentMetadataResult, Error>
pub async fn get_current_metadata( &self, ) -> Result<ToolsGetCurrentMetadataResult, Error>
Returns lightweight metadata for the session’s currently initialized tools.
Wire method: session.tools.getCurrentMetadata.
§Returns
Current lightweight tool metadata snapshot for the session.
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 update_subagent_settings(
&self,
params: UpdateSubagentSettingsRequest,
) -> Result<ToolsUpdateSubagentSettingsResult, Error>
pub async fn update_subagent_settings( &self, params: UpdateSubagentSettingsRequest, ) -> Result<ToolsUpdateSubagentSettingsResult, Error>
Updates the current session’s live subagent settings after user settings change. The persisted user settings remain the source of truth for future sessions.
Wire method: session.tools.updateSubagentSettings.
§Parameters
params- Subagent settings to apply to the current session
§Returns
Empty result after applying subagent settings
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