MCPcopy Create free account
hub / github.com/github/copilot-sdk / HandlePendingToolCall

Method HandlePendingToolCall

go/rpc/zrpc.go:17161–17181  ·  view source on GitHub ↗

HandlePendingToolCall provides the result for a pending external tool call. RPC method: session.tools.handlePendingToolCall. Parameters: 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 h

(ctx context.Context, params *HandlePendingToolCallRequest)

Source from the content-addressed store, hash-verified

17159//
17160// Returns: Indicates whether the external tool call result was handled successfully.
17161func (a *ToolsAPI) HandlePendingToolCall(ctx context.Context, params *HandlePendingToolCallRequest) (*HandlePendingToolCallResult, error) {
17162 req := map[string]any{"sessionId": a.sessionID}
17163 if params != nil {
17164 if params.Error != nil {
17165 req["error"] = *params.Error
17166 }
17167 req["requestId"] = params.RequestID
17168 if params.Result != nil {
17169 req["result"] = params.Result
17170 }
17171 }
17172 raw, err := a.client.Request(ctx, "session.tools.handlePendingToolCall", req)
17173 if err != nil {
17174 return nil, err
17175 }
17176 var result HandlePendingToolCallResult
17177 if err := json.Unmarshal(raw, &result); err != nil {
17178 return nil, err
17179 }
17180 return &result, nil
17181}
17182
17183// InitializeAndValidate resolves, builds, and validates the runtime tool list for the
17184// session.

Callers 4

executeToolAndRespondMethod · 0.80
mainFunction · 0.80
TestPendingWorkResumeE2EFunction · 0.80

Calls 1

RequestMethod · 0.45

Tested by 2

TestPendingWorkResumeE2EFunction · 0.64