[docs]classSlackGetChannel(SlackBaseTool):# type: ignore[override]"""Tool that gets Slack channel information."""name:str="get_channelid_name_dict"description:str=("Use this tool to get channelid-name dict. There is no input to this tool")def_run(self,*args:Any,run_manager:Optional[CallbackManagerForToolRun]=None)->str:try:logging.getLogger(__name__)result=self.client.conversations_list()channels=result["channels"]filtered_result=[{key:channel[key]forkeyin("id","name","created","num_members")}forchannelinchannelsif"id"inchanneland"name"inchanneland"created"inchanneland"num_members"inchannel]returnjson.dumps(filtered_result,ensure_ascii=False)exceptExceptionase:return"Error creating conversation: {}".format(e)