from llama_index.core.tools import FunctionTool def query(query_string: str) -> str: """Usefule for asking questions about X.""" return query_pipeline.run(query_string=query_string) tool = FunctionTool.from_defaults(fn=query)