code: def setup_tools(
      llm,
      model_kwargs,
      pred_args,
      executor,
      default_agent_tools,
      openai_api_key,
  ):
      toolkit = (
          pred_args["tools"]
          if pred_args["tools"] is not None
          else default_agent_tools
      )
  
      standard_tools = []
      function_tools = []
  
      for tool in toolkit:
          if isinstance(tool, str):
              standard_tools.append(tool)
          else:
              # user defined custom functions
              function_tools.append(tool)
  
      skill_tools = []
      skills = pred_args.get("skills", [])
      for skill in skills:
          skill_tools += make_tools_from_skill(
              skill, llm, openai_api_key, executor
          )
  
      tools = _setup_standard_tools(
          standard_tools, llm, executor, model_kwargs
      )
      if model_kwargs.get("serper_api_key", False):
          search = GoogleSerperAPIWrapper(
              serper_api_key=model_kwargs.pop("serper_api_key")
          )
          tools.append(
              Tool(
                  name="Intermediate Answer (serper.dev)",
                  func=search.run,
                  description="useful for when you need to search the internet (note: in general, use this as a last resort)",  # noqa
              )
          )
  
      for tool in function_tools:
          tools.append(
              Tool(
                  name=tool["name"],
                  func=tool["func"],
                  description=tool["description"],
              )
          )
      tools = tools + skill_tools
  
      return tools
  
file_path: mindsdb/mindsdb/integrations/handlers/langchain_handler/tools.py
imports: import tiktoken
  from typing import Callable
  from mindsdb_sql import parse_sql, Insert
  from langchain.utilities import GoogleSerperAPIWrapper
  from langchain.prompts import PromptTemplate
  from langchain.agents import load_tools, Tool
  from langchain.chains.llm import LLMChain
  from langchain.text_splitter import CharacterTextSplitter
  from langchain.chains.combine_documents.stuff import StuffDocumentsChain
  from langchain.chains import ReduceDocumentsChain, MapReduceDocumentsChain
  from mindsdb.interfaces.skills.skill_tool import make_tools_from_skill
label_desc: Use image node_id 5 for calling a global function with example usage: setup_tools(llm, model_kwargs, pred_args, executor, default_agent_tools, openai_api_key) and returns: tools