Resolves the tool name for this response by scanning contextMessages for the ToolCall whose id matches toolCallId.
Resolves the tool name for this response by scanning contextMessages for the ToolCall whose id matches toolCallId.
Returns "unknown-tool" when no matching tool call is found, which can happen if contextMessages does not include the assistant message that issued the request (e.g. after context pruning).
Value parameters
contextMessages
The conversation history to search; all AssistantMessage entries are scanned.