Provides the result for a pending external tool call.\n\nArgs:\n params: Pending external tool call request ID, with the tool result or an error describing why it failed.\n\nReturns:\n Indicates whether the external tool call result was handled successfully.
(self, params: HandlePendingToolCallRequest, *, timeout: float | None = None)
| 26215 | self._session_id = session_id |
| 26216 | |
| 26217 | async def handle_pending_tool_call(self, params: HandlePendingToolCallRequest, *, timeout: float | None = None) -> HandlePendingToolCallResult: |
| 26218 | "Provides the result for a pending external tool call.\n\nArgs:\n params: Pending external tool call request ID, with the tool result or an error describing why it failed.\n\nReturns:\n Indicates whether the external tool call result was handled successfully." |
| 26219 | params_dict: dict[str, Any] = {k: v for k, v in params.to_dict().items() if v is not None} |
| 26220 | params_dict["sessionId"] = self._session_id |
| 26221 | return HandlePendingToolCallResult.from_dict(await self._client.request("session.tools.handlePendingToolCall", params_dict, **_timeout_kwargs(timeout))) |
| 26222 | |
| 26223 | async def initialize_and_validate(self, *, timeout: float | None = None) -> ToolsInitializeAndValidateResult: |
| 26224 | "Resolves, builds, and validates the runtime tool list for the session.\n\nReturns:\n 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." |