code: def get_exec_call_tool(llm, executor, model_kwargs) -> Callable:
      def mdb_exec_call_tool(query: str) -> str:
          try:
              ast_query = parse_sql(query.strip("`"), dialect="mindsdb")
              ret = executor.execute_command(ast_query)
              if ret.data is None and ret.error_code is None:
                  return ""
              data = ret.data  # list of lists
              data = "\n".join(
                  [  # rows
                      "\t".join(  # columns
                          str(row)
                          if isinstance(row, str)
                          else [str(value) for value in row]
                      )
                      for row in data
                  ]
              )
          except Exception as e:
              data = f"mindsdb tool failed with error:\n{str(e)}"  # let the agent know
  
          # summarize output if needed
          data = summarize_if_overflowed(
              data, llm, model_kwargs["max_tokens"]
          )
  
          return data
  
      return mdb_exec_call_tool
  
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 1 for calling a global function with example usage: get_exec_call_tool(llm, executor, model_kwargs) and returns: mdb_exec_call_tool, data, str