MCPcopy Index your code
hub / github.com/github/copilot-sdk / handle_pending_tool_call

Method handle_pending_tool_call

python/copilot/generated/rpc.py:26217–26221  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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."

Calls 4

_timeout_kwargsFunction · 0.85
to_dictMethod · 0.45
from_dictMethod · 0.45
requestMethod · 0.45